http://stackoverflow.com/a/25214914
answers question: http://stackoverflow.com/q/25214384
has body: You could wrap your data update function in a $scope.$apply() call, like so: storage.get_all(function(items) { $scope.$apply(function () { var tmp = []; for (id in items) { tmp.push(items[id]); } ctrl.medias = tmp; }); });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39272529
has comment: http://stackoverflow.com/comment/39272546
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25214384

http://stackoverflow.com/comment/39254680
has text: Yes very helpful! Sorry been sidetracked by another project. Will review these again and accept -- thanks for help everyone :)
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25089749
type: QuestionComment

http://stackoverflow.com/q/25081942
has body: I've created a marker and added a listener on this marker which opens an info window. My problem is that i can't figure it out how to change the default frame of the infoWindow. is it possible? here is my code: var markerPosition = new google.maps.LatLng(lat, lng); var shopMarker = new google.maps.Marker({ position: markerPosition, map: map, icon: iconshop, title: " shop", draggable: false }); var content = ' text ' +' texttext ' +' text ' +' '; var infowindow = new google.maps.InfoWindow(); google.maps.event.addListener(shopMarker,'click', (function(shopMarker,content,infowindow){ return function() { infowindow.setContent(content); infowindow.open(map,shopMarker); }; })(shopMarker,content,infowindow)); In this code what can i do to customize the infoWindow's frame and generally the style? Edit: the image below is the result that i want when i click the marker.
tagged with: maps
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25085084
type: Question
tagged with: google-maps
has title: Google Maps: Change infoWindow's Frame
accepted answer: http://stackoverflow.com/a/25085084
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/q/25076714
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25076930
has title: After some specified character extracting the value
has answer: http://stackoverflow.com/a/25077162
possible better answer: http://stackoverflow.com/a/25076757
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/25076821
accepted answer: http://stackoverflow.com/a/25076821
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25076757
upvote count: 1
has body: I can have a Javascript variable as 'Ice Creams***Cone***Frosty'; OR 'Ice Creams***Cone' I need to get the last value after *** Means in first case i needed the value Frosty and in second case , i needed the value Cone

http://stackoverflow.com/comment/39017558
type: QuestionComment
comment on: http://stackoverflow.com/q/25077700
score: 0
has text: `localStorage` is also an option.
type: Comment

http://stackoverflow.com/comment/54892682
comment on: http://stackoverflow.com/a/25150793
type: Comment
has text: Shouldn't it be `startTime.diff(end, 'hours', true);`? The duration.asHours(); would return 1 if it was 25 hours ago.
score: 12
type: AnswerComment

http://stackoverflow.com/comment/39149619
comment on: http://stackoverflow.com/q/25148801
score: 0
has text: Why are you even doing that, isn't the content static anyway?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25172035
has title: Frontend Development Workflow
tagged with: node.js
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: gruntjs
has answer: http://stackoverflow.com/a/25172300
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm curious if anyone else is using a similar approach to mine and or if anyone has a thought or suggestion to help improve the workflow. To my knowledge, this is a somewhat original method. So basically, I'm using NodeJS to development my client side code. I use Grunt+watch to automatically concatenate and minify all of my projects source into a single .min file, which gets written to the public/js folder. However, for testing I use Jasmine-node and so I need to have an index file (for this purpose only) which requires all of the project source files. However, because I want the same code to run in both Node as well as the browser, I add everything to a global project namespace such as: myApp.framework.someClass Within the myapp.js file, I then export to node (if module + exports exists). This allows all of my objects to be exposed to node without having to add the module.exports stuff to every source file, and instead, I can either simple do: (function() { myApp.framework.someClass = function() {...} })(); in each file, or even simply: myApp.framework.someClass = function() {...} This works incredibly well for the client because everything is already there in memory, however the downside is that in Node, sometimes trying to access another class within the myApp namespace will fail because I'm not using something like RequireJS to manage dependencies. My thought was maybe to add requires to the files just as you would in a standard node app, but then in the build process, have any node specific stuff, stripped out. Thoughts / comments please!

http://stackoverflow.com/a/25177152
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: There are a lot of different approaches here, depending on the details. As for the error retrying, just pass the function to a module like attempt. Or make it a promise-based pattern so on the failed promise, retry the current function. Other stuff, depends on your details. Do you want to pass the same argument to all of the functions? It looks like it, since you want to retry step number 3 regardless of others. You can simply use async. function first() { // do stuff return 1; } function second() { // do stuff return 2; } // ... up to fifth async.series([first, second, third, fourth, fifth], function (err, results) { console.log('Results: ', results); // should return [1, 2, 3, 4, 5] }); Or maybe you want a waterfall, pass results of the previous function to the next? Then you'd use something like async-waterfall. Do you want to store success or not? Globally? Locally? What about number of retries? This is the best I can do without further info.
accepted answer of: http://stackoverflow.com/q/25167138
has comment: http://stackoverflow.com/comment/39244289
has comment: http://stackoverflow.com/comment/39225948
answers question: http://stackoverflow.com/q/25167138
type: AcceptedAnswer

http://stackoverflow.com/q/25176302
has body: I am using ddlevelsmenu.js from dynamic drive to display menu items on mouseover. everything works fine. just i have one very long list which appears little bit odd. Can i split the list items into different columns? Below are my HTML codes followed by CSS codes: Indian States The above codes will trigger the below list items on mouseover Andhra Pradesh Arunachal Pradesh Assam Bihar Chattisgarh Goa Gujarat Haryana Himachal pradesh Jammu Kashmir Jharkhand Karnataka Kerala Madhya Pradesh Maharashtra Manipur Meghalaya Mizoram Nagaland Odisha Punjab Rajasthan Srinagar Sikkim Tamil Nadu Telangana Uttar Pradesh Uttaranchal West Bengal Below are the css codes .ddsubmenustyle, .ddsubmenustyle div{ /*topmost and sub DIVs, respectively*/ font: normal 1.2vw; margin: 0; padding: 0; position: absolute; left: 0; top: 0; list-style-type: none; background: white; border: 1px solid black; border-bottom-width: 0; visibility: hidden; z-index: 100; } .ddsubmenustyle ul{ margin: 0; padding: 0; position: absolute; left: 0; top: 0; list-style-type: none; border: 0px none; } .ddsubmenustyle li a{ display: block; width: 180px; /*width of menu (not including side paddings)*/ color: white; background-color:#999999; text-decoration: none; padding: 4px 5px; border-bottom: 1px solid black; } .ddsubmenustyle li a:hover{ background-color:#333333; } * html .ddsubmenustyle li{ /*IE6 CSS hack*/ display: inline-block; width: 180px; /*width of menu (include side paddings of LI A*/ } /* ######### Neutral CSS ######### */ .downarrowpointer{ /*CSS for "down" arrow image added to top menu items*/ padding-left: 4px; border: 0; } .rightarrowpointer{ /*CSS for "right" arrow image added to drop down menu items*/ position: absolute; padding-top: 3px; left: 100px; border: 0; } .ddiframeshim{ position: absolute; z-index: 500; background: transparent; border-width: 0; width: 0; height: 0; display: block; }
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25176801
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/14745297
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25177988
tagged with: css
has title: How to split a long list and display in columns

http://stackoverflow.com/comment/39061901
comment on: http://stackoverflow.com/q/25100981
type: Comment
type: QuestionComment
has text: What exactly do you mean by instance method? You want to do something like ‘this.some method=cMethod‘ why does every instance need it's own method? Normally a method/function would do the same for every instance so you can define it on the prototype: http://stackoverflow.com/questions/16063394/prototypical-inheritance-writing-up/16063711#16063711
score: 0

http://stackoverflow.com/a/25074383
has body: if (typeof Float32Array === 'function') FSS.Array = Float32Array else FSS.Array = Array Ternary Operator precedence 4 1 2 3 3 V V V V V FSS.Array = typeof Float32Array === 'function' ? Float32Array : Array; About type Float32Array
answers question: http://stackoverflow.com/q/25074341
score: 0
type: Answer

http://stackoverflow.com/a/25094754
has comment: http://stackoverflow.com/comment/39048682
score: 3
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25094699
upvote count: 3
has body: No, for the same reasons you can not get the url from an iframe if it's on a different domain: cross-domain security. What you can do is get the $_SERVER['HTTP_REFERER'] in php but it's not always set... Or as @FabrícioMatté commented document.referrer in javascript, but reliability is just as bad. The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. http://php.net/manual/en/reserved.variables.server.php To go back to the previous page you can use history.go(-1) in javascript.
answers question: http://stackoverflow.com/q/25094699
type: Answer

http://stackoverflow.com/a/25535385
answers question: http://stackoverflow.com/q/25185370
upvote count: 1
type: Answer
downvote count: 0
has body: You can pass an HTML element to the TweenMax.from function as well as a selector (see documentation). Note also that angular includes a stripped back version of jQuery called jQuery lite which you can use to wrap an element and run a limited subset of jQuery's functions on it (documentation). There may be a neater way of doing this, but you can do what you're trying to do by applying the techniques above as follows (updated CodePen): var tree = angular.module('treeview',[]); tree.directive('treeView',function(){ return{ restrict: 'AE', link:function (scope,elem,attrs){ // Use jQuery lite to access the first child of the scoped element var ul = angular.element(elem).children(0); var list = TweenMax.from(ul,0.5,{height:0,paused:true,reversed:true}); function toggle(){ if (list.reversed()) { list.play(); } else { list.reverse(); } } elem.on('click',function(e){ toggle(); e.stopPropagation(); }); } } });
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25185370

http://stackoverflow.com/q/25139133
has body: Right now the toggle will open content downwards but some of it is cut off by the viewport. How can I make it so that the content from the toggle always fits the viewport by pushing up the content above it? $(document).ready(function() { $(".content").hide(); $(".toggle").on("click", function(e) { $(this).next('.content').slideToggle(200); }); }); An image of the problem: EDIT I tried adding the code suggested by Aleks G: $(document).ready(function(){ $(".content").hide(); $(".toggle").on("click", function(e){ $(this).next('.content').slideToggle(200, function() { if($(this).position().top + $(this).height() &gt; $(this).parent().innerHeight()) { $(this).parent().scrollTop($(this).position().top - 100); } }); }); }); EDIT 2 New JSFiddle: http://jsfiddle.net/Dar_T/2h2wjp2L/
has comment: http://stackoverflow.com/comment/39443427
has answer: http://stackoverflow.com/a/25278034
has answer: http://stackoverflow.com/a/25140153
type: Question
has title: Get toggle to push content upwards rather than down
has answer: http://stackoverflow.com/a/25139523
has comment: http://stackoverflow.com/comment/39272282
tagged with: javascript
tagged with: jquery
score: 4
possible better answer: http://stackoverflow.com/a/25140153
has comment: http://stackoverflow.com/comment/39131444
has answer: http://stackoverflow.com/a/25308456
linked to: http://stackoverflow.com/q/4574501
answer count: 7
favorite count: 0
has comment: http://stackoverflow.com/comment/39285468
has answer: http://stackoverflow.com/a/25306547
accepted answer: http://stackoverflow.com/a/25306547
has answer: http://stackoverflow.com/a/25139464
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
has comment: http://stackoverflow.com/comment/39216146
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39131015
has answer: http://stackoverflow.com/a/25302461
has comment: http://stackoverflow.com/comment/39265840

http://stackoverflow.com/a/25222211
answers question: http://stackoverflow.com/q/25222108
has comment: http://stackoverflow.com/comment/39287493
type: AcceptedAnswer
has body: var arr = ["Microsoft", "Google", "Apple"]; var i = 0; function loop() { alert( arr[i] ); i++; if( i &lt; arr.length ){ setTimeout( loop, 3000 ); } }; loop();
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25222108

http://stackoverflow.com/a/25075459
has comment: http://stackoverflow.com/comment/39012127
has comment: http://stackoverflow.com/comment/39012573
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39012225
has comment: http://stackoverflow.com/comment/39012239
has body: If I understand your point, then you try use this: var ids = []; var allIds = []; hugeDataObject.forEach(function(attrs) { var index = allIds.indexOf(attrs.id); if(index &gt;= 0){ ids[index].amount = ids[index].amount + 1; } else { ids.push({type: attrs.id, amount: 1}); allIds.push(attrs.id); // Here first should check is this type available, // after create it or increase the amount } }); console.log(ids);
answers question: http://stackoverflow.com/q/25075254
has comment: http://stackoverflow.com/comment/39012325
has comment: http://stackoverflow.com/comment/39012821

http://stackoverflow.com/comment/39208832
has text: getPrototypeOf only returns 16 properties while getOwnPropertyNames lists all of them
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25179649
type: AnswerComment

http://stackoverflow.com/comment/39247026
type: Comment
comment on: http://stackoverflow.com/a/25201363
type: AnswerComment
score: 0
has text: not the first alone - the other ones too but not with the same height of the first. i would like to have a equal height like in tables - each row on the same line but with an equal height

http://stackoverflow.com/q/25169770
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25169888
type: Question
has body: If i have this snippet Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. and I want to define a maxlenght in the element, for when the sever return much characters, making something like this: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua... how i do? Thnks in advance
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25169921
score: -2
has comment: http://stackoverflow.com/comment/39188415
has title: How define a maxlenght in a element
upvote count: 2
possible better answer: http://stackoverflow.com/a/25169921
answer count: 2
accepted answer: http://stackoverflow.com/a/25169888
has comment: http://stackoverflow.com/comment/39188922
downvote count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/39100658
score: 1
has text: Why? delegation requires just one listener. Full stop, end of story... no messy `.bind` stuff to worry about
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25122619

http://stackoverflow.com/q/25075338
tagged with: python
accepted answer: http://stackoverflow.com/a/25075453
type: AnsweredQuestion
has body: How can I convert a python timestamp with javacript from 2014-07-28T20:45:04.271935 to 1.6.2014 (20:45) I tried to use the builtin parse function from javascript, but it seems to mix up things.. out = new Date(context); out = out.getDay() + ". " + out.getMonth() + ". " + out.getFullYear() + " (" + out.getHours()+ ":" + out.getMinutes() + ")";
type: Question
has answer: http://stackoverflow.com/a/25075453
score: 0
answer count: 1
tagged with: javascript
tagged with: datepicker
tagged with: datetime
has title: How to convert python timestamp to javascript YYY-MM-DDTHH:MM:SS.302325

http://stackoverflow.com/comment/39267571
type: AnswerComment
comment on: http://stackoverflow.com/a/25204738
type: Comment
score: 0
has text: I dont know if this could be the issue, looks ok to me but on the server side the read script for the table is function read(query, user, request) { request.execute(); }

http://stackoverflow.com/comment/39195908
has text: well sounds like JSON is not being returned
comment on: http://stackoverflow.com/q/25173727
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/25072574
favorite count: 0
linked to: http://stackoverflow.com/q/932653
tagged with: firebase
type: AnsweredQuestion
tagged with: firebasesimplelogin
accepted answer: http://stackoverflow.com/a/25073171
has body: I'm pretty sure this is a problem of me not fully understanding asynchronous javascript, but I'll explain my problem. I have an email/password authenticated with Firebase, and I have a login page with the following form: Please log in Log in When I click the button I get the following error in my JS console that flashes really quickly: Uncaught TypeError: Cannot read property 'token' of undefined --- firebase-simple-login.js:132 At the bottom of my head tag I include the script "js/firebase.js" and this is that file: var myRef = new Firebase("https://xxxx.firebaseio.com"); var auth = new FirebaseSimpleLogin(myRef, function(error, user) { if (error) { console.log(error); } else if (user) { console.log("User ID: " + user.uid + ", Provider: " + user.provider); } else { } }); function login(form) { auth.login('password', { email: form.email.value, password: form.password.value }); } After I fill out the form, press the button and get the error, the fields go blank and there is a "?#" appended to the end of my URL. If I try to login after this it works perfectly. Thanks in advance!
type: Question
score: 3
has answer: http://stackoverflow.com/a/25073171
tagged with: javascript
has title: For Firebase Simple Login, I have to login twice for it to register
upvote count: 3
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/78797288
has text: Perfect solution. A big thumbs up... :) Cheers Even it works perfectly for iron ajax of Polymer 1
score: 0
comment on: http://stackoverflow.com/a/25100812
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39138232
type: QuestionComment
has text: Using the # is also wont work.
comment on: http://stackoverflow.com/q/25142912
score: 0
type: Comment

http://stackoverflow.com/comment/39231852
score: 0
type: AnswerComment
type: Comment
has text: if its not inside a scope of some sort then using this will refer to the window/global object which is generally not desired.
comment on: http://stackoverflow.com/a/25192092

http://stackoverflow.com/q/25207019
score: 0
answer count: 1
has title: How to enable dragging off the control to scroll and extend the selection
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25207205
tagged with: scroll
type: Question
tagged with: selection
has body: I'm creating a custom scrolling control using HTML's Canvas that behaves a little like a spreadsheet grid. I have most standard cursor control behaviors set up, including using the mouse or arrow keys to extend the selection. What I'd like to do next is allow the user to extend the selection by clicking and dragging off the canvas. I don't need help with the actual code, but I'd like to know if anyone has programmed something like this before, and if so, how did they approach it? Here are the ways I can think of: Track the mouse's general direction while over the control, and on mouseLeave+mouseDown set up a timer to scroll that direction until mouseEnter+mouseDown Determine the last location of the mouse before mouseLeave+mouseDown and use that to determine scroll direction Start a slow scroll when mouse is within a few pixels of an edge (which edge determines direction) and then scroll faster on mouseLeave+mouseDown Somehow involve window.mouseMove (instead of canvas.mouseMove) and track it that way (which seems really ugly to me) Something else I'm missing that will seem really obvious in retrospect I can handle the code, I just want to figure out the best conceptual approach to take. Ideally, I'd love to handle extending the selection diagonally (scrolling right and down simultaneously, or at least alternating between the two so it appears that way), but that's not a deal breaker.
tagged with: canvas
tagged with: javascript
tagged with: mouseevent

http://stackoverflow.com/q/25208771
tagged with: fullcalendar
tagged with: jquery
score: 0
has title: Full Calendar form Arshaw doesn't fit, it has a huge height
answer count: 1
has answer: http://stackoverflow.com/a/28906764
type: UnansweredQuestion
has body: Well the main problema that I have is that I can't make the fullCalendar from Arshaw to fit inside the div that I've assign to it. The div container has a height of 300px. But when I try to put the calendar inside that space, it renders a huge Calendar. When I open the browser console the height that it has is over 1500px. I've tried the height parameter, the container height, tried injecting css to the tags and nothing seems to work, I also deleted each jquery call and other scripts running in my page and just left the scripts that FullCalendar needs. At last I moved the calendar right after the tag and it worked. I'm guessing the problem is the calculation of tables' height and that leads to have a bad calculation of each box insisde the table. here are the pictures in case you guys don't understand: http://s1383.photobucket.com/user/dortegalizardo/library/ Thanks in advance.
tagged with: css
type: Question
tagged with: javascript

http://stackoverflow.com/q/25076537
has comment: http://stackoverflow.com/comment/39081272
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39055969
tagged with: google-maps
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39036408
has answer: http://stackoverflow.com/a/25112342
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39047281
favorite count: 0
tagged with: ruby-on-rails-3
tagged with: gmaps4rails
type: Question
has body: I have filter marker based on type by below code filters= ['office','home'] $.each(Gmaps.map.markers, function(i, marker) { if(filters.length &lt; 1){ Gmaps.map.showMarker(marker); }else if(filters.indexOf(marker.type) &gt; -1){ Gmaps.map.showMarker(marker); }else{ Gmaps.map.hideMarker(marker); } }); this code hide that marker but its not update Clusterer count on the map. how to update Clusterer count on map
accepted answer: http://stackoverflow.com/a/25112342
has title: How to update markerClusterer count show on Clusterer using Gmap4Rails in rails

http://stackoverflow.com/q/25088514
answer count: 1
tagged with: node.js
tagged with: sails.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25088716
tagged with: javascript
has body: I am very new to Sails.js and I am trying to understand its magic. I have three nested models using associations : Series.js -> Season.js -> and Episode.js. Series.js module.exports = { attributes: { /* other attributes */ seasons: { collection: 'season', via: 'series' } } }; Season.js module.exports = { attributes: { /* other attributes */ episodes: { collection: 'episode', via: 'season' }, series: { model: 'series' } } }; Episode.js module.exports = { attributes: { /* other attributes */ season: { model: 'season' } } }; Out of the box, I can get the seasons of a series using the route: /series/:id/seasons And also the episodes of a season using the route: /seasons/:id/episodes What I don't understand is why I can't get the episodes of a season of a series using this route: series/:id/seasons/:id/episodes Any idea why is this happening? I know I could use custom routes to get the behaviour I want, but it'd be nice to be able to do it without any further configuration. I know Sails.js only allows one level population, but this doesn't seem the issue since I have set populate: false.
type: Question
has title: Sails.js filtering records using the route
score: 0
has answer: http://stackoverflow.com/a/25088716

http://stackoverflow.com/a/25146709
score: 0
answers question: http://stackoverflow.com/q/25146591
type: Answer
has body: var WindowSrc = $("#second").attr("src"); window.open(WindowSrc); Note: You will need to ensure that pop ups are allowed if you wish to open a new window.

http://stackoverflow.com/a/25214941
has body: I would prefer the usage of addEventListener() over inline onClick. Here you have a working exaple of your code document.querySelector("#right").addEventListener("click", funcRight); function funcRight() { var month = document.getElementsByTagName("h4").item(0); if (month.innerHTML == "August 2014"){ month.innerHTML="September 2014"; } else if (month.innerHTML == "September 2014"){ month.innerHTML="October 2014"; } } And here is the fiddle to play with.
answers question: http://stackoverflow.com/q/25214895
score: 0
type: Answer

http://stackoverflow.com/q/25149216
has title: Unable to display a polygon using d3
type: Question
has answer: http://stackoverflow.com/a/25149345
tagged with: javascript
has body: I am trying to append an svg using d3, as follows: Unfortunately, this doesn't display anything. On the other hand, if replace the last three lines with the following, then I get a triangle. I am unable to figure out why this is. Please help.
score: 0
answer count: 2
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25149300
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/comment/39180892
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25151132
type: Comment
has text: If you're doing this in the callback then the `rows` variable should contain the parsed rows of the csv. I've updated my answer to reflect this.

http://stackoverflow.com/comment/39024742
has text: Does your function return a function? If not, stop calling it, and pass only the reference. See e.g., http://stackoverflow.com/a/7969111/438992.
score: 1
comment on: http://stackoverflow.com/q/25082074
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25221483
type: AnsweredQuestion
score: 2
has body: I'm trying to use angular's resolve when trying to navigate between routes: when('/user', { templateUrl: 'partials/user.html', controller: 'UserController', resolve: { auth: RouteAuthenticationCheck } }) This works fine when I use $http because it returns a promise: var RouteAuthenticationCheck = ['$http', function ($http){ return $http.get('/login'); }]; But when I use $resolve, it does not.. and this code would not work: var RouteAuthenticationCheck = ['$resource', function ($resource){ return $resource('/login').get(); }]; What is the appropriate way to uses $resource to resolve when changing routes?
tagged with: resolve
has answer: http://stackoverflow.com/a/25221579
accepted answer: http://stackoverflow.com/a/25221579
type: Question
has title: how to use $resource with resolve
downvote count: 0
tagged with: javascript
upvote count: 2
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39284708
tagged with: rest
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39284815

http://stackoverflow.com/comment/39123352
type: QuestionComment
comment on: http://stackoverflow.com/q/25134903
score: 2
has text: No cookie for you. "not work correctly" is not a sufficient problem description and does not contain any useful info besides "it does not work"
type: Comment

http://stackoverflow.com/a/25075354
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25075254
has body: How about a simpler structure to store: var objects = {}; objects['id1234'] = 384; objects['id5678'] = 955; objects['id91011'] = 1510; /* increment */ objects['id1234']++;
has comment: http://stackoverflow.com/comment/39012001

http://stackoverflow.com/q/25077885
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39022743
duplicate of: http://stackoverflow.com/q/16349476
tagged with: css
has comment: http://stackoverflow.com/comment/39019809
score: 1
has body: I am using bootstrap for layout and i am trying to center my map to a marker, but the problem is that the marker shows up at the bottom of the map container. If i slightly resize the window then it centers itself and work normally. my mark up &lt;div id="gMap"&gt; &lt;div id="map-canvas"&gt;&lt;/div&gt; &lt;/div&gt;&lt;!--gMap--&gt; css #map-canvas { position: relative; padding-bottom: 70%; } #map-canvas iframe { width: 100% !important; height: 100% !important; } js var respMap; var mapCanvas = document.getElementById('map-canvas'); function mymapini() { var mapPos = new google.maps.LatLng(43.724243, -79.634353); //Set the coordinates var mapOpts = { zoom: 16, disableDefaultUI: true, center: mapPos, mapTypeId: google.maps.MapTypeId.ROADMAP }; respMap = new google.maps.Map(mapCanvas, mapOpts); var mapMarker = new google.maps.Marker({ position: mapPos, map: respMap, title: 'Test marker' }); google.maps.event.addListener(respMap, 'idle', function() { window.setTimeout(function() { respMap.panTo(mapMarker.getPosition()); }, 250); }); } if(mapCanvas != null){ google.maps.event.addDomListener(window, 'load', mymapini); }
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39021974
linked to: http://stackoverflow.com/q/16349476
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39020415
has answer: http://stackoverflow.com/a/25077991
upvote count: 1
answer count: 1
has title: Google map marker positioned in bottom on load
favorite count: 0

http://stackoverflow.com/comment/39148419
score: 0
has text: How does it not work? What results are you seeing? I'd recommend logging `item` to the console to see if you are getting what you expect.
comment on: http://stackoverflow.com/q/25148039
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/41553760
type: Comment
score: 0
type: AnswerComment
has text: @WillemD'haeseleer I am still unable to get this working correctly. The Ajax request fails based on the redirect.
comment on: http://stackoverflow.com/a/25263368

http://stackoverflow.com/a/25252041
downvote count: 1
upvote count: 5
has body: demo: http://jsfiddle.net/4y8tLgcp/ $('ul.nav.navbar-nav').on('click.bs.dropdown', function(e){ var $a = $(e.target), is_a = $a.is('.is_a'); if($a.hasClass('dropdown-toggle')){ $('ul.dropdown-menu', this).toggle(!is_a); $a.toggleClass('is_a', !is_a); } }).on('mouseleave', function(){ $('ul.dropdown-menu',this).hide(); $('.is_a', this).removeClass('is_a'); }); i have updated it once again to be the smartest and functional as possible. it now close when you hover outside the nav, remaining open while you are inside it. simply perfect.
answers question: http://stackoverflow.com/q/25089297
has comment: http://stackoverflow.com/comment/39357432
type: Answer
has comment: http://stackoverflow.com/comment/39958349
has comment: http://stackoverflow.com/comment/39358414
has comment: http://stackoverflow.com/comment/39345141
score: 4
has comment: http://stackoverflow.com/comment/39357700

http://stackoverflow.com/a/25155548
type: Answer
has body: Call the API from the left sidebar under External resources. Add http://maps.google.com/maps/api/js?sensor=false and hit the + sign to add the API to the external resources that will be loaded. If you use the addDomListener then use No wrap - in &lt;head&gt; in Frameworks and extensions. Your map will work fine.
accepted answer of: http://stackoverflow.com/q/25154434
answers question: http://stackoverflow.com/q/25154434
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/39348943
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25193305
has text: you can replace all those values with 0 or 1 and it will work. It won't necessarily make sense, but you can tweak the texture to work with this. Just treat any vec2 with any one component that's invalid, as invalid and make both components 0. This will map that vertex to the corner of the texture.

http://stackoverflow.com/comment/39314580
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25236700
type: AnswerComment
has text: as I mentioned in the answer, you can hold all points in an observableArray. `data-bind="myGraph: dataArray"`, then additional binding is unnecessary.

http://stackoverflow.com/comment/39234287
comment on: http://stackoverflow.com/q/25194517
score: 0
has text: I was testing in developer tools, and I manually added `stroke="blue"` to it like this site says https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes, but it didnt change anything.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39183419
score: 0
has text: The html control you are seeing like text, input, etc. are actually all directives so that ng-model works. There is no directive for div.
comment on: http://stackoverflow.com/q/25149765
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25194207
tagged with: javascript
tagged with: jquery
has title: Is this a valid way to show multiple divs with delays in jquery?
accepted answer: http://stackoverflow.com/a/25194299
type: Question
has body: Is this a valid way to show multiple divs with delays in jquery? it works fine but i was wondering if there is a better way? $(document).ready(function(){ $("#heading").delay(100).show(500); $("#column1").delay(2200).show(500); $("#column2").delay(2400).show(500); $("#column3").delay(2600).show(550); $("#column4").delay(2700).show(500); $("#column5").delay(2800).show(500); }); http://jsfiddle.net/unknown601/hkccLedu/
has comment: http://stackoverflow.com/comment/39233836
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39233555
has answer: http://stackoverflow.com/a/25194299
type: AnsweredQuestion

http://stackoverflow.com/a/25221871
has comment: http://stackoverflow.com/comment/39288533
type: Answer
has comment: http://stackoverflow.com/comment/39302738
has body: Put your button inside a form like this: &lt;form action="" method="GET"&gt; &lt;input type="submit" value="Email All" /&gt; &lt;/form&gt; For javascript, onload, put this: $("emailAll").click(function($){ var emailCell = 4; var length = document.getElementById("orgTable").rows.length; var emailArray = []; for (i = 0; i &lt; length; i++) { emailArray.push(document.getElementById("orgTable").rows[i].cells[emailCell].value); } // once you got your array of email properly from your table, try this $('form').get(0).setAttribute('action', "mailto:"+emailArray.toString()); }); Edit: I forgot to add mailto: to make the action act like mailto link in href attribute.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25221674
has comment: http://stackoverflow.com/comment/39289875
has comment: http://stackoverflow.com/comment/39346101
has comment: http://stackoverflow.com/comment/39303710
downvote count: 0

http://stackoverflow.com/a/25114866
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25112363
has comment: http://stackoverflow.com/comment/39087312
score: 3
type: Answer
has comment: http://stackoverflow.com/comment/39117540
has comment: http://stackoverflow.com/comment/39110271
upvote count: 3
answers question: http://stackoverflow.com/q/25112363
has body: Create a polyline based on the returned path(e.g. on overview_path) and then iterate over all_tolls and use google.maps.geometry.poly.isLocationOnEdge to check if a given LatLng is placed on(or near) the polyline.

http://stackoverflow.com/a/25200507
has comment: http://stackoverflow.com/comment/39246077
answers question: http://stackoverflow.com/q/25200311
has comment: http://stackoverflow.com/comment/39246232
downvote count: 1
has comment: http://stackoverflow.com/comment/39246093
type: Answer
has body: var parts = path.split('/'); for(var i=0; i&lt;parts.length; i++) { if(parts[i] == 'page'){ alert(parts[i+1]); } }
upvote count: 0
score: -1

http://stackoverflow.com/a/25190818
has body: You are using a jQuery function in a html element. You can not use find into $editorItemTemplate, which contains the html of the template. You have to find the element using this way: $('div', $editorItemTemplate).prop('id', item); Regards.
answers question: http://stackoverflow.com/q/25190750
type: Answer
score: 0

http://stackoverflow.com/q/25208115
tagged with: javascript
type: UnansweredQuestion
tagged with: geometry
tagged with: http://stackoverflow.com/tag/svg
type: Question
tagged with: d3.js
has answer: http://stackoverflow.com/a/25213221
has answer: http://stackoverflow.com/a/25210879
score: 0
answer count: 2
has title: How to calculate (SVG) X/Y coordinates out of translation and rotation (in JS/D3.js)?
has body: The following function draws small circles in the middle of some arcs. I want to draw lines from these circles to other elements. Thats why I need to get the cx/cy values of the circles (after they have been rotated). var drawSmallCircles = function(arcs){ var d=arcs; var arcRadius=d[0].outer; var svg = d3.select("svg").append("g") .attr("transform", "translate(" + width / 4 + "," + height / 2 + ")"); var smallCircles = svg.selectAll("circle").data(d).enter().append("circle") .attr("fill","black") .attr("cx",0) .attr("cy",-arcRadius) .attr("r",4) .attr("transform", function(d) { return "rotate(" + (((d.startAngle+d.endAngle)/2) * (180/Math.PI)) + ")"; }); } Best would be if someone could show me a function which gets the Arc-Radius and an Angle and returns (cx/cy). I would pre-calculate and store (cx/cy) in the "arcs-objects" and draw the circles and the lines out of those values. The "translate" transformation is not really my problem. Thank you!

http://stackoverflow.com/q/25211623
answer count: 1
tagged with: javascript
tagged with: ruby-on-rails-3
has title: Rails JSON request not reaching controller, most of the time
has comment: http://stackoverflow.com/comment/39266240
tagged with: ruby
has answer: http://stackoverflow.com/a/25212168
type: UnansweredQuestion
has body: I am having a hard time diagnosing the following problem. I have some server side tracking code, so we were passing a json request off to the controller when a download link is clicked. That triggers the server side tracking call. The below code worked fine in staging on Heroku in Chrome. However when we went to production (mt), we started getting some weird behavior. If you click the download once in Chrome, no tracking. If you click twice, it tracks the second click. If you use IE11, it works like expected, generating a tracking event. If you use Firefox, it never works for production or staging. We have played with a bunch of things with no results. Please help. Rails 3.2.19 and Ruby 2.1.0 Thing Controller def show authorize! :view, @thing, :message =&gt; "You do not have access to this thing. Is your subscription current?" respond_to do |format| format.html { track_event(current_user, "Viewed thing", {name: @thing.name}) } format.json do track_event(current_user, "Downloaded thing", {name: @thing.name}) render json: { :success =&gt; "success" } end end end Thing show view &lt;div class="thing_label" data-container="&lt;%= thing.name.parameterize %&gt;-thing"&gt; &lt;% if !thing.zip_file.blank? %&gt; &lt;%= link_to (image_tag "cloud.png", height:'30', width:'30', :style =&gt; "vertical-align:top"), thing.zip_file, class: 'js-download-thing', title: "Download Thing", rel:"tooltip", data: {toggle:"tooltip", placement:"top", title:"Download Thing", thing_id: thing.id} %&gt; &amp;nbsp;&amp;nbsp; &lt;% end %&gt; &lt;%= thing.name.upcase %&gt; &lt;/div&gt; Application layout &lt;/div&gt; &lt;/main&gt; &lt;%= render 'layouts/tracking' %&gt; &lt;/body&gt; &lt;/html&gt; Tracking partial &lt;script&gt; $(function(){ $('.js-download-thing').click(function(){ thing_id = $(this).data("thing-id") url = "&lt;%= things_path %&gt;/" + thing_id + ".json"; $.get(url); }) }) &lt;/script&gt;
tagged with: ruby-on-rails
tagged with: http://stackoverflow.com/tag/json
type: Question
score: 0

http://stackoverflow.com/q/25092095
has title: Trigger click event in a loop
type: Question
has comment: http://stackoverflow.com/comment/39043837
has body: I am writing a bookmarklet to gather information from my Indiegala bundles I bought. Instead of gifting the whole bundle I am gifting onesies and twosies at a time so having the individual gift urls makes it easier. Before they had it so the key was there and I could just gather it with a simple selector, now they have a little image you have to click on to get the gift url for each steam/desura game. I would like to, in a loop, click all of these gift images to get the gift url to appear and then loop through and get those gift urls. I wrote this: var gifts = $('#icon-gift img'); for(var j=0; j &lt; gifts.length-1; j++){ gifts[j].click(); } to loop through all the images and trigger the click so the gift url will appear. I know it goes through each of the images because it logs to the console so I know it isn't getting stuck but for some reason it ONLY clicks the first image available. After you click an image (thankfully) it is clicked forever and when I refresh it only has the gift url then if I run the loop again it does the very next one (but that defeats the purpose of doing it in a script). I have tried adding a delay(500) and even delay(1500) appended to the click() but that doesn't seem to change anything. My question is: does anyone know why this would happen and is there any advice on how to fix or get around this? More thoughts and info I think it has something to do with asynchronicity. It's like the rest of the loop does everything else except for the other click event. I tried: var gifts = $('#icon-gift img'); $.each(gifts, function(i, val){ setTimeout(function(){ val.click(); val.remove(); }, 1000); }); and it still only does the first one and removes all the other images. If i manually go through gifts[0].remove(); then gifts[0].click(); it does the very next one. This is exactly what I thought the .each() or a for loop would do, but it seems like it can't execute the next click with the previous one still being executed or still present.
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39045540
has answer: http://stackoverflow.com/a/25092198
score: 0
has comment: http://stackoverflow.com/comment/39043871
accepted answer: http://stackoverflow.com/a/25092198
type: AnsweredQuestion

http://stackoverflow.com/q/25148743
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39149440
tagged with: addition
has body: I'm a newbie so i hope my question will have some logic :) i wish to add a class "active" to "li" (in this case a portfolio filter item in the page) by clicking on a link from the nav menu. the "li" is not a part of the nav menu, how do i assign a "li" with a class if the "li" is in the deep tree - it's a whole different part of my site. the "li" is in: &lt;div class=""section" &lt;ul id="portfolio-filter" class="list-inline"&gt; &lt;li &lt;--- the place i wish the "active" be added i have checked other question but couldn't figure out how to implement the specific need. thanks for the help
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25148971
has title: add class to li by clicking on a link from nav menu
tagged with: class
score: 0
has comment: http://stackoverflow.com/comment/39201080
answer count: 2
has answer: http://stackoverflow.com/a/25148888
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25085285
tagged with: node.js
has answer: http://stackoverflow.com/a/25085429
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39031255
answer count: 2
has title: Asynchronous for loop: how do I make the for loop wait for function to finish?
has answer: http://stackoverflow.com/a/25085684
tagged with: javascript
has body: I'm racking my brain trying to figure out how to sequence this / place callbacks to get what I need. I have a loop that checks for the existence of files. I'd like it to callback when it's done, but the for loop and the callback finish before the "fs.open" finishes... typical asynchronous problem. I am using node v0.10.29, express v3.14.0, and am looking at using the "async" library, but again, just can't figure out the logic that I need... Here is what I have: Input function checkForAllFiles(callback) { var requiredFiles = []; requiredFiles[requiredFiles.length] = "../Client/database/one.js"; requiredFiles[requiredFiles.length] = "../Client/database/two.dat"; requiredFiles[requiredFiles.length] = "../Client/database/three.xml"; requiredFiles[requiredFiles.length] = "../Client/database/four.dat"; requiredFiles[requiredFiles.length] = "../Client/database/five.dat"; requiredFiles[requiredFiles.length] = "../Client/database/six.xml"; var missingFiles = []; for(var r=0; r&lt;requiredFiles.length; r++) { fs.open(requiredFiles[r], 'r', function(err, fd){ if(err) { missingFiles[missingFiles.length] = err.path; console.log("found missing file = ", err.path); } }); console.log("r = ", r); } console.log("sending callback: ", missingFiles); callback(missingFiles); } Output 0 1 2 3 4 5 sending callback: [] found missing file: ../Client/database/three.xml Desired Output 0 1 found missing file: ../Client/database/three.xml 2 3 4 5 sending callback: ["../Client/database/three.xml"]
score: 0
has comment: http://stackoverflow.com/comment/39037713
tagged with: asynchronous
favorite count: 0
accepted answer: http://stackoverflow.com/a/25085684
upvote count: 1
possible better answer: http://stackoverflow.com/a/25085429
downvote count: 1

http://stackoverflow.com/a/25216924
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39276431
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39276664
has body: Here is the very simple implementation using js var getfruits = [1, 2, 2, 3, 1, 3]; var uniq = []; for (var i = 0; i &lt; getfruits.length; i++) { if(uniq.indexOf(getfruits[i])==-1) uniq.push(getfruits[i]); }; console.log(uniq); And you have to just add lo-dash in your fiddle. FIXED FIDDLE WITH LO-DASH
has comment: http://stackoverflow.com/comment/39276947
accepted answer of: http://stackoverflow.com/q/25216885
has comment: http://stackoverflow.com/comment/39276782
answers question: http://stackoverflow.com/q/25216885
type: AcceptedAnswer

http://stackoverflow.com/comment/39068828
type: Comment
type: QuestionComment
has text: how many unique values are input by the user - basically how many of the text inputs are unique. If its easier, just answer that question and ignore the rest.
comment on: http://stackoverflow.com/q/25105517
score: 0

http://stackoverflow.com/comment/39006340
has text: @MarcoBonelli - I did the variant `sessionStorage` and closed the TAB (not the whole browser) and when ran this in NEW tab, it worked again (1 time) ... reloading the tab - popup did not open - so I guess reloading preserves the session. Great help - thank you very much!!!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25070971
type: Comment

http://stackoverflow.com/comment/39015406
has text: add a fiddle that will be helpful.
comment on: http://stackoverflow.com/q/25077169
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25126374
answers question: http://stackoverflow.com/q/25114242
type: Answer
has body: The reason for this in 3.0.6 is that it is all about publish and subscribe. This means that a messages will only be sent to client with a subscription for the topic on the server. In the sample you have provided it looks like you have only one client. This client will not receive his own "notify" message since the binding xs.on("notify",callback); is not bound on the server when the OnOpen happens... So the client connecting will not get info about his own connection. There are several ways around this... 1 Do not notify about the connection until you have bound the notify. This is done by adding a third callback to the binding. That callback will be triggered when the subscription is bound on the server. Like this xs.on('notify', function(d){console.log('a connection was established')}, function(){console.log('the server has confirmed the notify subscription')}); You would call a servermethod inside the first callback to notify others... 2 Do the binding on the server before sending the information, probably a smother option. void OnConnectionOpened(object sender, OnClientConnectArgs e) { //Add the subscription this.Subscribe(new XSubscriptions{Event = "notify",Alias = this.Alias}); // Notify everyone of the new client. this.SendToAll("New client. Called right from OnConnectionOpened.", "notify"); } 3 Use XSockets.NET 4.0 BETA that has improved communication and allows RPC or Pub/Sub. In 4.0 you would do like this in teh OnOpen event //Send the message to all clients regardless of subscriptions or not... this.InvokeToAll("New client. Called right from OnConnectionOpened.", "notify"); //Client side JavaScript xs.controller('NotificationsController').on('notify', function(data){ console.log(data); }); //Client side C# xs.Controller("NotificationsController").On&lt;string&gt;('notify', s =&gt; Console.WriteLine(s)); 4.0 has lots of other important improvements... You can read here is you are interested in 4.0 http://xsockets.github.io/XSockets.NET-4.0/ //Can be typos …
score: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25114242
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25165305
has comment: http://stackoverflow.com/comment/39180092
has title: How do I convert this piece of javascript code to coffeescript code
type: Question
tagged with: javascript
score: -1
answer count: 2
downvote count: 1
favorite count: 0
has body: What would following code look like in coffeescript?
has answer: http://stackoverflow.com/a/25165329
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25171206
upvote count: 0
tagged with: coffeescript

http://stackoverflow.com/comment/39363066
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25139600
score: 0
has text: I hear there's a neat video element in HTML 5!

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

http://stackoverflow.com/comment/39096669
type: Comment
score: 1
has text: If I comment out /*-webkit-filter: drop-shadow(0 0 3px black);*/ from the .colorPicker rule, it works OK for me in Chrome.
comment on: http://stackoverflow.com/q/25118894
type: QuestionComment

http://stackoverflow.com/comment/39205117
score: 0
type: Comment
has text: also in addition to the code above style the added class via css
type: AnswerComment
comment on: http://stackoverflow.com/a/25179209

http://stackoverflow.com/q/25151465
favorite count: 0
tagged with: ajax
tagged with: angularjs
upvote count: 2
has title: Angular: Passing data back to my controller from a factory ajax call
has answer: http://stackoverflow.com/a/25152483
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/26808715
has answer: http://stackoverflow.com/a/25151620
tagged with: http
type: Question
possible better answer: http://stackoverflow.com/a/26808715
has comment: http://stackoverflow.com/comment/39154435
tagged with: javascript
has body: I've been playing with Angular and I've moved from working with local data (which seems to work fine) to trying to populate my view from an ajax call in my factory. Here's the code: Get data using a Factory [{{$index + 1}}] {{person.name}} - {{person.age}} Everything seems okay, I can see the json data in my console log, but "return family" doesn't get the data to $scope.family What am I missing? I know it has to be something simple. Thanks!
accepted answer: http://stackoverflow.com/a/25151620
answer count: 3
downvote count: 0
tagged with: jquery

http://stackoverflow.com/comment/39147232
has text: The deplay is because the video needs to load. And you could use .canPlayType to check for support and then modify the url accordingly.
type: Comment
comment on: http://stackoverflow.com/a/25147186
score: 0
type: AnswerComment

http://stackoverflow.com/a/25085538
has comment: http://stackoverflow.com/comment/46459575
answers question: http://stackoverflow.com/q/25083564
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/68757149
upvote count: 62
has comment: http://stackoverflow.com/comment/39105780
has comment: http://stackoverflow.com/comment/39204367
type: Answer
has comment: http://stackoverflow.com/comment/47742776
has comment: http://stackoverflow.com/comment/46461859
downvote count: 0
has comment: http://stackoverflow.com/comment/47761885
has body: Yes, there is. 1) query is like GET parameters, so replace "param:value" with "param=value" (if you want to pass multiple parameters, do it as you usually do with URL: param=value&amp;some_other_param=test) 2) There is an easier and more reliable (because there is no risk to access an undefined property of handshaken object) way to get query parameter inside connection handler: console.log(socket.handshake.query.param); Edit: After learning your full code I guess I figured out what causes the problem. The problem is that you probably misunderstood the main idea of Socket.IO namespaces. I guess you have multiple Socket.IO connections (io.connect calls) within one page, right? Usually a single connection is enough. Your mistake is that you call io.connect on mouse event, but you should call in once on document.ready, and then just emitting. Take a look at the following code (client side): $(document).ready(function() { var socket = io.connect('', {query: 'name=something'}); // [...] socket.on('some_event_from_server', function(data, cb) {}); // [...] $('#someButton').click(function() { socket.emit('markers_add', {some: 'data'}); //send `markers_add` message to server within main namespace }); $('#someOtherButton').click(function() { socket.emit('icon_sets_add', {some: 'thing'}, function(response) { //server may response to this request. see server side code below }); }); }); Server side code: io.on('connection', function(socket) { //connection handler of main namespace socket.on('markers_add', function(data) { /* ... */ }); socket.on('icon_sets_add', function(data, cb) { // do something cb({some: 'response'}); }); // [...] socket.emit('some_event_from_server', {}); //server sends a message to a client //BTW, now it should be OK: console.log(socket.handshake.query.name); }); If you have one namespace it should work. I don't know actually if it was a bug of Socket.IO or a result of improper usage of namespaces, but modifying code to make just one namespace should do the…
has comment: http://stackoverflow.com/comment/113312839
score: 62
accepted answer of: http://stackoverflow.com/q/25083564

http://stackoverflow.com/q/25142830
tagged with: javascript
has comment: http://stackoverflow.com/comment/39142507
tagged with: http://stackoverflow.com/tag/html
has body: I have my knockout page hub, and I need a ko.obeservableArray nested in a ko.observable object, this is where I define them: function IncomeDeclarationHub() { //data comes from a ajax call. self.myIncomeDeclarationViewModel = ko.observable(new IncomeDeclarationViewModel(data)); } function IncomeDeclarationViewModel(data) { var self = this; self.retentionAmount = ko.observable(); self.taxableMonth = ko.observable(); self.incDecDetGroViewModels = ko.observableArray(); if (data != null) { var arrayLenght = data.IncDecDetGroViewModels.length; for (var i = 0; i &lt; arrayLenght; i++) { var myObject = new IncomeDecDetGroViewModel(data.IncDecDetGroViewModels[i]); self.incDecDetGroViewModels.push(myObject); } } } And this is my HTML code: &lt;span class="label"&gt; Retention Amount &lt;/span&gt; &lt;input data-bind="value: myIncomeDeclarationViewModel.retentionAmount" /&gt; &lt;table&gt; &lt;tbody data-bind="foreach: myIncomeDeclarationViewModel.incDecDetGroViewModels"&gt; ... &lt;/tbody&gt; &lt;/table&gt; Ok so the thing is that incDecDetGroViewModels never gets populated, I used to have that ko.obersableArray outside the object, and it worked fine, now that I inserted it in my object myIncomeDeclarationViewModel is not populating the html table. Do I need to call it in a different way at the data-bind
has answer: http://stackoverflow.com/a/25145033
tagged with: knockout.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39226091
possible better answer: http://stackoverflow.com/a/25143079
has title: How to bind a ko.obersavableArray that is nested in an object
has answer: http://stackoverflow.com/a/25143079
has comment: http://stackoverflow.com/comment/39255882
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25145033

http://stackoverflow.com/a/35393125
has body: Just crop the string: var date = new Date("2013-03-10T02:00:00Z"); date.toISOString().substring(0, 10); Or if you need only date out of string. var strDate = "2013-03-10T02:00:00Z"; strDate.substring(0, 10);
has comment: http://stackoverflow.com/comment/126717666
has comment: http://stackoverflow.com/comment/72682531
has comment: http://stackoverflow.com/comment/102064877
has comment: http://stackoverflow.com/comment/111741383
type: Answer
upvote count: 272
answers question: http://stackoverflow.com/q/25159330
has comment: http://stackoverflow.com/comment/106052046
has comment: http://stackoverflow.com/comment/102165238
score: 263
has comment: http://stackoverflow.com/comment/97732607
has comment: http://stackoverflow.com/comment/80369577
downvote count: 9

http://stackoverflow.com/comment/39229526
type: QuestionComment
comment on: http://stackoverflow.com/q/25191944
has text: A great way to send data (some or lots) from Javascript to PHP is in a JSON encoded object. Why not just dump your entire localStorage into a JSON object, use AJAX to send that to PHP then use PHP to `json_decode()` the object? In answer to your question on how to access it in PHP, you'd use either `$_GET['var_name']` or `$_POST[]` depending on the HTTP method you use. Beyond this, you'll need to provide some examples of what you've tried for us to help further.
score: 0
type: Comment

http://stackoverflow.com/q/25116668
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25134853
tagged with: state
answer count: 1
tagged with: extjs
has answer: http://stackoverflow.com/a/25134853
has body: I'm making a custom stateProvider and I want to save some extra stuff for my panels' state. I read that in order to do that, what you have to do is override the getState() function of your panel class but make sure to call the superclass method. I tried something like this: initComponent: function () { Ext.apply(this, { getState: function() { this.superclass.getState.call(); return { col: this.up().id, row: this.row, hidden: this.isHidden() }; } }); this.callParent(arguments) } but it doesn't seem to work. I'm confused as to how I must apply the superclass method... The docs say the following about a component's getState() method: Subclasses which implement more complex state should call the superclass's implementation, and apply their state to the result if this basic state is to be saved. Any ideas where I'm wrong?
has title: Overriding getState in ExtJS
type: Question
tagged with: superclass
type: AnsweredQuestion
tagged with: overriding

http://stackoverflow.com/a/25228005
type: Answer
score: 2
has body: The easiest way to manipulate JSON is to parse it into objects, manipulate the objects and then create JSON from the objects: var o = JSON.parse(json); var o2 = { uhash: o.uhash }; delete o.uhash; var json1 = JSON.stringify(o); var json2 = JSON.stringify(o2); Note: The JSON object is not supported in older browers, e.g. IE 7.
upvote count: 2
answers question: http://stackoverflow.com/q/25227901
accepted answer of: http://stackoverflow.com/q/25227901
has comment: http://stackoverflow.com/comment/39296858
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25136925
has body: Here you go (function($) { $.fn.countdown = function(options) { // default options var defaults = { attrName : 'data-diff', tmpl : '%{h}%{m}minutes%{s}seconds', end : 'has ended', afterEnd : null }; options = $.extend(defaults, options); // trim zero function trimZero(str) { return parseInt(str.replace(/^0/g, '')); } // convert string to time function getDiffTime(str) { var m; if ((m = /^(\d{4})[^\d]+(\d{1,2})[^\d]+(\d{1,2})\s+(\d{2})[^\d]+(\d{1,2})[^\d]+(\d{1,2})$/.exec(str))) { var year = trimZero(m[1]), month = trimZero(m[2]) - 1, day = trimZero(m[3]), hour = trimZero(m[4]), minute = trimZero(m[5]), second = trimZero(m[6]); return Math.floor((new Date(year, month, day, hour, minute, second).getTime() - new Date().getTime()) / 1000); } return parseInt(str); } // format time function format(diff) { var tmpl = options.tmpl, day, hour, minute, second; day = /%\{d\}/.test(tmpl) ? Math.floor(diff / 86400) : 0; hour = Math.floor((diff - day * 86400) / 3600); minute = Math.floor((diff - day * 86400 - hour * 3600) / 60); second = diff - day * 86400 - hour * 3600 - minute * 60; day = ("00" + day).substr(-2); hour = ("00" + hour).substr(-2); minute = ("00" + minute).substr(-2); second = ("00" + second).substr(-2); tmpl = tmpl.replace(/%\{d\}/ig, day) .replace(/%\{h\}/ig, hour) .replace(/%\{m\}/ig, minute) .replace(/%\{s\}/ig, second); return tmpl; } // main return this.each(function() { var el = this, diff = getDiffTime($(el).attr(options.attrName)); function update() { if (diff < 0) { if (options.afterEnd) { options.afterEnd(); } return; } $(el).html(format(diff)); setTimeout(function() { diff--; update(); }, 1000); } update(); }); }; })(jQuery); $(function() { $('.J_countdown2').countdown({ tmpl : '%{d}days%{h}hours%{m}minutes%{s}seconds' }); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25136859
type: Answer
answers question: http://stackoverflow.com/q/25136859
score: 1
has comment: http://stackoverflow.com/comment/39126788
upvote count: 1
has comment: http://stackoverflow.com/comment/39126742

http://stackoverflow.com/a/25148966
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25148309
has comment: http://stackoverflow.com/comment/39149844
has body: You should take a look at the jQuery ".post" method documentation. http://api.jquery.com/jquery.post/

http://stackoverflow.com/q/25088751
type: Question
has title: Before firing AJAX event, manipulate DOM -- CSRF Error
tagged with: csrf
tagged with: javascript
tagged with: jquery
has body: I'm working with Django, trying to make a chained AJAX call -- that is, a call that, when returned, kicks off more AJAX calls. I've been over the various methods of dealing with CSRF tokens and AJAX that the Django documentation provides, to no avail. I have working code that allows for this chained AJAX call to successfully go through: frm.submit(function(e){ $.ajax({ type: frm.attr('method'), url: frm.attr('action'), data: frm.serialize(), headers: {'X-CSRFToken':csrftoken}, success: function(data, status){ $('#queue_div').append(" "+data['group_name']+"- "+data['client']+" "); var div_id = 'queue'+counter; data['div_id'] = div_id; var token = $.cookie('csrftoken'); data['csrf'] = token; $('#'+div_id).html(data['status']); callbackAJAX(data); } //end success function }); //end ajax function e.preventDefault(); But when you delay the form event from firing the AJAX event right away, either by using "beforeSend" (as below): var data = {'group_name':'name', 'client':'MrClient'} var counter = 0 frm.submit(function(e){ $.ajax({ type: frm.attr('method'), url: frm.attr('action'), data: frm.serialize(), headers: {'X-CSRFToken':csrftoken} beforeSend:function(e){ $('#foo').append(' "+data['group_name']+"- "+data['client']+" '); } ..... or by adding an event right before the $.ajax call (as below): frm.submit(function(e){ $('#foo').append(' "+data['group_name']+"- "+data['client']+" '); $.ajax({ type: frm.attr('method').... You get a CSRF error. I was successful in doing very, very simple functions such as the following: var counter = 0; frm.submit(function(e){ $.ajax({ type: frm.attr('method'), sendBefore: function(e){ counter++; } But that's it. Anything more complicated gets rejected. I'm thoroughly confused as how to make heads or tails of what is actually happening OR what is acceptable to Django. & its CSRF protection.
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25088873
type: UnansweredQuestion
tagged with: django

http://stackoverflow.com/q/25190791
tagged with: bukkit
upvote count: 1
has answer: http://stackoverflow.com/a/25190814
type: Question
has body: I am trying to create a Bukkit plugin and I keep getting an ArrayIndexOutOfBounds exception when I try to check if an argument exists. Here is what I have tried if(args[4].equals(null)) Why is this happening?
tagged with: minecraft
tagged with: javascript
downvote count: 4
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -3
has title: Bukkit ArrayIndexOutOfBoundsException on Checking for an Argument
has comment: http://stackoverflow.com/comment/39228413
tagged with: java
tagged with: indexoutofboundsexception

http://stackoverflow.com/comment/39198973
type: Comment
has text: it gives an infinite loop ..:/
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25175634

http://stackoverflow.com/q/25143059
tagged with: coldfusion
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39138354
upvote count: 3
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25144470
has comment: http://stackoverflow.com/comment/39139465
tagged with: javascript
has comment: http://stackoverflow.com/comment/39138280
has comment: http://stackoverflow.com/comment/39138406
answer count: 2
possible better answer: http://stackoverflow.com/a/25144314
has answer: http://stackoverflow.com/a/25144314
accepted answer: http://stackoverflow.com/a/25144470
has body: I can build all sorts of web applications with common web technologies on both the client and server (JavaScript, PHP, CFML, etc.). I would like to build some home automation tools and I have no idea how to get from the strictly digital world to the physical world. Let's say I want a super simple web app to display a bunch of switches in the user interface for some different things in my house. Let's say I'm using X10 hardware (http://www.x10.com/x10-basics.html) that is "listening" for some radio signal. Is there a way to use web technology to "instruct" my devices (smartphone, tablet, laptop, whatever) to "broadcast signals" to these X10 (or any) physical device in order to make my home more Jetsons-like? It seems like JavaScript couldn't do any of this because of security stuff, but perhaps a server app running on my local device on my home network could tie into some underlying OS library and do this? wirelessService = new system.os.superCoolWirelessBroadcasterService(); wirelessService.broadcastSignal("6520 mghz", true); // toaster frequency
favorite count: 0
has comment: http://stackoverflow.com/comment/39138574
has title: Is it possible to build a home automation system with web technology?
has comment: http://stackoverflow.com/comment/39138421
tagged with: php

http://stackoverflow.com/comment/39086871
comment on: http://stackoverflow.com/q/25112986
type: Comment
type: QuestionComment
score: 1
has text: *"but the server I'm sending this to cannot parse it"* - Fix the server, or stop sending it XML. Obviously it cannot deal with XML, and that's a problem you won't solve with using CDATA.

http://stackoverflow.com/a/25102488
score: 0
has body: Layout The problem is likely due to you including the javascript directly in your application layout. You're using an anonymous function (notorious for not working correctly on Rails), and then binding to the body's on-load event. You'll be much better using [unobtrusive] javascript2 &amp; putting the code into your /app/assets/javascripts/application.js file: #app/assets/javascripts/application.js //require rainyday/dist/rainyday.0.1.1.min.js var make_it_rain = function() { var engine = new RainyDay('canvas', 'background', window.innerWidth, window.innerHeight); engine.gravity = engine.GRAVITY_NON_LINEAR; engine.trail = engine.TRAIL_DROPS; engine.VARIABLE_GRAVITY_ANGLE = Math.PI / 8; engine.rain([ engine.preset(0, 2, 0.5), engine.preset(4, 4, 1) ], 50); }; $(document).on("page:load ready", make_it_rain); This should get things working, if your rain plugin is working correctly. I would go into more detail about how to better structure your application, but that would be better for another answer I think
answers question: http://stackoverflow.com/q/25102135
type: Answer

http://stackoverflow.com/comment/39150849
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25149388
has text: +1 @Oliboy50 that sounds a much more sensible answer than mine!
score: 0

http://stackoverflow.com/comment/39004361
comment on: http://stackoverflow.com/q/25070945
type: Comment
type: QuestionComment
has text: Can you please format properly your code? indentation and so on?
score: 0

http://stackoverflow.com/q/25142358
has body: I’m trying to upload files using JS. My first step is to select the files to upload, this works fine. Then I checked if the file/s in the input tag are present With The following console command (using chrome version36.0.1985.125 m) : document.getElementById("InputfileSelection").files.item(1).name "image02.JPG" At this point everything works fine. The only issue is that if I try to change the name of the file, it won’t work. How come? document.getElementById("InputfileSelection").files.item(1).name="NEW NAME"; "NEW NAME" The next step show that the name hasn’t changed: document.getElementById("InputfileSelection").files.item(1).name "image02.JPG"
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25142437
type: Question
tagged with: upload
tagged with: javascript
tagged with: rename
has title: Input FileUpload object in Java Script: can’t change the name of the selected file
score: 0
answer count: 1
tagged with: file-upload
has answer: http://stackoverflow.com/a/25142437
tagged with: input

http://stackoverflow.com/comment/39272750
comment on: http://stackoverflow.com/a/25215021
score: 0
type: AnswerComment
has text: Okey, thank you ! (btw it's 18 not 17 in the link :-))
type: Comment

ajax
tags question: http://stackoverflow.com/q/25104572
tags question: http://stackoverflow.com/q/25185129
tags question: http://stackoverflow.com/q/25216956
tags question: http://stackoverflow.com/q/25218252
tags question: http://stackoverflow.com/q/25134538
tags question: http://stackoverflow.com/q/25162155
tags question: http://stackoverflow.com/q/25183614
tags question: http://stackoverflow.com/q/25077554
tags question: http://stackoverflow.com/q/25177698
tags question: http://stackoverflow.com/q/25169952
tags question: http://stackoverflow.com/q/25199714
tags question: http://stackoverflow.com/q/25080627
tags question: http://stackoverflow.com/q/25097339
tags question: http://stackoverflow.com/q/25220456
tags question: http://stackoverflow.com/q/25198497
tags question: http://stackoverflow.com/q/25202310
tags question: http://stackoverflow.com/q/25080040
tags question: http://stackoverflow.com/q/25201761
tags question: http://stackoverflow.com/q/25214348
tags question: http://stackoverflow.com/q/25129167
tags question: http://stackoverflow.com/q/25189041
tags question: http://stackoverflow.com/q/25173928
tags question: http://stackoverflow.com/q/25157004
tags question: http://stackoverflow.com/q/25130599
tags question: http://stackoverflow.com/q/25217344
tags question: http://stackoverflow.com/q/25157940
tags question: http://stackoverflow.com/q/25133443
tags question: http://stackoverflow.com/q/25192274
tags question: http://stackoverflow.com/q/25095825
tags question: http://stackoverflow.com/q/25157552
tags question: http://stackoverflow.com/q/25136416
tags question: http://stackoverflow.com/q/25107601
tags question: http://stackoverflow.com/q/25129955
tags question: http://stackoverflow.com/q/25075747
tags question: http://stackoverflow.com/q/25185750
tags question: http://stackoverflow.com/q/25144648
tags question: http://stackoverflow.com/q/25194600
tags question: http://stackoverflow.com/q/25217831
tags question: http://stackoverflow.com/q/25219331
tags question: http://stackoverflow.com/q/25201312
tags question: http://stackoverflow.com/q/25173488
tags question: http://stackoverflow.com/q/25229971
tags question: http://stackoverflow.com/q/25093586
tags question: http://stackoverflow.com/q/25166603
tags question: http://stackoverflow.com/q/25078809
tags question: http://stackoverflow.com/q/25102546
tags question: http://stackoverflow.com/q/25218709
tags question: http://stackoverflow.com/q/25081776
tags question: http://stackoverflow.com/q/25173181
tags question: http://stackoverflow.com/q/25165615
tags question: http://stackoverflow.com/q/25164632
tags question: http://stackoverflow.com/q/25200743
tags question: http://stackoverflow.com/q/25199306
tags question: http://stackoverflow.com/q/25184440
tags question: http://stackoverflow.com/q/25129825
tags question: http://stackoverflow.com/q/25192697
tags question: http://stackoverflow.com/q/25084008
tags question: http://stackoverflow.com/q/25106035
tags question: http://stackoverflow.com/q/25191849
tags question: http://stackoverflow.com/q/25147782
tags question: http://stackoverflow.com/q/25072466
tags question: http://stackoverflow.com/q/25189349
tags question: http://stackoverflow.com/q/25118325
tags question: http://stackoverflow.com/q/25179373
tags question: http://stackoverflow.com/q/25228975
tags question: http://stackoverflow.com/q/25118799
tags question: http://stackoverflow.com/q/25102865
tags question: http://stackoverflow.com/q/25163006
tags question: http://stackoverflow.com/q/25142253
tags question: http://stackoverflow.com/q/25126722
type: Tag
tags question: http://stackoverflow.com/q/25090025
tags question: http://stackoverflow.com/q/25077103
tags question: http://stackoverflow.com/q/25158789
tags question: http://stackoverflow.com/q/25124229
tags question: http://stackoverflow.com/q/25128726
tags question: http://stackoverflow.com/q/25196495
tags question: http://stackoverflow.com/q/25187926
tags question: http://stackoverflow.com/q/25101441
tags question: http://stackoverflow.com/q/25094648

http://stackoverflow.com/comment/39302408
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25230182
type: AnswerComment
has text: Also, instead of calling `format()` on the return value of `JSON.parse()`, you can just pass it as its second argument.

http://stackoverflow.com/q/25176362
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39282121
has title: Carousel Managing State with JS and Animating with CSS
has answer: http://stackoverflow.com/a/25231231
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39282244
tagged with: http://stackoverflow.com/tag/html
answer count: 1
accepted answer: http://stackoverflow.com/a/25231231
tagged with: css
upvote count: 2
has body: This is my first attempt at trying to create a carousel with css3, not quite sure if i am doing it correctly, but its an attempt and This carousel will only show on mobile. As I Understand it, JavaScript should only really be used to manage state and then CSS3 to animate it, so i interpreted as basically swapping out classes with js and putting transitions on those classes with css3. My only real problem that i am aware of is the actual animation and state management, I need it to animate like a infinite/loop carousel, but for some reason i am just not getting it. Here's the JSFIDDLE DEMO Here's The HTML: Slide 1 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda cumque dignissimos perspiciatis voluptas voluptatem! Ad debitis dignissimos doloribus exercitationem natus officiis quod sit, vitae voluptate. Alias debitis delectus exercitationem quia. Slide 2 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda cumque dignissimos perspiciatis voluptas voluptatem! Ad debitis dignissimos doloribus exercitationem natus officiis quod sit, vitae voluptate. Alias debitis delectus exercitationem quia. Slide 3 Lorem ipsum dolor sit amet, consectetur adipisicing elit. Assumenda cumque dignissimos perspiciatis voluptas voluptatem! Ad debitis dignissimos doloribus exercitationem natus officiis quod sit, vitae voluptate. Alias debitis delectus exercitationem quia. Next Prev Here's The CSS: .mobile-carousel .carousel-navigate { display: none; } .mobile-carousel { position: relative; overflow: hidden; } .mobile-carousel .column { /*Start State*/ background: red; width: 100%; float: left; margin-left: 0; margin-right: 0; display: inline-block; opacity: 0; } .mobile-carousel .column.active { /*Idle State*/ opacity: 1; -moz-transition: all 0.3s; -o-transition: all 0.3s; -webkit-transition: all 0.3s; transition: all 0.3s; } .mobile-carousel .column.slide-in { /*Animate In*/ opacity: 1; -moz-transition: all 0.3s; -o-transition: all 0.3s; -webkit-transition: …
score: 2
has comment: http://stackoverflow.com/comment/39281855

http://stackoverflow.com/a/25174477
has comment: http://stackoverflow.com/comment/138818653
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25173973
upvote count: 5
has body: There are two ways to attach handlers to events: event capturing and event bubbling. They're two slightly different ways of handling events, and there isn't a "right" answer: in most cases you could use either one. But, that being said, event bubbling is the much more popular approach, which is why useCapture is almost always specified as false in examples. With modern browsers, useCapture is optional and defaults to false anyways, but for compatibility with older browsers, it's often specified explicitly anyways. You can read about the difference between capturing and bubbling here: What is event bubbling and capturing?
accepted answer of: http://stackoverflow.com/q/25173973
score: 5

http://stackoverflow.com/a/25166073
type: Answer
score: 1
has body: if you want to use loop, I thinkg the code will look like it. var Fruit = ['apple', 'bannanna', 'rasberry', 'watermelon', 'grape', 'orange']; $('#addFruit').on('click', function(e) { e.preventDefault(); var flag = true; var val = $('#fruitAdd').val(); for(var i = 0 ; i &lt; Fruits.length ; i ++){ if(Fruits[i] == val) flag = false; } if(flag) Fruits.push(val); });
upvote count: 1
answers question: http://stackoverflow.com/q/25165908
accepted answer of: http://stackoverflow.com/q/25165908
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25195687
answers question: http://stackoverflow.com/q/25195612
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39236336
downvote count: 0
has body: It seems like this is a bug in FirefoxOS. Try using a polyfill.
has comment: http://stackoverflow.com/comment/39236273
type: Answer

http://stackoverflow.com/comment/39262825
comment on: http://stackoverflow.com/q/25209834
score: 0
type: Comment
has text: @DRD There are cases where it doesn't make sense to use CSS. Are you suggesting creating a class called `.hidden` and applying that to the element? It won't solve the problem and it's also not very semantic.
type: QuestionComment

http://stackoverflow.com/comment/39190450
has text: @HamiltonLucas Would the where clause be set up the same as the one I've got in File One? "SELECT numInStock FROM SOISInventoryList WHERE id = $receivedString"
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25170506

http://stackoverflow.com/q/25116118
has title: datepicker doesn't work after load page using jquery
score: 0
has comment: http://stackoverflow.com/comment/39088316
answer count: 0
type: UnansweredQuestion
tagged with: datepicker
has comment: http://stackoverflow.com/comment/39088359
has comment: http://stackoverflow.com/comment/39088338
has comment: http://stackoverflow.com/comment/39088266
type: Question
has comment: http://stackoverflow.com/comment/39088423
has body: here is the my code,in my home page there is a button to load this page, it is done by using jquery $("#content").load(site_url); like this. but this date picker doesn't work
tagged with: javascript
has comment: http://stackoverflow.com/comment/39088221
tagged with: jquery

http://stackoverflow.com/a/25182872
score: 0
has comment: http://stackoverflow.com/comment/39212341
has comment: http://stackoverflow.com/comment/39212174
has comment: http://stackoverflow.com/comment/39212120
has comment: http://stackoverflow.com/comment/39212536
accepted answer of: http://stackoverflow.com/q/25182810
has comment: http://stackoverflow.com/comment/39212273
has comment: http://stackoverflow.com/comment/39211708
answers question: http://stackoverflow.com/q/25182810
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39212236
has comment: http://stackoverflow.com/comment/39212075
has comment: http://stackoverflow.com/comment/39212473
has body: Since your a argument is referencing the &lt;tr&gt; being clicked, by using a.parentNode.parentNode you're actually changing the backgroundColor of the table. Try this instead: function visited(tr) { tr.style.backgroundColor = "red"; } As per your edit, try this: function visited(tr) { var table = tr.parentNode.parentNode; var trs = table.getElementsByTagName('tr'); for (var i = 0; i &lt; trs.length; i++) { trs[i].style.backgroundColor = null; trs[i].style.color = null; } tr.style.backgroundColor = '#000'; tr.style.color = '#fff'; }
type: Answer
has comment: http://stackoverflow.com/comment/39212053

http://stackoverflow.com/a/25198686
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39241912
has comment: http://stackoverflow.com/comment/39241858
answers question: http://stackoverflow.com/q/25198655
downvote count: 0
has body: true is a string here: var prop = 'true'; Should be var prop = true;
type: Answer

http://stackoverflow.com/comment/39096383
score: 0
type: Comment
type: QuestionComment
has text: Use a date/time library.
comment on: http://stackoverflow.com/q/25120412

http://stackoverflow.com/comment/39132950
type: Comment
comment on: http://stackoverflow.com/a/25130977
has text: @deceze What would you suggest? How about storing the public key in a cookie, and the private key in the document somewhere (similar to how a nonce can be generated inside a form).. . I can't believe there isn't a procedure for this out there, how does Facebook authenticate on-site requests to it's API?
type: AnswerComment
score: 0

http://stackoverflow.com/q/25072608
score: 0
has body: How do I set the text of an attr? Trying to set the values of meta tags description through it's content attr. &lt;title update-title&gt;&lt;/title&gt; &lt;meta name="description" update-description content=""&gt; I've created a simple 2 directive: the first one works: This sets the title tag app.directive('updateTitle', function($rootScope) { return { link: function(scope, element) { var listener = function(event, toState, toParams, fromState, fromParams) { var title = 'Default Title'; if (toState.data &amp;&amp; toState.data.pageTitle) { title = toState.data.pageTitle; } element.text(title) }; $rootScope.$on('$stateChangeStart', listener); } } }) this one doesn't work: Getting a TypeError because of .text() app.directive('updateDescription', function($rootScope) { return { link: function(scope, element, attr) { var listener = function(event, toState, toParams, fromState, fromParams) { var desc = 'Default Description'; console.log(toState.data); if (toState.data &amp;&amp; toState.data.description) { desc = toState.data.description; } //getting a type error because i cant set the .text() of an attr. attr.content.text(desc); }; $rootScope.$on('$stateChangeStart', listener); } } }) Route: .state('root.app.work', { url: 'work', data: { pageTitle: 'work', description: 'work desc' } })
answer count: 1
tagged with: angularjs
has answer: http://stackoverflow.com/a/25072659
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25072659
tagged with: angularjs-directive
tagged with: angular-ui-router
has title: Set an element's attribute text/value through an angular directive?
tagged with: javascript

http://stackoverflow.com/q/25218896
has comment: http://stackoverflow.com/comment/39280067
has comment: http://stackoverflow.com/comment/39280448
has answer: http://stackoverflow.com/a/25219156
accepted answer: http://stackoverflow.com/a/25219156
type: Question
linked to: http://stackoverflow.com/q/25217933
tagged with: angularjs-directive
tagged with: angular-strap
has comment: http://stackoverflow.com/comment/39280254
has comment: http://stackoverflow.com/comment/39280262
has comment: http://stackoverflow.com/comment/39280051
linked to: http://stackoverflow.com/q/22020775
has comment: http://stackoverflow.com/comment/39280149
tagged with: javascript
tagged with: jquery
upvote count: 1
has body: I am trying to make popover using Angularstap.js .I read documentation from here http://mgcrea.github.io/angular-strap/##popovers But my pop over not display on click can you tell me where I am doing wrong . here is my plunker http://plnkr.co/edit/Cp7wrpeh8SS4oY5GGRfY?p=preview getting error : Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite! See: Custom Popover
has comment: http://stackoverflow.com/comment/39280706
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39280414
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39280169
has comment: http://stackoverflow.com/comment/39280215
has comment: http://stackoverflow.com/comment/39280097
has comment: http://stackoverflow.com/comment/39280038
has title: how to remove this error (Looking up elements via selectors )
has comment: http://stackoverflow.com/comment/39280238
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39280124
downvote count: 0
has comment: http://stackoverflow.com/comment/39280034
score: 1

http://stackoverflow.com/comment/39044924
has text: I think really you would be looking at some sort of automated UI tool for this.
comment on: http://stackoverflow.com/q/25092641
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25146232
upvote count: 0
has comment: http://stackoverflow.com/comment/39144696
has title: adding a class to child then it effecting on parent element
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25147606
has comment: http://stackoverflow.com/comment/39144572
tagged with: javascript
tagged with: jquery
score: -1
has body: I want to add class in all element which on i hovers. but I am using the jquery code. but when i hover on any element class is automatically added in all parents can any one suggest that how can i add class in element which i actually hovered. my js code is $(AllTags).mouseover(function(e){ e.stopPropagation(); $(this).addClass('g-hovered'); }); $(AllTags).mouseenter(function(e){ e.stopPropagation(); $(this).removeClass('g-hovered'); }); var AllTags = "div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, big, cite, code,del, dfn, em, img, ins, kbd, q, s, samp,small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td,article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,time, mark, audio, video,article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section " I dont want to pass any specific class and tag.
answer count: 2
linked to: http://stackoverflow.com/q/17981405
has comment: http://stackoverflow.com/comment/39144919
has comment: http://stackoverflow.com/comment/39144763
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39144970
favorite count: 0
has answer: http://stackoverflow.com/a/25147606
has answer: http://stackoverflow.com/a/25146792
accepted answer: http://stackoverflow.com/a/25146792
type: AnsweredQuestion

http://stackoverflow.com/comment/39278446
score: 0
type: AnswerComment
has text: What's `obj`, why is `ob` global?
comment on: http://stackoverflow.com/a/25217790
type: Comment

http://stackoverflow.com/comment/39291780
comment on: http://stackoverflow.com/q/25225429
has text: If you are doing validation before submitting you wont be using JSON. You'd be checking the values via javascript then once validation is complete turn the data into json to send into your action.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39116676
score: 0
comment on: http://stackoverflow.com/q/25131200
type: Comment
type: QuestionComment
has text: Cross domain issue ([CORS](http://en.wikipedia.org/wiki/Cross-origin_resource_sharing))

http://stackoverflow.com/comment/39242516
comment on: http://stackoverflow.com/q/25198903
type: QuestionComment
has text: @BluAngel is there such feature in iOS? So if i'm viewing a webpage and clicking a textfield, the whole thing zooms into the textfield..? I've seen the keyboard pushing things up, but haven't seen this before.
score: 0
type: Comment

http://stackoverflow.com/comment/39261595
type: Comment
type: QuestionComment
has text: Shouldn't it be: Stats.prototype = new WS(); ?
comment on: http://stackoverflow.com/q/25209207
score: 0

http://stackoverflow.com/a/25120151
answers question: http://stackoverflow.com/q/25114717
has comment: http://stackoverflow.com/comment/39113052
type: Answer
has comment: http://stackoverflow.com/comment/39113067
has body: When you call res.send();, it's sending the literal value of whatever you pass to it. So in this case, you're sending the string 'my-image.png' to the client with Content-Type: image/png. To send the actual contents of my-image.png instead, you might look at using the res.sendfile() method.
score: 0

http://stackoverflow.com/q/25215555
has title: How to save an HTML5 canvas to a png
has body: I am trying to have a canvas be saved as an image so it can be put somewhere else on the website as an tag. I have seen approaches like this: var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); var strDataURI = canvas.toDataURL("image/png;base64"); document.write('&lt;img src="'+strDataURI+'"/&gt;'); But I am not sure how to implement it. I also would like a copy of the image to be saved as an actual file on the server as well but I am not sure where to start. When I implement the above code, I put it at the bottom of my canvas script like such: var finish = document.getElementID('finish'); finish.onclick = function() { var canvas = document.getElementById("canvas"); var context = canvas.getContext("2d"); var strDataURI = canvas.toDataURL("image/png;base64"); }; But I don't know how to actually reference the image. A little help for noob is all I need.
has answer: http://stackoverflow.com/a/25216933
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39274431
accepted answer: http://stackoverflow.com/a/25216933
linked to: http://stackoverflow.com/q/3906142
type: Question
tagged with: canvas
answer count: 1
tagged with: javascript
duplicate of: http://stackoverflow.com/q/3906142
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25119147
type: AnsweredQuestion
downvote count: 2
upvote count: 7
has answer: http://stackoverflow.com/a/25119191
has comment: http://stackoverflow.com/comment/39093996
type: Question
score: 5
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: This is one easy (I hope) question which is bugging me for years. How do you get element that fired event which triggered the ajax request? Here is an example: Click me $("#clickme").click(function(e){ var i_need_this=e.target; alert(i_need_this); //nice! $.ajax({ url:'http://echo.jsontest.com/', type: 'GET', success: function( data, status, jqXHR ) { alert('success'); //console.log( ??? ); Get i_need_this from somewhere? } }); }) Live: http://jsfiddle.net/8F3u2/ Thanks in advance!
accepted answer: http://stackoverflow.com/a/25119191
answer count: 1
has comment: http://stackoverflow.com/comment/39095084
has title: How can I get in 'clicked' element in jquery ajax success callback
has comment: http://stackoverflow.com/comment/39095175
favorite count: 0

http://stackoverflow.com/comment/39043893
type: Comment
score: 1
has text: Never do `2` and `3`. Never. (Well maybe in some cases you would use it but normally you don't and you shouldn't) If you use it and you don't know what you're doing you will get mysterious errors in your code.
type: QuestionComment
comment on: http://stackoverflow.com/q/25092112

http://stackoverflow.com/comment/39222150
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25187310
has text: are you meaning the php file path? Firebug shows a successful post with response message from the php file in question. Angular is just failing to pass it data values and catch the response message from it.
score: 0

http://stackoverflow.com/comment/39113240
score: 0
has text: I added all my code in my question , i want to make a function that is replace parameter from query
type: Comment
comment on: http://stackoverflow.com/a/25129060
type: AnswerComment

http://stackoverflow.com/comment/39180001
comment on: http://stackoverflow.com/q/25150070
score: 0
has text: Just a friendly reminder to upvote and "accept" (the green checkmark) an answer if you're satisfied with it.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25211393
possible better answer: http://stackoverflow.com/a/25211600
type: Question
linked to: http://stackoverflow.com/q/1827482
has answer: http://stackoverflow.com/a/25211600
has title: Find followers of an element in a certain scope, which aren't siblings
has body: I am trying to select all following elements of an element I choose. They don't necessarily have to be direct siblings of my chosen Element, so .nextAll() won't work. Here's an example: 1 2 3 4 NOT THIS My element is a[href="2"], so I want to select a[href="3"] and a[href="4"], but not a[href="x"] because it's not in my scope. I found this, but it only fetches one follower, but I need all of them. I just wrote this, which works great, but it seems odd to me and I am sure that there have to be better solutions than this one: var $two = $('a[href="2"]'); var selection = []; var comes_after_2 = false; $two.closest('.scope').find('a').each(function(){ console.log(this, $two.get(0)); if(comes_after_2){ selection.push(this); } if(this == $two.get(0)){ comes_after_2 = true; } }); $(selection).css('background', 'red'); Here is a Fiddle to test it: http://jsfiddle.net/mnff40fy/1/ Please feel free to modify it, if there's a better solution. Thank you!
tagged with: jquery-selectors
tagged with: javascript
has comment: http://stackoverflow.com/comment/39269674
tagged with: jquery
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39269595
has comment: http://stackoverflow.com/comment/39265887
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25211603
accepted answer: http://stackoverflow.com/a/25211603
has comment: http://stackoverflow.com/comment/39269565
has answer: http://stackoverflow.com/a/25211712

http://stackoverflow.com/comment/39072394
has text: no issue with that : use prime numbers instead of power of two and multiply instead of ORing. Two hashes are equal if their modulo is == 0.
comment on: http://stackoverflow.com/a/25106192
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25192736
type: Answer
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25129298
has body: I've come to the conclusion that what i'm trying to protect against here is CSRF.. I'm using laravel, so my solution was to add the csrf nonce (Session::token()) in the head as seen here. &lt;meta name="token" content="32947fh2834fgkhgfr8724234f"&gt; And send it along in the request header: $.ajaxSetup({ headers: { 'session_token': '32947fh2834fgkhgfr8724234f' } }); When authorising the api request it's a case of checking for the 'session_token' header and validating it's authenticity. If the session_token isn't there it'll fall back to the HMAC check. Coupled with ssl this should be enough, Thoughts?

http://stackoverflow.com/q/25094699
has body: Is it possible to get the url of the previous website page from another website domain using javascript, example: user have this website url in browser: www.example.com/page1.html then user cleared the browser address bar and wrote my website url: www.test.com What I need is using javascript to get the www.example.com/page1.html url. Is that possible?
tagged with: javascript
has answer: http://stackoverflow.com/a/25094754
answer count: 1
tagged with: cross-browser
accepted answer: http://stackoverflow.com/a/25094754
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/39048467
has title: how to get previous page URL, different domain name using javascript
type: Question

http://stackoverflow.com/a/25232781
has comment: http://stackoverflow.com/comment/39306537
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39306849
has comment: http://stackoverflow.com/comment/39306483
has body: Can you provide this live image so that we can test, or a working jsfiddle? Without further knowledge, I would guess it's because you're setting the same source. Can you try this instead: mtimer=setInterval(function(){ var video = $("#one_frame_per_second"); video.attr('poster', ''); video.attr('poster', 'http://ip.address/screensaver/now.jpeg'); },15);
upvote count: 2
answers question: http://stackoverflow.com/q/25128762

http://stackoverflow.com/q/25145229
has title: grid not working in all browsers
accepted answer: http://stackoverflow.com/a/25149968
answer count: 1
tagged with: dojo
has comment: http://stackoverflow.com/comment/39144797
score: 0
type: AnsweredQuestion
tagged with: jsp
tagged with: javascript
has answer: http://stackoverflow.com/a/25149968
type: Question
has body: I'm using dojo grid to show data, issue is latest data is not shown in the grid. Below is the sample code: home.jsp: dojo.ready(function(){ mystore=new dojo.data.ItemFileReadStore({url:"&lt;%=request.getContextPath()%&gt;/displayData.htm"}); }); Thanks.
has comment: http://stackoverflow.com/comment/39144770

http://stackoverflow.com/comment/39135995
score: 0
comment on: http://stackoverflow.com/q/25141599
has text: Mhhh but skew is not the same.
type: Comment
type: QuestionComment

mobile
tags question: http://stackoverflow.com/q/25111711
tags question: http://stackoverflow.com/q/25096042
tags question: http://stackoverflow.com/q/25094587
type: Tag
tags question: http://stackoverflow.com/q/25083041
tags question: http://stackoverflow.com/q/25213200
tags question: http://stackoverflow.com/q/25142974
tags question: http://stackoverflow.com/q/25184236
tag name: mobile
tags question: http://stackoverflow.com/q/25192287
tags question: http://stackoverflow.com/q/25130409

http://stackoverflow.com/a/25220216
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39282853
has comment: http://stackoverflow.com/comment/39282479
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25220050
has comment: http://stackoverflow.com/comment/39282800
has body: You should give an example with data specified, to make it clear what behavior you're expecting. From what you wrote, I'm supposing you're trying to use filter to select from the children of a div. It won't work, because filter selects from the objects in the current selection, it doesn't care what is inside those objects. So, if you have div#foo in your selection, it won't care about div#bar inside it. So, this works: $("#foo").filter("#foo").html() But it won't work $("#foo").filter("#bar").html() because div#bar is not in the selection from which you're trying to filter. It could work this way: $("#foo").children().filter("#bar").html() In case I misunderstood your question, I apologise, and will gladly update my answer.
answers question: http://stackoverflow.com/q/25220050

http://stackoverflow.com/q/25220312
answer count: 1
tagged with: .net
tagged with: javascript
has comment: http://stackoverflow.com/comment/39286184
tagged with: asp.net
has body: I have my business logic code stored in .ashx files. I send a POST request to create data, and a GET request to retrieve JSON data, when is then displayed in a page. My question is: How do I prevent Joe Nobody from directly calling my .ashx pages and creating a user, modifying data, retrieving data, etc. Does every .ashx page need some "login check"? Or is there a more site-wide way of accomplishing this? Thanks!
score: 0
has comment: http://stackoverflow.com/comment/39284329
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39282893
tagged with: c#
has title: Prevent external sites from accessing my ashx pages
has answer: http://stackoverflow.com/a/25222391
type: Question

http://stackoverflow.com/comment/39082989
has text: Possible duplicate of [Using this within functions called with onclick event in Javascript](http://stackoverflow.com/questions/21894118/using-this-within-functions-called-with-onclick-event-in-javascript)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25113015

http://stackoverflow.com/comment/39257755
score: 0
type: Comment
has text: But why do you keep adding it? If it's already there it's not added again, so it's not an issue at all, it just seemed a little strange.
comment on: http://stackoverflow.com/a/25206787
type: AnswerComment

http://stackoverflow.com/q/25079687
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25079805
score: 1
has body: Why this custom directive in angular js not working for me.I am only getting the user: but not getting the names of the user which I passed in the userinfo custom directive tag user_directive_index.html file: User Directive App.js file: var app1=angular.module('app',[]); app1.controller('firstcontroller',function($scope){ $scope.Raj={}; $scope.Raj.firstname='Rajeshwar'; $scope.Raj.lastname='Bose'; $scope.Sudhir={}; $scope.Sudhir.firstname='Sudhir'; $scope.Sudhir.lastname='Ranjan'; }); app1.directive('userinfo',function(){ var directive={}; directive.restrict='E'; directive.template='User:{{user.firstname}} {{user.lastname}}'; directive.scope={ user:"= user" }; return directive; }); I got this code from: http://tutorials.jenkov.com/angularjs/custom-directives.html
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Custom directive in angular js
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25079805
upvote count: 1
type: Question

http://stackoverflow.com/comment/39074226
comment on: http://stackoverflow.com/q/25108546
score: 1
has text: `$("#answer").append(answer);`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39092214
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25118087
has text: So is there a way to make it work?
score: 0

http://stackoverflow.com/a/25139816
upvote count: 3
has body: Admin API calls use your api_secret which should not be revealed in your client-side code. That's why Cloudinary doesn't support CORS headers for the Admin API. Therefore, Admin API calls should be performed on the server-side only.
type: AcceptedAnswer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/25118432
type: Answer
answers question: http://stackoverflow.com/q/25118432

http://stackoverflow.com/comment/39165508
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25156741
has text: have you check by giving the width of child table to 100% using css

http://stackoverflow.com/comment/39159610
type: QuestionComment
comment on: http://stackoverflow.com/q/25154464
has text: show us the complete code
score: 1
type: Comment

http://stackoverflow.com/comment/102793180
has text: @Kinrany I agree. There's no way this is too broad. The question arises from there not being a simple "drawCircle" command in the API. Instead we must do a peculiar set of steps involving `beginPath`, `arc`, `fill`, etc. And we must understand a circle is a special case of an arc, and what start and end angles are appropriate or optimal. It's also not clear whether it's necessary to call `closePath` That's all we're looking for with this question. This question shouldn't be closed for being too broad.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25095548
score: 3

http://stackoverflow.com/comment/39109679
score: 0
type: AnswerComment
has text: you can concat the array of ticks with another array, but it must be in a way that every cell in the ticks array contains an array of 2 cells, the first one is the axis value (int preferable) and the second one is the text (int/string preferable).
comment on: http://stackoverflow.com/a/25127278
type: Comment

http://stackoverflow.com/a/25177092
has comment: http://stackoverflow.com/comment/39202187
answers question: http://stackoverflow.com/q/25176854
downvote count: 0
score: 1
has body: The problem is that login is already defined. It is your form. So when you call return login() it doesn't call your function, but try to return your form. Just rename the function (or the form) and it will work.
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25176854

http://stackoverflow.com/comment/39109198
comment on: http://stackoverflow.com/q/25126965
score: 0
type: Comment
type: QuestionComment
has text: A few notes. 1) you have not injected your controller anywhere. 2) you do not need a service for what you are doing here, and extending scope with the service is not what you want to do. You should be adding stuff to your controller, and then passing it into the scope of your directive with scope: {range: "="}. 3)

http://stackoverflow.com/comment/39280302
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25219145
score: 0
has text: close your ``a``'s first! :D

http://stackoverflow.com/comment/39084416
type: Comment
comment on: http://stackoverflow.com/a/25101905
score: 0
type: AnswerComment
has text: How do you mean hidden fields? (sorry very new to Java), if I put an alert directly before declaring the myCenter variable I'm getting undefined. Current example would be: alert(GPSlat) alert(GPSlon) var myCenter=new google.maps.LatLng(parseFloat(GPSlat),parseFloat(GPSlon));

http://stackoverflow.com/a/48327251
downvote count: 2
has comment: http://stackoverflow.com/comment/130612822
upvote count: 2
score: 0
has body: export function param( params ) { const p = new URLSearchParams; for( const [ key, value ] of Object.entries( params ) ) { p.set( key, String( value ) ); } return p.toString(); }
has comment: http://stackoverflow.com/comment/83645021
type: Answer
answers question: http://stackoverflow.com/q/25224887

http://stackoverflow.com/comment/39106454
comment on: http://stackoverflow.com/q/25124886
score: 0
type: Comment
type: QuestionComment
has text: Listening for events would cause the same loop, as selectedNode is set from the stateParams

angularjs
tags question: http://stackoverflow.com/q/25093960
tags question: http://stackoverflow.com/q/25213101
tags question: http://stackoverflow.com/q/25227155
tags question: http://stackoverflow.com/q/25079054
tags question: http://stackoverflow.com/q/25222616
tags question: http://stackoverflow.com/q/25106157
tags question: http://stackoverflow.com/q/25166316
tags question: http://stackoverflow.com/q/25227320
tags question: http://stackoverflow.com/q/25083177
tags question: http://stackoverflow.com/q/25126331
tags question: http://stackoverflow.com/q/25097738
tags question: http://stackoverflow.com/q/25220218
tags question: http://stackoverflow.com/q/25208855
tags question: http://stackoverflow.com/q/25168593
tags question: http://stackoverflow.com/q/25220959
tags question: http://stackoverflow.com/q/25225080
tags question: http://stackoverflow.com/q/25153456
tags question: http://stackoverflow.com/q/25114911
tags question: http://stackoverflow.com/q/25123481
tags question: http://stackoverflow.com/q/25111849
tags question: http://stackoverflow.com/q/25149560
tags question: http://stackoverflow.com/q/25178757
tags question: http://stackoverflow.com/q/25169276
tags question: http://stackoverflow.com/q/25133443
tags question: http://stackoverflow.com/q/25152326
tags question: http://stackoverflow.com/q/25115732
tags question: http://stackoverflow.com/q/25202483
tags question: http://stackoverflow.com/q/25228991
tags question: http://stackoverflow.com/q/25184359
tags question: http://stackoverflow.com/q/25191947
tags question: http://stackoverflow.com/q/25107197
tags question: http://stackoverflow.com/q/25130552
tags question: http://stackoverflow.com/q/25085932
tags question: http://stackoverflow.com/q/25093239
tags question: http://stackoverflow.com/q/25070373
tags question: http://stackoverflow.com/q/25209534
tags question: http://stackoverflow.com/q/25222309
tags question: http://stackoverflow.com/q/25114401
tags question: http://stackoverflow.com/q/25225231
tags question: http://stackoverflow.com/q/25192598
tags question: http://stackoverflow.com/q/25143786
tags question: http://stackoverflow.com/q/25113353
tags question: http://stackoverflow.com/q/25070690
tags question: http://stackoverflow.com/q/25108068
tags question: http://stackoverflow.com/q/25129198
tags question: http://stackoverflow.com/q/25103966
tags question: http://stackoverflow.com/q/25110231
tags question: http://stackoverflow.com/q/25187958
tags question: http://stackoverflow.com/q/25106891
tags question: http://stackoverflow.com/q/25153756
tags question: http://stackoverflow.com/q/25228898
tags question: http://stackoverflow.com/q/25178744
tags question: http://stackoverflow.com/q/25079687
tags question: http://stackoverflow.com/q/25211837
tags question: http://stackoverflow.com/q/25140980
tags question: http://stackoverflow.com/q/25167850
tags question: http://stackoverflow.com/q/25110044
tags question: http://stackoverflow.com/q/25223940
tags question: http://stackoverflow.com/q/25088880
tags question: http://stackoverflow.com/q/25184440
tags question: http://stackoverflow.com/q/25196643
tags question: http://stackoverflow.com/q/25149978
tags question: http://stackoverflow.com/q/25082081
tags question: http://stackoverflow.com/q/25077825
tags question: http://stackoverflow.com/q/25173581
tags question: http://stackoverflow.com/q/25131142
tags question: http://stackoverflow.com/q/25078410
tags question: http://stackoverflow.com/q/25163533
tags question: http://stackoverflow.com/q/25164569
tags question: http://stackoverflow.com/q/25097473
tags question: http://stackoverflow.com/q/25162241
tags question: http://stackoverflow.com/q/25226361
tags question: http://stackoverflow.com/q/25206994
tags question: http://stackoverflow.com/q/25208772
tags question: http://stackoverflow.com/q/25148976
tags question: http://stackoverflow.com/q/25185370
tags question: http://stackoverflow.com/q/25130595
tags question: http://stackoverflow.com/q/25079934
tags question: http://stackoverflow.com/q/25139068
tags question: http://stackoverflow.com/q/25112298

http://stackoverflow.com/a/60696386
downvote count: 0
score: 3
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/25204282
has body: In case your goal would be prevent scrolling up and down, but browser gives you error due to DOM level is passive, just pass {passive: false} as the third argument within .addEventListener method: // Solution to this: https://www.chromestatus.com/features/6662647093133312 window.addEventListener("wheel", function (e) {e.preventDefault()}, {passive: false}); // no more mouse wheel scrolling [both sides] // window.addEventListener("wheel", function (e) {e.preventDefault()}, {passive: true}); this is default behaviour

http://stackoverflow.com/a/25146638
type: Answer
has body: You cannot do it on the client side without using JavaScript. Browsers load even hidden elements. They will load images even if you set them as background property on hidden elements. The only solution is to generate a different HTML for mobile devices (if you use PHP, JSP, etc.), or use JavaScript to remove unnecessary image elements before a page is rendered.
has comment: http://stackoverflow.com/comment/39146775
score: 0
answers question: http://stackoverflow.com/q/25145533

http://stackoverflow.com/comment/39469899
type: AnswerComment
score: 0
type: Comment
has text: Helps me understand the problem, I appreciate it.
comment on: http://stackoverflow.com/a/25227229

http://stackoverflow.com/comment/39067579
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25104973
has text: Thanks for accepting answer. Please vote up, so this answer stays at the top and be useful for other users. Thanks again.

http://stackoverflow.com/q/25194537
answer count: 1
tagged with: arrays
tagged with: jquery
has body: I am currently having problems binding data to an observable array in knockoutJS. What I am trying to do is display new values based on the user's selection from a select box. The fiddle is available at http://jsfiddle.net/jwayne2978/k0coh1fz/3/ My HTML looks like the following. &lt;select data-bind="options: categories, optionsText: 'name', optionsValue: 'id', value: selectedCategory, optionsCaption: 'Choose...', event: { change: categoryChanged } "&gt; &lt;div data-bind="foreach: values"&gt; &lt;div data-bind="text: name"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div data-bind="foreach: categories"&gt; &lt;div data-bind="text: name"&gt;&lt;/div&gt; &lt;/div&gt; My JavaScript looks like the following. var categories = [ { "name" : "color", "id": "1" }, { "name" : "names", "id": "2" } ]; var values0 = [ { "name" : "empty1" }, { "name" : "empty2" } ]; var values1 = [ { "name" : "white" }, { "name" : "black" } ]; var values2 = [ { "name" : "john" }, { "name" : "name" } ]; var Category = function(data) { this.name = ko.observable(data.name); this.id = ko.observable(data.id); }; var Value = function(data) { this.name = ko.observable(data.name); } var ViewModel = function(categories, values) { var self = this; self.categories = ko.observableArray(ko.utils.arrayMap(categories, function(category) { return new Category(category); })); self.selectedCategory = ko.observable(); self.values = ko.observableArray(ko.utils.arrayMap(values, function(value) { return new Value(value); })); self.categoryChanged = function(obj, event) { if(self.selectedCategory()) { console.log(self.selectedCategory()); if("1" == self.selectedCategory()) { //console.log(values1); self.values.push(new Value({"name":"test1"})); } else if("2" == self.selectedCategory()) { //console.log(values2); self.values.push(new Value({"name":"test2"})); } } }; }; var viewModel; $(document).ready(function() { viewModel = new ViewModel(categories, values0); ko.applyBindings(viewModel); }); When a category is changed, what I rea…
accepted answer: http://stackoverflow.com/a/25194744
has title: problems binding to observable array in knockoutJS
type: AnsweredQuestion
tagged with: ko.observablearray
tagged with: knockout.js
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25194744
score: 0

http://stackoverflow.com/q/25173830
tagged with: .net
has answer: http://stackoverflow.com/a/26604354
tagged with: javascript
linked to: http://stackoverflow.com/q/1151987
has title: .NET JSON.decode() fails for large arrays
has answer: http://stackoverflow.com/a/55872713
favorite count: 0
has comment: http://stackoverflow.com/comment/39196321
tagged with: serialization
type: UnansweredQuestion
score: 2
has body: MVC 4 ASP.NET Web API application : I have a JSON array of form : var json = "{ 'mapset': [ { 'id': '1', 'key': 'key1', 'value': 'value1', 'timestamp': '2014-02-12T08:50:54.594Z' }, { 'id': '2', 'key': 'key2', 'value': 'value2', 'timestamp': '2014-02-12T08:50:54.594Z' }, ] }"; dynamic data = System.Web.Helpers.JSON.decode(json); For array with 10K elements of ~1K bytes each, JSON.Decode() works like a charm. For 100K elements fails with error : System.ArgumentException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.Parameter name: input at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at System.Web.Helpers.Json.Decode(String value) How can I set the limit higher ? I am aware of the other post regarding this topic : Can I set an unlimited length for maxJsonLength in web.config? However the answers provided there do not solve my specific problem. I am directly using JSON.Decode() within an MVC4 app and so modification of web.config settings will not apply. And JSON.Decode() performs deserialization of a JSON string to a .NET JSON object ( not serialization of a .NET JSON object to a JSON string ).
downvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39196127
type: Question
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39196333
tagged with: arrays

http://stackoverflow.com/q/25070999
tagged with: javascript
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/25071050
tagged with: rest
type: Question
answer count: 2
upvote count: 1
tagged with: unit-testing
has answer: http://stackoverflow.com/a/25071047
accepted answer: http://stackoverflow.com/a/25071047
has body: I'm a bit of newbie to unit testing, so go easy on me. I have some modules that query a RESTful API. I find that in each test suite I'm using a few lines of code to spin up a simple ExpressJS web server to mock up some routes that I can call from my tests. It gets old writing this could in every test suite. There's got to be a better way to do this. Any suggestions? BTW my code is all javascript running in NodeJS and the browser. UPDATE: I'm not sure if I explained myself well in my original comment so here is some code example to help explain further. Imagine that my test suite is testing a "Person" module: describe("Person", function () { it("saves through REST API", function (done) { var person = new Person(); //person gets posted to "/api/person/" person.save(function () { expect(person._id).to.be("id"); done(); }); }); }); Normally I would create a small express server with the following route: app.post("/api/person/*", function (req, res) { res.send(200, {data:0123}) }); But it stinks to have to do this for every test suite I write. If this can be accomplished using stubs or spies I would love to see an example of how. Or if I'm doing this all wrong please let me know what I can do different. Thanks!!!
has title: Unit testing with an API involved
has answer: http://stackoverflow.com/a/25071050
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/a/25131145
score: 1
answers question: http://stackoverflow.com/q/25131004
has body: In order for the date input to ingest the value, it first must be converted to a javascript Date object. So in this case, you would add the line $scope.profiledata[0].date_of_birth = new Date($scope.profiledata[0].date_of_birth); immediately after the $scope.profiledata = data; line.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25131004
has comment: http://stackoverflow.com/comment/39117315
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39116466

http://stackoverflow.com/comment/39215039
has text: +1 Agree with those sentiments, in that function you can do what you need.
type: Comment
comment on: http://stackoverflow.com/a/25184628
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39025703
score: 0
has text: `y0(function(d) {return y0(d.student_average);})` is not returning what you think it does, it seems. I'm no d3js expert by any means - what is `y0()`?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25082544

http://stackoverflow.com/comment/39072265
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25107229
has text: #body is in the tab where the search bar is and its id/name is body. Would you like to see the code for the form on the webpage?
score: 0

http://stackoverflow.com/comment/39051350
has text: is car-sale.json located in same directory as this html file?
type: Comment
comment on: http://stackoverflow.com/q/25096115
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39030230
has text: And would anyone explain -1?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25084780

http://stackoverflow.com/a/25385405
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25134857
type: Answer
has body: I figured it out in the end. When changing the dropdown values from clicking on an image elsewhere in the page I need to run the following code: spConfig.configureElement(element) Where (element) is the Dropdown's ID which I stored in a VAR further up the page.
answers question: http://stackoverflow.com/q/25134857

http://stackoverflow.com/a/25173506
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25173459
has body: In your loopArray function just empty your list before adding new values. function loopArray() { var fruitList = $('ul.fruit'); $(fruitList).empty();// this line added var arrayContainer = $('.arrayContainer'); for (var i = 0; i &lt; Fruit.length; i++) { fruitList.append('&lt;li&gt;' + Fruit[i] + '&lt;/li&gt;'); } } If you want one empty li should be there use following for that line. $(fruitList).html('&lt;li&gt;&lt;/li&gt;') DEMO
upvote count: 2
answers question: http://stackoverflow.com/q/25173459

http://stackoverflow.com/comment/39274545
type: AnswerComment
type: Comment
has text: @David if I wanted to use a set of colors I would modify the get color function to fetch the color from an array like so: var colors = [ red, blue, green, other-color ] function getColor() { return colors[Math.floor(Math.random()*colors.length)] } You could for instance create a monocromatic to do this. I'll post an update
comment on: http://stackoverflow.com/a/25214834
score: 0

http://stackoverflow.com/q/25183986
possible better answer: http://stackoverflow.com/a/25184196
upvote count: 4
tagged with: css
has answer: http://stackoverflow.com/a/25184042
accepted answer: http://stackoverflow.com/a/25184042
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/134845
has comment: http://stackoverflow.com/comment/39215493
has body: I have a small problem with a webpage returning back to the top of the page after a javascript function is executed. Basically, I have a small javascript function that toggles the visibility of a div by changing it's display style. the code is the following: function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'block') e.style.display = 'none'; else e.style.display = 'block'; } I then call this with a link that looks like this: [+/-] Hide/Show Info and the div looks something like this: hello world This works just fine. But when I click on my "expand/hide" link to toggle the visibility of the div, the page always returns to the top, so I have to scroll back down to the bottom every time. I have tried adding the the following changes at the end of my javascript function, but neither of them works: window.location = 'test.php#' + id; //where test.php is my current page and window.location.hash=id; Any help would be appreciated in fixing this issue Thanks.
type: Question
has answer: http://stackoverflow.com/a/25184196
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/25184107
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39213796
favorite count: 0
has title: javascript toggle function causes page to scroll to the top

http://stackoverflow.com/q/25204555
has title: change the text drag according to some condition - Extjs 4
downvote count: 0
score: 1
type: Question
answer count: 1
tagged with: javascript
tagged with: extjs
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has body: Hello I am using gridviewdragdrop and I wonder if it is possible to change the drag text according to some condition? Example: if the node that is caught is empty name field show drag text message: You are not allowed to catch this node because of the name is empty
has answer: http://stackoverflow.com/a/25261527

http://stackoverflow.com/q/25208786
tagged with: canvas
downvote count: 1
possible better answer: http://stackoverflow.com/a/25208873
accepted answer: http://stackoverflow.com/a/25208830
favorite count: 0
has answer: http://stackoverflow.com/a/25208873
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25208830
type: AnsweredQuestion
upvote count: 0
type: Question
tagged with: javascript
score: -1
has body: I'm trying to develop a game in HTML5. Right now the code is supposed to be displaying a canvas on the webpage and it's just not doing it. (I'm following a tutorial video). Here is the code for the HTML: Untitled Document Here is the code for game.js: // JavaScript Document var canvasWidth = 800; var canvasHeight = 600; $('#gameCanvas').attr('width', canvasWidth); $('#gameCanvas').attr('width', canvasHeight); var canvas = $('#gameCanvas')[0].getContext('2d'); canvas.strokeRect(0, 0, canvasWidth, canvasHeight); var image = new Image(); image.src = "ship.png"; canvas.drawImage(image, canvasWidth / 2, canvasHeight / 2); Here is a screenshot of the directory I'm working in: http://prntscr.com/4aucqt
has title: Graphics not displaying on screen
answer count: 2

http://stackoverflow.com/comment/39049830
score: 1
comment on: http://stackoverflow.com/a/25095016
type: AnswerComment
type: Comment
has text: Better idea;) Insted of `post.Tags.ToString()` use `string.Join(",",post.Tags.Select(t => t.Name))` and remove tag formatter from js. If it works i will edit my answer

http://stackoverflow.com/a/25134853
type: AcceptedAnswer
downvote count: 0
has body: override getState directly on your Panel definition fetch the result of the super method call and apply your changes Ext.define('MyPanel', { ... getState: function() { var result = this.callParent(arguments); Ext.apply(result, { col: this.up().id, row: this.row, hidden: this.isHidden() }); return result; } })
accepted answer of: http://stackoverflow.com/q/25116668
answers question: http://stackoverflow.com/q/25116668
type: Answer
has comment: http://stackoverflow.com/comment/39168688
has comment: http://stackoverflow.com/comment/39162767
score: 1
has comment: http://stackoverflow.com/comment/39132828
upvote count: 1

http://stackoverflow.com/q/25154854
favorite count: 0
has comment: http://stackoverflow.com/comment/39160421
tagged with: promise
has answer: http://stackoverflow.com/a/25155008
upvote count: 1
has title: How can they call def.then here?
type: AnsweredQuestion
tagged with: jsfiddle
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I was reading about promises and found this fiddle created by the author of this post The code is here: var def, getData, updateUI, resolvePromise; // The Promise and handler def = new $.Deferred(); updateUI = function (data) { $('p').html('I got the data!'); $('div').html(data); }; getData = $.ajax({ url: '/echo/html/', data: { html: 'testhtml', delay: 3 }, type: 'post' }) .done(function(resp) { return resp; }) .fail(function (error) { throw new Error("Error getting the data"); }); // Event Handler resolvePromise = function (ev) { ev.preventDefault(); def.resolve(ev.type, this); return def.promise(); }; // Bind the Event $(document).on('click', 'button', resolvePromise); def.then(function() { return getData; }) .then(function(data) { updateUI(data); }) .done(function(promiseValue, el) { console.log('The promise was resolved by: ', promiseValue, ' on ', el); }); // Console output: The promise was resolved by: click on &lt;button&gt; &lt;/button&gt; I do understand from the first part of this series that a deferred has a promise which can be exposed using the promise method on it. Promises have then method which returns a promise for chaining. Here they resolve the promise on the deferred in resolvePromise,then the then method on the deferred which I dont think is a promise is executed.What am I missing here?
accepted answer: http://stackoverflow.com/a/25155008
answer count: 1

http://stackoverflow.com/q/25109620
has body: I want to create an addon which will load html content of a specific url and save a specific line of that page and then move to that url. I read a lot of things on Mozila.org about content of a web page but I don't understand how to read the html content.
has title: How to read html content of a specific URL using Firefox addon?
tagged with: javascript
score: 0
answer count: 3
tagged with: firefox-addon
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39076451
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25111796
has answer: http://stackoverflow.com/a/25112976
type: Question
has answer: http://stackoverflow.com/a/25116605

http://stackoverflow.com/q/25148646
has comment: http://stackoverflow.com/comment/39149530
has body: I have a JSON file; I want to remove all of the fields or objects, whose names are a specific word (lets say "test") and then return the stripped JSON file back; how can I do it in Node.JS? Here is an example of my JSON file: { "name": "name1", "version": "0.0.1", "storage": { "db": { "test": "STRING", "tets2": "STRING", }, "test": { "test11": "STRING", "test2": { "test3": "0", "test4": "0" }, "test5": { "test6": "0", "test7": "0" } }, "test8": { "test9": "STRING", "test10": "STRING" } } } The desired output: { "name": "name1", "version": "0.0.1", "storage": { "db": { "tets2": "STRING", }, "test8": { "test9": "STRING", "test10": "STRING" } } } I tried the folloiwng, but I dont know how to use typeof() and check if it is an objectgo deeper in the tree! could you please help me in this regard var new_json = config; async.each(Object.keys(config), function(key) { if (key == "test") { delete new_json[key]; } while (typeof (new_json[key]) == "object") { // How can I handle it here } }); console.log("done!");
has comment: http://stackoverflow.com/comment/39150375
tagged with: javascript
has title: Remove objects/fields which contains a specific word
answer count: 2
has comment: http://stackoverflow.com/comment/39149398
has comment: http://stackoverflow.com/comment/39149610
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25149432
possible better answer: http://stackoverflow.com/a/25148979
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25148979
type: Question
accepted answer: http://stackoverflow.com/a/25149432

http://stackoverflow.com/q/25230122
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39300789
has comment: http://stackoverflow.com/comment/39301329
has comment: http://stackoverflow.com/comment/39300953
tagged with: ios
has title: recognize long tap without mouseup
tagged with: javascript
tagged with: mobile-safari
has body: I try to recognize a long tap to start a shake animation but I want to start it while the button is pressed not after I get the mouseup event. Till now I have the following code which performs exactly what I don't want but it's a beginning.. var offset = 10; $('body').on('mousedown','.img-select', function (e) { $(this).data('start', new Date().getTime()); }).on('mouseup','.img-select', function (e) { if (new Date().getTime() &gt;= ($(this).data('start') + offset)) { this.blur(); //to avoid a selectbox from opening window.focus(); //to avoid a selectbox from opening $('.img-item').addClass('shake'); } }).on('mouseleave','.img-select', function (e) { start = 0; }); From @prajmus suggested Idea: $('body').on('mousedown','.img-select', function (e) { //$(this).data('start', new Date().getTime()); setTimeout(function(){ $('.img-item').addClass('shake'); },1000); }).on('mouseup','.img-select', function (e) { /*if (new Date().getTime() &gt;= ($(this).data('start') + offset)) { this.blur(); window.focus(); $('.img-item').addClass('shake'); }else{ }*/ }).on('mouseleave','.img-select', function (e) { start = 0; }); It appears that the code inside my mousedown event handler first launched when I released the button ?! And for some reason the code inside my timeout recommended from @prajmus wasn't executed at all. In my imagination it should like you hold an app icon in ios..
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39301042
has answer: http://stackoverflow.com/a/25230496
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25230496

http://stackoverflow.com/comment/39014874
type: Comment
comment on: http://stackoverflow.com/q/25076900
has text: can u add the code as well.
score: 0
type: QuestionComment

ng-grid
tags question: http://stackoverflow.com/q/25161312
tags question: http://stackoverflow.com/q/25128833
tags question: http://stackoverflow.com/q/25205911
tags question: http://stackoverflow.com/q/25125915
tags question: http://stackoverflow.com/q/25166795
type: Tag
tags question: http://stackoverflow.com/q/25137825
tags question: http://stackoverflow.com/q/25178057
tag name: ng-grid
tags question: http://stackoverflow.com/q/25107549
tags question: http://stackoverflow.com/q/25121280
tags question: http://stackoverflow.com/q/25122810

http://stackoverflow.com/comment/39265855
comment on: http://stackoverflow.com/a/25210246
type: Comment
score: 0
type: AnswerComment
has text: This is brilliant! I didn't know you could do this. Thank you so much. I didn't include this in my post but I also had to convert it to grayscale, so I still needed to utilize the getImageData. For anyone that's interested - I drew the image on my hidden context using the composite to create the fade, then used getImageData for that area, converted the pixels to grayscale, and drew it back with putImageData

http://stackoverflow.com/a/25106351
has body: According to http://docs.aws.amazon.com/AWSECommerceService/latest/DG/rest-signature.html (Step 9) you need to encode all +'s and ='s in your signature. You don't seem to be doing that in your code.
answers question: http://stackoverflow.com/q/25104572
score: 0
type: Answer

http://stackoverflow.com/q/25122757
downvote count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39101140
type: AnsweredQuestion
score: 3
tagged with: sails.js
has title: Angular.js web app through Sails.js server
tagged with: gruntjs
type: Question
accepted answer: http://stackoverflow.com/a/25122995
has comment: http://stackoverflow.com/comment/39101040
answer count: 1
tagged with: javascript
favorite count: 0
has body: I am developing a web application using Sailsjs for the backend and Angular.js for the front end. To scaffold the Angular app I have used yeoman with the angular generator and for the back end I used the default Sails app generator. During development I run 2 servers, the 1st is the sails server to host the back end and the second a grunt server for the front end. For now my configuration works fine but when in production I want to combine the two ends in one and have sails server serve the angular web app... Can someone explain how to do this?
linked to: http://stackoverflow.com/q/21938850
upvote count: 3
has answer: http://stackoverflow.com/a/25122995
has comment: http://stackoverflow.com/comment/39101639
has comment: http://stackoverflow.com/comment/39101911
tagged with: node.js

http://stackoverflow.com/a/25187215
has body: This line sets the property value to undefined, like any other assignment operator would set a value. o.pointerColumn = undefined; Instead, use delete to completely remove the property from the o object: delete o.pointerColumn; return o.save();
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39226549
has comment: http://stackoverflow.com/comment/39226873
has comment: http://stackoverflow.com/comment/39220372
upvote count: 1
has comment: http://stackoverflow.com/comment/39220347
answers question: http://stackoverflow.com/q/25187165
type: Answer
has comment: http://stackoverflow.com/comment/39227639

http://stackoverflow.com/comment/39125866
type: Comment
has text: The one sets the property the other the attribute, thats something that should be mentioned as it is something completely different.
score: 0
comment on: http://stackoverflow.com/a/25136332
type: AnswerComment

http://stackoverflow.com/comment/39116362
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25131004
has text: i used a datetimelocal instead of just the date. Still its not showing up. Think something wrong in the json parameters?

http://stackoverflow.com/comment/39009380
has text: If you tell me whats the problem im my code i can help you. because this is a right solution for your problem Tomb :)
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25073680
type: AnswerComment

http://stackoverflow.com/comment/39661730
score: 0
type: Comment
type: QuestionComment
has text: Can you show a live example of the problem?
comment on: http://stackoverflow.com/q/25118911

http://stackoverflow.com/q/25103256
accepted answer: http://stackoverflow.com/a/25103326
has comment: http://stackoverflow.com/comment/39064213
score: 0
has title: JQuery Datepicker: put week number in the input box instead of selected day
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25103326
type: AnsweredQuestion
has body: I am very new to JQuery and JS and I wrote a small GUI in php where the user has to choose two week numbers and I have a function that produces some stats about it. I found a JS code that highlights the whole week when the user go through it but when clicking on one of the dates, the specific date is being inserted to the input box. I would like to put the week number in the input box instead. Is this possible? The code I use was posted here: http://jsfiddle.net/MqD2n/ Week : -
tagged with: jquery
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/q/25105813
has comment: http://stackoverflow.com/comment/39069042
tagged with: javascript
score: -1
tagged with: replace
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/39068999
has title: I can't replace this pattern in javascript
upvote count: 1
has comment: http://stackoverflow.com/comment/39069004
tagged with: string
favorite count: 0
has comment: http://stackoverflow.com/comment/39069009
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25105937
accepted answer: http://stackoverflow.com/a/25105937
has body: I need your help on my new project I hate regular expressions and its rules but i must use it this project. want do this replace var aString = '[bkz:sample key]'; I want get into key variable 'sample key' value from this aString var key,clean; key = 'sample key'; clean = cleanChars(key); // clean = sample_key //my target key how can i do this? thanks in advance
possible better answer: http://stackoverflow.com/a/25105924
type: Question
has answer: http://stackoverflow.com/a/25105924

http://stackoverflow.com/comment/39273514
type: AnswerComment
comment on: http://stackoverflow.com/a/25212471
type: Comment
has text: I had to fix the above problem by using jQuery's map function to turn the addresses object back into an array. I feel like there are better solutions out there for this IE problem so please help me out here as I can make my code better!
score: 0

http://stackoverflow.com/q/25076188
type: Question
has answer: http://stackoverflow.com/a/25076252
answer count: 2
has answer: http://stackoverflow.com/a/25076312
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25076252
accepted answer: http://stackoverflow.com/a/25076312
score: 2
has title: angularJS get value from a textarea inside a ng-repeat
favorite count: 0
tagged with: angularjs
upvote count: 2
type: AnsweredQuestion
has body: How can I get the value of textarea inside a ng-repeat? Desc : {{data.description}} save .. $scope.saveDescription = function (id,count) { description=$scope.textArea[count] alert(description) } What is my mistake?

http://stackoverflow.com/a/25163870
answers question: http://stackoverflow.com/q/25159672
upvote count: 2
type: Answer
score: 2
downvote count: 0
has body: My guess is that you want to set the 2nd input field to "disabled" if you add some value to the first inputField without hitting a button. You could do this with an onkeyup="" event in you inputText which calls a backingBean method that sets the second inputfield to disabled. Example: &lt;p:outputLabel for="field1" value="value1: "/&gt; &lt;p:inputText id="field1" disabled="#{backingBean.field1Disabled} onkeyup="#{backingBean.disableField2}" value=#{backingBean.value1}/&gt; &lt;p:outputLabel for="field2" value="value2: "/&gt; &lt;p:inputText id="field2" disabled="#{backingBean.field2Disabled} onkeyup="#{backingBean.disableField1}/&gt; you could have a method in your backingBean like: public void disableField2() { if (value1.length() &gt; 0) { field2Disabled = true; } else { field2Disabled = false; } } public void disableField1() { if (value2.length() &gt; 0) { field1Disabled = true; } else { field1Disabled = false; } }

http://stackoverflow.com/a/25163850
has body: Try this out: var x = "['0015','0016']"; // The value that you are grabbing var sol = eval(x); // This returns the value as an array of strings. Is this what you are trying to achieve?
accepted answer of: http://stackoverflow.com/q/25163772
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25163772
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39152686
type: Comment
type: QuestionComment
score: 1
has text: It's not going to magically make an event for you
comment on: http://stackoverflow.com/q/25150467

http://stackoverflow.com/a/26756637
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25212405
has body: You've run into a bug in Selenium: https://code.google.com/p/selenium/issues/detail?id=7977 https://code.google.com/p/selenium/issues/detail?id=3544 (Yes, the two bug reports are related.) There's a problem in Selenium whereby if you try to terminate the driver while an alert is active, you'll get e is null or a number of other error messages. As Lawrence Tierney mentioned, you should make sure that the alert is closed before terminating the driver. Your code should do this whether or not the assert is successful.
downvote count: 0

http://stackoverflow.com/comment/39238838
score: 0
type: Comment
type: QuestionComment
has text: Are you seriously asking ***why*** IE9 does not support the `FileReader`, and why it was only implented in IE10? What do you want us to answer to that? Because Bill said no, because .. microsoft, because the didn't !
comment on: http://stackoverflow.com/q/25197067

http://stackoverflow.com/a/25098732
has body: The idea: Each time you click, slideUp() All other nav items, But not the current. for example: $(".nav-item").click(function() { $(".nav-item").slideUp(1000); // first slide up All other elements $(this).slideToggle(1000); // slide up/down 'this' }); demo: (for example!) http://jsbin.com/vatefeki/1/edit
answers question: http://stackoverflow.com/q/25098484
score: 0
type: Answer

http://stackoverflow.com/a/25118120
score: 0
upvote count: 1
has body: What's need of jquery var newCostDiff = 0.135; Math.round(newCostDiff *100)/100; //returns 0.14
downvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25118074

http://stackoverflow.com/q/25188139
has comment: http://stackoverflow.com/comment/39222106
has comment: http://stackoverflow.com/comment/39224425
has comment: http://stackoverflow.com/comment/39222043
downvote count: 4
has comment: http://stackoverflow.com/comment/39221981
answer count: 1
has comment: http://stackoverflow.com/comment/39222297
has comment: http://stackoverflow.com/comment/39222324
favorite count: 0
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/39222051
has comment: http://stackoverflow.com/comment/39222206
has body: the add class is not working even if it is in document ready. I tried both with document ready and without it. it is not working but alert is working. var $jbanner = jQuery.noConflict(true); if ($jbanner(window).width() < 1200) { alert("Less than 1200"); $jbanner("#wad").addClass("hide"); } other code var $jbanner = jQuery.noConflict(true); $jbanner(document).ready(function () { if ($jbanner(window).width() < 1200) { alert("Less than 1200"); $jbanner("#wad").addClass("hide"); } }) With document ready function even the alert box is not working. is it conflicting with other jquerys in the page. #wad is an image thanks ok this should be pretty easy, but not working for me. I just pasted what i am trying to do in a separate html file. but still not working, any help is appreciated. Untitled Document I am just trying to create a floating banner ad. that hides for smaller screen sizes.
has comment: http://stackoverflow.com/comment/39226031
has title: Add Class not working even in document ready
has comment: http://stackoverflow.com/comment/39225701
has comment: http://stackoverflow.com/comment/39222189
has comment: http://stackoverflow.com/comment/39222081
has comment: http://stackoverflow.com/comment/39222174
has comment: http://stackoverflow.com/comment/39221997
has comment: http://stackoverflow.com/comment/39222099
has comment: http://stackoverflow.com/comment/39221970
has comment: http://stackoverflow.com/comment/39222188
has answer: http://stackoverflow.com/a/25188303
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/39222439
has comment: http://stackoverflow.com/comment/39222288
has comment: http://stackoverflow.com/comment/39222101
tagged with: javascript
has comment: http://stackoverflow.com/comment/39222427
tagged with: jquery

http://stackoverflow.com/comment/39020415
comment on: http://stackoverflow.com/q/25077885
score: 0
type: Comment
type: QuestionComment
has text: i tried gMap width 100% and height 600px but result is same :(

http://stackoverflow.com/comment/39083504
score: 0
type: Comment
has text: Thank you! That's the solution.
comment on: http://stackoverflow.com/a/25113377
type: AnswerComment

http://stackoverflow.com/comment/39265885
score: 0
comment on: http://stackoverflow.com/q/25211366
type: QuestionComment
type: Comment
has text: You should make `makeCall` recursive, with `makeCall` in the success callback of the ajax call. Your ajax response should then return the `max` parameter (to use as `min` in the makeCall in the success callback) as well as a flag to indicate when no more data is available.

javascript
tags question: http://stackoverflow.com/q/25119349
tags question: http://stackoverflow.com/q/25121320
tags question: http://stackoverflow.com/q/25103883
tags question: http://stackoverflow.com/q/25178540
tags question: http://stackoverflow.com/q/25072069
tags question: http://stackoverflow.com/q/25129348
tags question: http://stackoverflow.com/q/25195580
tags question: http://stackoverflow.com/q/25116137
tags question: http://stackoverflow.com/q/25179608
tags question: http://stackoverflow.com/q/25150038
tags question: http://stackoverflow.com/q/25108184
tags question: http://stackoverflow.com/q/25133345
tags question: http://stackoverflow.com/q/25089280
tags question: http://stackoverflow.com/q/25192122
tags question: http://stackoverflow.com/q/25130564
tags question: http://stackoverflow.com/q/25107699
tags question: http://stackoverflow.com/q/25138645
tags question: http://stackoverflow.com/q/25157311
tags question: http://stackoverflow.com/q/25126791
tags question: http://stackoverflow.com/q/25212075
tags question: http://stackoverflow.com/q/25219398
tags question: http://stackoverflow.com/q/25127442
tags question: http://stackoverflow.com/q/25175136
tags question: http://stackoverflow.com/q/25188681
tags question: http://stackoverflow.com/q/25094275
tags question: http://stackoverflow.com/q/25106505
tags question: http://stackoverflow.com/q/25093101
tags question: http://stackoverflow.com/q/25113947
tags question: http://stackoverflow.com/q/25125992
tags question: http://stackoverflow.com/q/25162689
tags question: http://stackoverflow.com/q/25142870
tags question: http://stackoverflow.com/q/25218896
tags question: http://stackoverflow.com/q/25147188
tags question: http://stackoverflow.com/q/25193018
tags question: http://stackoverflow.com/q/25203766
tags question: http://stackoverflow.com/q/25076571
tags question: http://stackoverflow.com/q/25189209
tags question: http://stackoverflow.com/q/25201087
tags question: http://stackoverflow.com/q/25211609
tags question: http://stackoverflow.com/q/25086933
tags question: http://stackoverflow.com/q/25174097
tags question: http://stackoverflow.com/q/25117562
tags question: http://stackoverflow.com/q/25149279
tags question: http://stackoverflow.com/q/25146814
tags question: http://stackoverflow.com/q/25108221
tags question: http://stackoverflow.com/q/25074341
tags question: http://stackoverflow.com/q/25103915
tags question: http://stackoverflow.com/q/25201021
tags question: http://stackoverflow.com/q/25216032
tags question: http://stackoverflow.com/q/25207217
tags question: http://stackoverflow.com/q/25163334
tags question: http://stackoverflow.com/q/25186715
tags question: http://stackoverflow.com/q/25098632
tags question: http://stackoverflow.com/q/25208608
tags question: http://stackoverflow.com/q/25132598
tags question: http://stackoverflow.com/q/25148398
tags question: http://stackoverflow.com/q/25123070
tags question: http://stackoverflow.com/q/25194606
tags question: http://stackoverflow.com/q/25199135
tags question: http://stackoverflow.com/q/25150273
tags question: http://stackoverflow.com/q/25134218
tags question: http://stackoverflow.com/q/25174006
tags question: http://stackoverflow.com/q/25139414
tags question: http://stackoverflow.com/q/25077799
tags question: http://stackoverflow.com/q/25146223
tags question: http://stackoverflow.com/q/25122102
tags question: http://stackoverflow.com/q/25102114
tags question: http://stackoverflow.com/q/25112243
tags question: http://stackoverflow.com/q/25137488
tags question: http://stackoverflow.com/q/25130393
tags question: http://stackoverflow.com/q/25197257
tags question: http://stackoverflow.com/q/25159142
tags question: http://stackoverflow.com/q/25221025
tags question: http://stackoverflow.com/q/25081346
tags question: http://stackoverflow.com/q/25228128
tags question: http://stackoverflow.com/q/25195662
tags question: http://stackoverflow.com/q/25198588
tags question: http://stackoverflow.com/q/25153559
tags question: http://stackoverflow.com/q/25209463
tags question: http://stackoverflow.com/q/25148446

http://stackoverflow.com/q/25215766
has comment: http://stackoverflow.com/comment/39274130
answer count: 1
tagged with: javascript
has title: How to dynamically change form fields based on radiobutton selection
tagged with: jquery
has comment: http://stackoverflow.com/comment/39274051
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have a form where I need to make it change dynamically based on radio button selection. Suppose I have textfields Field A, Field B, ....,Field G and I have radio buttons Radio 1 and Radio 2 in a form. I want to dynamically change the form based on radiobutton selection. Form design is as follows : Field A Field B Radio1 Radio 2 Now based on radiobutton selection, the other fields(Fields C to G) can be textfields or radiobuttons or dropdownlists. Now, I'm using two divs with the same fields with the view of their requirement(textfields or radiobuttons or dropdownlists) and hiding/showing those divs based on radiobutton selection.But is it the right way to do it. But the disadvantage I see with this method is each form field gets submitted twice(I mean it posts data from both divs even if one div is hidden) How can I do this
has answer: http://stackoverflow.com/a/25215890
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39274144
tagged with: forms
has comment: http://stackoverflow.com/comment/39274086

http://stackoverflow.com/a/25225507
accepted answer of: http://stackoverflow.com/q/25225428
answers question: http://stackoverflow.com/q/25225428
has body: You can use the javascript builtin sort function. Here's the code where sorted is your new sorted array: var sorted = unsorted.sort(function(a,b) { return (a.t-b.t) * 1000 + (b.h-a.h); }); Note that this assumes your numbers in h will not be bigger than 999, or otherwise you will have to increase the multiplier of 1000 to something bigger. Here's the reference to the javascript sort function: http://www.w3schools.com/jsref/jsref_sort.asp
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39291930
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39186245
has text: Are you sure JS files are downloadable for this computer?
type: Comment
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/25168695

http://stackoverflow.com/q/25159464
score: 2
type: AnsweredQuestion
upvote count: 2
linked to: http://stackoverflow.com/q/25144945
has title: AngularJS : How to make directives evaluate from outside in?
type: Question
tagged with: angularjs-compile
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25175713
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25175713
tagged with: angularjs
has body: Executable example: http://jsbin.com/secuz/5/edit?html,js,output Details The above failure contradicts my assumption about in what order Angular directives are processed. I would expect that outer directives get run first, then execution propagates inwards. Am I correct to think that this out-of order evaluation is due to ng-if having higher priority than ng-show? And if so, shouldn't priorities only be taken into account if two directives are on the same element? Main question How can I make sure execution always goes from outside in? Do I need to give the same priority to all the directives I use? Edit: Tried 2 additional scenarios: If both are ng-ifs, then the propagation happens from outside-in, just as expected: [[ '1 if', true ], [ '2 if', true ], [ '1 if', true ], [ '2 if', true ]] However, two ng-shows exhibit a counter-intuitive behaviour: [[ '2 show', true ], [ '1 show', true ], [ '2 show', true ], [ '1 show', true ]]

http://stackoverflow.com/a/25104594
has comment: http://stackoverflow.com/comment/39066949
has comment: http://stackoverflow.com/comment/39073802
has comment: http://stackoverflow.com/comment/39066806
has comment: http://stackoverflow.com/comment/39073513
has comment: http://stackoverflow.com/comment/39074206
answers question: http://stackoverflow.com/q/25104569
type: Answer
score: 7
upvote count: 7
has body: You can remove them with a regular expression and replace: selector = selector.replace(/::?[^ ,:.]+/g, ''); (The ::? means one or two colons [you could also write it as :{1,2}], to handle ::after and such; full regex explanation.) That works for most situations, but if you have really complex pseudos with nested pseudos like foo.bar:not(.baz:active) (will be in CSS4), you'll need an actual CSS selector parser to handle them properly. While you could probably build a regex alternation that would handle one bit of nesting, in theory there can be multiple nesting, which is where a parser comes in. But note that some of these pseudos do affect which element is chosen, such as :nth-child, so if your goal is to see if a matching element is in the DOM, you wouldn't want to remove those. So you might want to take the fairly pragmatic approach of listing the ones that you want to remove in a series of alternations, e.g.: var toRemove = /:hover|:active|:before|:after|::?before|::?after|:and-so-on/g; // ... selector = selector.replace(toRemove, ''); There aren't all that many, and it eliminates the chance of removing important structural ones line :nth-child.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25104569
downvote count: 0

http://stackoverflow.com/a/25130975
has comment: http://stackoverflow.com/comment/50744039
score: 9
has comment: http://stackoverflow.com/comment/39131472
has body: The issue is you have to provide timeStamp/temperature in separate collection as in labels and dataset associated with it. Either you can respond back "result" separately into two two arrays like: [["16.9", "17.1", "17.1", "17.1", "17.1", "17.1", "17.2", "17.2", "17.2", "17.2"], ["2014-08-04 23:06:01", "2014-08-04 23:03:02", "2014-08-04 23:00:02", "2014-08-04 22:57:01", "2014-08-04 22:54:01", "2014-08-04 22:51:02", "2014-08-04 22:48:01", "2014-08-04 22:45:02", "2014-08-04 22:42:01", "2014-08-04 22:39:02"]]; And then you can simply do, var tempData = { labels : result[0], datasets : [{ fillColor : "rgba(172,194,132,0.4)", strokeColor : "#ACC26D", pointColor : "#fff", pointStrokeColor : "#9DB86D", data : result[1] }] }; OR you can convert it into two arrays on front-end side. For example: &lt;script type="text/javascript"&gt; $(document).ready(function() { $.getJSON("data.php", function (result) { var labels = [],data=[]; for(var item in result){ labels.push(result[item].slice(0,1).toString()); data.push(result[item].slice(1,2).toString()); } var tempData = { labels : labels, datasets : [{ fillColor : "rgba(172,194,132,0.4)", strokeColor : "#ACC26D", pointColor : "#fff", pointStrokeColor : "#9DB86D", data : data }] }; var temp = document.getElementById('compradores').getContext('2d'); var lineChart = new Chart(temp).Line(tempData); }); }); &lt;/script&gt;
type: AcceptedAnswer
upvote count: 9
type: Answer
has comment: http://stackoverflow.com/comment/47007715
accepted answer of: http://stackoverflow.com/q/25130239
has comment: http://stackoverflow.com/comment/46997042
downvote count: 0
answers question: http://stackoverflow.com/q/25130239

http://stackoverflow.com/q/25123716
has body: I feel like this has to do with the AJAX call. Not really sure what is going on. The error is technically being thrown within the jQuery file at line 584 which defines the isArraylike(obj) function. jQuery(document).ready(function(){ var width_of_grams = $(window).width(); var new_pic_height = (width_of_grams /7); $("img.gram_photo").css('height', (width_of_grams) / 7); $("#instafeed").css('height', 2*new_pic_height); $(window).resize(function() { var width_of_grams = $(window).width(); var new_pic_height = (width_of_grams /7); $("img.gram_photo").css('height', (width_of_grams) / 7); $("#instafeed").css('height', 2*new_pic_height); }); $("#school_application_fls_center_name").change(function(){ var center_name = document.getElementById("school_application_fls_center_name").value; var formdata = {center: center_name}; $.ajax({ url: "/application/get_programs_for_center", type: "POST", data: formdata, success: function(response){ var options = $("#school_application_program_name"); console.log(response); $.each(response, function(i,item) { options.append($("&lt;option /&gt;").val(response[i].id).text(response[i].name)); }); } }); }); }); Here is the jQuery library code that throws the error: function isArraylike( obj ) { var length = obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { return false; } if ( obj.nodeType === 1 &amp;&amp; length ) { return true; } return type === "array" || length === 0 || typeof length === "number" &amp;&amp; length &gt; 0 &amp;&amp; ( length - 1 ) in obj; //THIS LINE THROWS ERROR } N.B. When I remove all of the callback function in the success part of the AJAX request, and just put a console.log to confirm I am making it to the callback successfully it prints my log message and does not throw the error.
has comment: http://stackoverflow.com/comment/39103404
upvote count: 6
has comment: http://stackoverflow.com/comment/39103069
type: UnansweredQuestion
score: 6
type: Question
has comment: http://stackoverflow.com/comment/39103315
has comment: http://stackoverflow.com/comment/39103062
has answer: http://stackoverflow.com/a/25128199
has comment: http://stackoverflow.com/comment/39102857
has comment: http://stackoverflow.com/comment/39103347
has answer: http://stackoverflow.com/a/25124521
answer count: 2
has title: Uncaught TypeError: Cannot use 'in' operator to search for '0' in (jQuery)
downvote count: 0
has comment: http://stackoverflow.com/comment/39103111
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39102996

asp.net-mvc-3
tags question: http://stackoverflow.com/q/25229784
tags question: http://stackoverflow.com/q/25182362
tags question: http://stackoverflow.com/q/25166439
tags question: http://stackoverflow.com/q/25113171
tags question: http://stackoverflow.com/q/25226222
tag name: asp.net-mvc-3
tags question: http://stackoverflow.com/q/25081535
type: Tag
tags question: http://stackoverflow.com/q/25193573

http://stackoverflow.com/a/25076312
has body: Desc : {{data.description}} save No need to use an array. Just pass the text as a parameter to the function $scope.saveDescription = function (id,count,textArea) { description=textArea; alert(description) }
accepted answer of: http://stackoverflow.com/q/25076188
answers question: http://stackoverflow.com/q/25076188
has comment: http://stackoverflow.com/comment/59489892
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/39061746
comment on: http://stackoverflow.com/a/25101698
has text: I don't want the link to hide itself. The link needs to specify a div, by name, that will be reversibly hidden. Like this: Link. This works but I don't think I should be using onclick.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25194310
has body: As stated, processing documents like this is not possible with the aggregation framework unless you are actually going to supply all of the keys, such as: db.events.aggregate([ { "$group": { "_id": "$app_id", "event_count": { "$sum": "$event_count" }, "0": { "$sum": "$event_count_per_type.0" }, "10": { "$sum": "$event_count_per_type.10" } "20": { "$sum": "$event_count_per_type.20" } "30": { "$sum": "$event_count_per_type.30" } }} ]) But you do of course have to explicitly specify every key you wish to work on. This is true of both the aggregation framework and general query operations in MongoDB, as to access elements notated in this "sub-document" form you need to specify the "exact path" to the element in order to do anything with it. The aggregation framework and general queries have no concept of "traversal", which mean they cannot process "each key" of a document. That requires a language construct in order to do which is not provided in these interfaces. Generally speaking though, using a "key name" as a data point where it's name actually represents a "value" is a bit of an "anti-pattern". A better way to model this would be to use an array and represent your "type" as a value by itself: { "app_id": "DHJFK67JDSJjdasj909", "date: ISODate("2014-08-07T00:00:00.000Z"), "event_count": 32423, "events": [ { "type": 0, "value": 322 }, { "type": 10, "value": 4234 }, { "type": 20, "value": 653 }, { "type": 30, "value": 7562 } ] } Also noting that the "date" is now a proper date object rather than a string, which is also something that is good practice to do. This sort of data though is easy to process with the aggregation framework: db.events.aggregate([ { "$unwind": "$events" }, { "$group": { "_id": { "app_id": "$app_id", "type": "$events.type" }, "event_count": { "$sum": "$event_count" }, "value": { "$sum": "$value" } }}, { "$group": { "_id": "$_id.app_id", "event_count": { "$sum": "$event_count" }, "events": { "$push": { "type": "$_id.type", "value": "$value" } } }}…
accepted answer of: http://stackoverflow.com/q/25187453
upvote count: 7
has comment: http://stackoverflow.com/comment/39244662
type: Answer
downvote count: 0
score: 7
has comment: http://stackoverflow.com/comment/39246101
answers question: http://stackoverflow.com/q/25187453
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39244899

http://stackoverflow.com/q/25193657
favorite count: 0
has comment: http://stackoverflow.com/comment/39232593
accepted answer: http://stackoverflow.com/a/25193743
upvote count: 1
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39232518
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39232527
has title: Node array contains 'Object' instead of actual JS object
has comment: http://stackoverflow.com/comment/39232672
type: Question
has comment: http://stackoverflow.com/comment/39232543
has comment: http://stackoverflow.com/comment/39232565
tagged with: arrays
has body: I do realize the title of this question is awkwardly chosen and I'll gladly change it towards something more descriptive if anybody has a suggestion, I just don't know how to describe it differently. I have this bit of javascript code which is creating a json object containing an array labeled trips. Each object in this array contains an array labeled nodes, which I'd hope to contain objects with all the specific nodes of a trip. var json = {origin: data.origin.name, destination: data.destination.name, trips: []}; for (var i = 0; i &lt; data.trips.length; i++) { var departure = data.trips[i].dep.time; var arrival = data.trips[i].arr.time; var trip = {departure: departure, arrival: arrival, nodes: []} for (var j = 0; j &lt; data.trips[i].legs.length; j++) { trip.nodes.push({test: 'test'}); } json.trips.push(trip); } The outcome looks like this. { origin: 'Dresden, Helmholtzstraße', destination: 'Dresden, Zellescher Weg', trips: [ { departure: '12:04', arrival: '12:26', nodes: [Object] }, { departure: '13:02', arrival: '13:11', nodes: [Object] } ] } The array I'm pulling the data from, the one the second for loop loops through, contains several elements. So I'd expect to see the test object a few times inside the nodes array. I don't quite understand how to interpret what I'm getting though. Is it an array containing an unspecified object? And if so, why?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39232847
has comment: http://stackoverflow.com/comment/39232611
answer count: 1
has answer: http://stackoverflow.com/a/25193743

http://stackoverflow.com/comment/39174031
has text: Use `element.innerText`.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25162263

recursion
type: Tag
tags question: http://stackoverflow.com/q/25146706
tags question: http://stackoverflow.com/q/25120058
tags question: http://stackoverflow.com/q/25174950
tags question: http://stackoverflow.com/q/25106440
tag name: recursion
tags question: http://stackoverflow.com/q/25228394
tags question: http://stackoverflow.com/q/25228128
tags question: http://stackoverflow.com/q/25097932
tags question: http://stackoverflow.com/q/25228871

http://stackoverflow.com/comment/39124939
type: Comment
comment on: http://stackoverflow.com/a/25101905
type: AnswerComment
has text: Thanks for all your help so far, very close now. So I took your example which worked fine for me, and started to port my original code across to find out where it breaks. The reason yours works and mine doesn't is actually that function you didn't have access to. As soon as I add the 2 twos referencing the esource that pulls the data from PHP it breaks `var eSource = new EventSource("send_sse.php");` and `eSource.onmessage = function(event) {`. When I say break, the variables are no longer accessible outside that eSource function, question is how do I make it 'global'?
score: 0

http://stackoverflow.com/comment/39206230
type: QuestionComment
type: Comment
has text: This isn't an asp radiobutton is it.
score: 0
comment on: http://stackoverflow.com/q/25179844

http://stackoverflow.com/a/25167164
has body: I'm afraid you can't count the number of the files using jQuery, it is better done with PHP as below: iterator_count(new DirectoryIterator('/images/')); but if you know how many files there already are in the folder, you could just give it to a variable and use the code below: &lt;script type="text/ecmascript"&gt; $(document).ready(function () { var currentImage=1; var maxImage=10; //let's say you only have 10 images in the folder $(document).keydown(function (e) { if (e.keyCode == 37) { if(currentImage!=1){ var currentImage--; $("#img").attr("src" , 'images/'+currentImage+'.jpg'); } else{ var currentImage=10; $("#img").attr("src" , 'images/'+currentImage+'.jpg'); } } else if (e.keyCode == 39) { if(currentImage!=maxImage){ var currentImage++; $("#img").attr("src" , 'images/'+currentImage+'.jpg'); } else{ var currentImage=1; $("#img").attr("src" , 'images/'+currentImage+'.jpg'); } } }); }); &lt;/script&gt;
answers question: http://stackoverflow.com/q/25166932
type: Answer
score: 0

http://stackoverflow.com/comment/56018075
type: Comment
has text: Works great ... any possibility of having this work with node.cache() ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25095774

http://stackoverflow.com/a/25078238
has body: Its document-ready handler Description: Specify a function to execute when the DOM is fully loaded.
downvote count: 2
answers question: http://stackoverflow.com/q/25078219
upvote count: 10
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/39017426

http://stackoverflow.com/comment/39156614
has text: Also, unless I am missing something, you need to add a semicolon after your last .css (this is confirmed by http://www.javascriptlint.com/online_lint.php)
comment on: http://stackoverflow.com/q/25152702
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39115467
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25130507
has text: Oh geez, sorry... bad pre-1.0 habits: io.sockets.emit('chat message', msg);

http://stackoverflow.com/comment/39225279
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25189328
has text: No; it shouldn't be that slow. Are you testing on your localhost or with an actual server over the internet? Also, question: why are you using a `StreamingHttpResponse` instead of a regular `HttpRespone` (or even a `JsonResponse`)?

http://stackoverflow.com/q/25101356
has title: calling a function whenever the slider is clicked
type: AnsweredQuestion
has body: I have one slider in my code. when I click on it, it should call a function myFunction() in my code which alerts a message clicked. Here is my code which is not working. Price rangeA:
has comment: http://stackoverflow.com/comment/39061019
has answer: http://stackoverflow.com/a/25101987
type: Question
accepted answer: http://stackoverflow.com/a/25101987
tagged with: javascript
has answer: http://stackoverflow.com/a/25101368
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25101394
has comment: http://stackoverflow.com/comment/39060974
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25101368

http://stackoverflow.com/q/25069868
favorite count: 0
accepted answer: http://stackoverflow.com/a/25070027
tagged with: rss
has comment: http://stackoverflow.com/comment/39002519
has body: I am using a link generated from a RSS converter (webrss.com), which sits inside a javascript tag at the end of my html. I have needed to convert an RSS feed to HTML for displaying on some digital signage. It works great, except I am having trouble overriding its default styles. I can change .li and .a styles but not font-size in the body or html tags. I have looked everywhere for a solution and have tried using !important in my CSS but it isn't working. I would like to use an external style sheet and have it override all styles in the js tag at the end of my html. Is this possible? I'm new to this and am stuck, please help!
has title: Is it possible to override CSS in js
tagged with: css
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25070025
upvote count: 1
has answer: http://stackoverflow.com/a/38747361
has answer: http://stackoverflow.com/a/25070025
type: Question
has answer: http://stackoverflow.com/a/25070027
has comment: http://stackoverflow.com/comment/39002925
tagged with: javascript
has comment: http://stackoverflow.com/comment/39017038
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/comment/39201181
score: 0
has text: did you get any luck. I also tried all possible angles. not got success.
type: QuestionComment
comment on: http://stackoverflow.com/q/25157311
type: Comment

http://stackoverflow.com/a/25225008
has comment: http://stackoverflow.com/comment/39300692
type: AcceptedAnswer
downvote count: 1
upvote count: 33
has comment: http://stackoverflow.com/comment/114835668
has comment: http://stackoverflow.com/comment/53343265
score: 32
type: Answer
answers question: http://stackoverflow.com/q/25224887
accepted answer of: http://stackoverflow.com/q/25224887
has body: You can also do that with pure JavaScript, but you have to write more lines of code. Try this: a = { userid:1, gender: "male", } url = Object.keys(a).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(a[k]) }).join('&amp;') console.log(url) The output is this: userid=1&amp;gender=male

http://stackoverflow.com/comment/39327324
type: Comment
type: QuestionComment
has text: Signing in worked OK for me just now. Is it possible you have 3rd party cookies disabled in your browser or similar restrictions?
comment on: http://stackoverflow.com/q/25229721
score: 0

http://stackoverflow.com/q/25146341
tagged with: event-listener
has comment: http://stackoverflow.com/comment/39146456
has comment: http://stackoverflow.com/comment/39147282
has comment: http://stackoverflow.com/comment/39144815
upvote count: 1
has comment: http://stackoverflow.com/comment/39147641
tagged with: addeventlistener
has comment: http://stackoverflow.com/comment/39147946
answer count: 1
has comment: http://stackoverflow.com/comment/39145013
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have a situation where a click eventlistener is being set on on a dynamic element using jQuery's .on: $('body').on('click', '#email-me', function() { call my code.... }); and later on in the page, I have to remove this listener - but - and here's the catch - I DON'T have access to jQuery anymore (long story), which means pure js... so, I can't use unBind(), and even if i name my anonymous function up there, it still won't remove the event listener. How do I remove the bind, so this element isn't clickable anymore? Thanks for reading!
has comment: http://stackoverflow.com/comment/39145216
has comment: http://stackoverflow.com/comment/39144921
has comment: http://stackoverflow.com/comment/39144915
has comment: http://stackoverflow.com/comment/39144888
has title: how to remove event listener, set in jQuery, using pure JS?
downvote count: 0
has comment: http://stackoverflow.com/comment/39145041
has comment: http://stackoverflow.com/comment/39145137
has comment: http://stackoverflow.com/comment/39145259
has comment: http://stackoverflow.com/comment/39145196
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25146726
accepted answer: http://stackoverflow.com/a/25146726
score: 1
has comment: http://stackoverflow.com/comment/39147679
has comment: http://stackoverflow.com/comment/39144908

http://stackoverflow.com/comment/39179978
type: QuestionComment
comment on: http://stackoverflow.com/q/25165219
type: Comment
score: 0
has text: That is pretty cool, but this script would need to be run from a Linux box that won't have the prerequisite Firefox installed with the Mozrepl plugin.

http://stackoverflow.com/comment/51630083
comment on: http://stackoverflow.com/a/25120663
score: 2
type: AnswerComment
has text: This doesn't seem to work on angular 1.4. See http://stackoverflow.com/questions/31193836/nganimate-on-page-load-hack for another solution.
type: Comment

extjs4.2
tags question: http://stackoverflow.com/q/25150829
type: Tag
tag name: extjs4.2
tags question: http://stackoverflow.com/q/25071088
tags question: http://stackoverflow.com/q/25148381

http://stackoverflow.com/q/25176087
tagged with: dojo
type: AnsweredQuestion
tagged with: dgrid
accepted answer: http://stackoverflow.com/a/25182787
has body: I want to set the store dynamically in a dGrid when I call a function and not when I declare. Is it possible? In dataGrid I use gridId.setStore(newStore); Is there something similar to it for dGrid in dojo? I went through all the api's and documentation but still no result.
type: Question
has answer: http://stackoverflow.com/a/25182787
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39200035
has title: how to dynamically set store dojo dgrid?

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

http://stackoverflow.com/a/25107353
has comment: http://stackoverflow.com/comment/39133580
score: 0
answers question: http://stackoverflow.com/q/25103743
type: Answer
has comment: http://stackoverflow.com/comment/39117158
has body: I was facing same issue. After research on internet,I found that Laravel don't support withSuccess('success_msg') method. return Redirect::to('dashboard')-&gt;withSuccess("Success: avatar updated."); Here is complete discussion on this topic: https://github.com/laravel/framework/issues/906. But you can handle this issue with this approach:- - For Error message:- [code has to be added in controller] return Redirect::to('view')-&gt;withErrors('your error message.'); [code has to be added in view] @if(isset($errors) &amp;&amp; count($errors-&gt;all())&gt;0) &lt;ul&gt; @foreach($errors-&gt;all() as $error) &lt;li&gt;{{ $error }}&lt;/li&gt; @endforeach &lt;/ul&gt; @endif - for succcess message:- [code has to be added in controller] $success_msg='your success message.'; Session::flash('successMsg', $success_msg); return Redirect::to('view'); [code has to be added in view] @if (Session::has('successMsg')) {{ Session::get('successMsg') }} @endif This approach is working fine for me. For better display of your errors you can use bootstrap css.
has comment: http://stackoverflow.com/comment/39182781
has comment: http://stackoverflow.com/comment/39074857
has comment: http://stackoverflow.com/comment/39176954

http://stackoverflow.com/a/25075882
has body: You are using express wrong: The Express-App is actually an object you can pass to the http.createServer()-Method - it doesnt live parellel to it. Youre code should work if you change it like this: // Delete the original http.createServer(); app.get('/node', function(req, res){ res.sendfile('index.html'); }); http.createServer(app).listen(8000, 'localhost'); As you can also see in the example, you will have to define the routes BEFORE you start the server.
has comment: http://stackoverflow.com/comment/39013131
answers question: http://stackoverflow.com/q/25075811
has comment: http://stackoverflow.com/comment/39013375
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39013187
type: Answer
accepted answer of: http://stackoverflow.com/q/25075811
score: 2

http://stackoverflow.com/q/25140894
accepted answer: http://stackoverflow.com/a/25141184
tagged with: node.js
type: AnsweredQuestion
score: 0
tagged with: waterfall
type: Question
has title: How to call callback inside other function
has answer: http://stackoverflow.com/a/25141184
answer count: 1
has comment: http://stackoverflow.com/comment/39134780
tagged with: javascript
has comment: http://stackoverflow.com/comment/39134442
tagged with: asynchronous
has body: I am trying to build a simple node waterfall via async module. I'm just getting started with asynchronous programming in node. Basically - how to call callback() inside http.request function to continue waterfall AFTER response IS END? async.waterfall([ function (callback) { var req = http.request(options, function (response) { var str = '' response.on('data', function (chunk) { str += chunk; }); response.on('end', function () { /* I want to call callback() AFTER `response` is END */ }); }); req.end(); }, function (response, callback) { // some operations WITH request `output` }], function (err, results) { // end });

http://stackoverflow.com/comment/39140611
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25144195
score: 0
has text: short answer is Yes. long answer is it won't generate any useful traffic to that site regarding advertising. it is just loading the html not the ads.

http://stackoverflow.com/comment/39073997
type: QuestionComment
has text: Glad I could help. And thanks for letting me know there is the `ng-resource` module out there! I could imagine many people have already been confused by that.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25107197

http://stackoverflow.com/comment/39265241
score: 0
type: AnswerComment
has text: My eyes. Oh my eyes are burning.
comment on: http://stackoverflow.com/a/25211136
type: Comment

http://stackoverflow.com/comment/39201512
type: QuestionComment
has text: @DoXicK - Thank you, however, I just tested that statement and IE do not fire `onresize` when some element changes it's dimensions. I tried that: `document.getElementById('test_div').style.width = '91%';` No resize event were fired.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25119868

http://stackoverflow.com/comment/39088266
score: 0
has text: are using asp.net update panel? else it's working fine with me
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25116118

http://stackoverflow.com/comment/39081163
has text: It may be possible, I don't know the full context about how you're using your filters. Adding 'track by' in your filter may actually fix the issue since it will no longer rely on reference equality to determine if an item has changed (in other words, using track by may allow you to have new instances in the filtered list without angular treating it as if the item has changed). If you post a simplified fiddle and add it to your original post, it may help with the answer.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25103025

http://stackoverflow.com/q/25129298
downvote count: 0
favorite count: 0
tagged with: rest
upvote count: 8
type: Question
has answer: http://stackoverflow.com/a/52589498
has title: Securing Private API keys in Javascript Web App
answer count: 3
tagged with: authentication
score: 8
has answer: http://stackoverflow.com/a/25192736
has answer: http://stackoverflow.com/a/25130977
tagged with: javascript
type: UnansweredQuestion
tagged with: security
has body: How can I securely store the keys to my private API in my web based (javascript) application? I've thoroughly researched this but am yet to find a solid answer or any kind of standard procedure. My API implements HMAC authentication, and every member of my site has a public/secret key to authenticate their use of the API and sign their request. On a mobile app, the server would send the public/secret keys over an encrypted connection to be stored on the device after a successful login request. Subsequent requests would be signed using these keys. So where should I store the keys on the client in this case, considering that the source code is visible to anyone who knows how to use a web inspector? In reality it's not an issue if the authenticated user sees their own keys, as they're unlikely to share them just like they'd be unlikely to share their account username/password with anyone else. Possible Solutions? Store the public/secret keys in cookies, and retrieve using javascript - Probably not too secure, can the cookies be reliably cleared when the user logs out/their session ends? Store the public/secret keys in the web-page itself - Only real solution I can think of - Javascript can access the keys through the DOM, and they can only be compromised(seen) if the user leaves their account logged in, and somebody knows where to look for them. Note: The web app is not a single-page app, so storing the public/secret keys within the memory is not an option. Not sure if i'm on the right track at all (something tells me I'm not), hopefully someone can set me straight on this. Thanks
tagged with: api

http://stackoverflow.com/q/25131839
has body: Can Anyone help me out that how to delete Folder in Phonegap For IOS. I am able to delete File from file system but not able to delete folder from file system.
duplicate of: http://stackoverflow.com/q/13355641
tagged with: ibm-mobilefirst
tagged with: cordova
answer count: 0
type: UnansweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39121998
has title: Delete Folder From File system in phonegap for IOS
tagged with: javascript
linked to: http://stackoverflow.com/q/13355641
has comment: http://stackoverflow.com/comment/39117673
downvote count: 0
tagged with: ios
score: 1
favorite count: 0

http://stackoverflow.com/a/25217682
score: 1
has body: Maybe add an extra outer container? Then center the 1000px container within the outer one. Then when you resize the window the image slider will respond to the outer container and the inner container stays centered. outerContainer { width: 100%; ..... } innerContainer { width: 1000px; margin: auto; /*or left:50% right:50%*/ }
answers question: http://stackoverflow.com/q/25216695
downvote count: 0
type: Answer
upvote count: 1

jquery
tags question: http://stackoverflow.com/q/25092095
tags question: http://stackoverflow.com/q/25225429
tags question: http://stackoverflow.com/q/25159022
tags question: http://stackoverflow.com/q/25208625
tags question: http://stackoverflow.com/q/25195755
tags question: http://stackoverflow.com/q/25123716
tags question: http://stackoverflow.com/q/25122514
tags question: http://stackoverflow.com/q/25216011
tags question: http://stackoverflow.com/q/25168059
tags question: http://stackoverflow.com/q/25095769
tags question: http://stackoverflow.com/q/25167453
tags question: http://stackoverflow.com/q/25071481
tags question: http://stackoverflow.com/q/25218731
tags question: http://stackoverflow.com/q/25211393
tags question: http://stackoverflow.com/q/25085932
tags question: http://stackoverflow.com/q/25128638
tags question: http://stackoverflow.com/q/25075886
tags question: http://stackoverflow.com/q/25098915
tags question: http://stackoverflow.com/q/25224737
tags question: http://stackoverflow.com/q/25193211
tags question: http://stackoverflow.com/q/25210726
tags question: http://stackoverflow.com/q/25137833
tags question: http://stackoverflow.com/q/25225594
tags question: http://stackoverflow.com/q/25074686
tags question: http://stackoverflow.com/q/25107229
tags question: http://stackoverflow.com/q/25191778
tags question: http://stackoverflow.com/q/25110323
tags question: http://stackoverflow.com/q/25207093
tags question: http://stackoverflow.com/q/25081449
tags question: http://stackoverflow.com/q/25173661
tags question: http://stackoverflow.com/q/25119147
tags question: http://stackoverflow.com/q/25159085
tags question: http://stackoverflow.com/q/25094228
tags question: http://stackoverflow.com/q/25095111
tags question: http://stackoverflow.com/q/25217508
tags question: http://stackoverflow.com/q/25158612
tags question: http://stackoverflow.com/q/25202035
tags question: http://stackoverflow.com/q/25147085
tags question: http://stackoverflow.com/q/25196895
tags question: http://stackoverflow.com/q/25191538
tags question: http://stackoverflow.com/q/25193126
tags question: http://stackoverflow.com/q/25182471
tags question: http://stackoverflow.com/q/25133812
tags question: http://stackoverflow.com/q/25221335
tags question: http://stackoverflow.com/q/25185610
tags question: http://stackoverflow.com/q/25142740
tags question: http://stackoverflow.com/q/25163888
tags question: http://stackoverflow.com/q/25206095
tags question: http://stackoverflow.com/q/25218709
tags question: http://stackoverflow.com/q/25207028
tags question: http://stackoverflow.com/q/25170362
tags question: http://stackoverflow.com/q/25149864
tags question: http://stackoverflow.com/q/25166467
tags question: http://stackoverflow.com/q/25090088
tags question: http://stackoverflow.com/q/25075687
tags question: http://stackoverflow.com/q/25177101
tags question: http://stackoverflow.com/q/25217365
tags question: http://stackoverflow.com/q/25191457
tags question: http://stackoverflow.com/q/25070099
tags question: http://stackoverflow.com/q/25119704
tags question: http://stackoverflow.com/q/25156082
tags question: http://stackoverflow.com/q/25178392
tags question: http://stackoverflow.com/q/25187873
tags question: http://stackoverflow.com/q/25129041
tags question: http://stackoverflow.com/q/25170655
tags question: http://stackoverflow.com/q/25196588
tags question: http://stackoverflow.com/q/25165030
tags question: http://stackoverflow.com/q/25210566
tags question: http://stackoverflow.com/q/25097181
tags question: http://stackoverflow.com/q/25191740
tags question: http://stackoverflow.com/q/25206342
tags question: http://stackoverflow.com/q/25173531
tags question: http://stackoverflow.com/q/25154580
tags question: http://stackoverflow.com/q/25123740
tags question: http://stackoverflow.com/q/25069831
tags question: http://stackoverflow.com/q/25174972
tags question: http://stackoverflow.com/q/25217054
tags question: http://stackoverflow.com/q/25147038
tags question: http://stackoverflow.com/q/25155027
tags question: http://stackoverflow.com/q/25178626

http://stackoverflow.com/comment/39123618
type: AnswerComment
comment on: http://stackoverflow.com/a/25135078
score: 0
type: Comment
has text: whooo that worked, image gets saved but it's empty. but thats a different problem and probably another question. thanx.

http://stackoverflow.com/comment/39166875
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25158543
has text: my simple question is how to set image in div using div heigth width
score: 0

http://stackoverflow.com/q/25223956
tagged with: arrays
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39289195
has body: I have seen this answer (and a couple others as well) and it provides an understandable way of accessing a PHP array. But in the example, the PHP and the JavaScript are in the same file. However, I can not write Javascript in my PHP file for some reasons, and what I am rather doing is invoking the JS present in another file. So I need to access an array from the PHP in the JS file. How can I do that? I prefer it without AJAX (if possible) because I have not yet started learning AJAX.
has comment: http://stackoverflow.com/comment/39289119
has answer: http://stackoverflow.com/a/25224000
has comment: http://stackoverflow.com/comment/39289098
has title: How to access a PHP array from JS "in another file"?
linked to: http://stackoverflow.com/q/1808108
has answer: http://stackoverflow.com/a/25224159
has comment: http://stackoverflow.com/comment/39289093
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39289317
has comment: http://stackoverflow.com/comment/39289411
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/39289252
has comment: http://stackoverflow.com/comment/39289255
has comment: http://stackoverflow.com/comment/39289182
score: 1
has comment: http://stackoverflow.com/comment/39289287
type: Question
answer count: 2

http://stackoverflow.com/comment/39055978
type: QuestionComment
comment on: http://stackoverflow.com/q/25098705
score: 0
has text: Try using handler for delay.
type: Comment

http://stackoverflow.com/comment/39252626
has text: It is still not clear to me what you exact problem is. Do you ask how to submit to the server, which Checkbox was clicked? Or do you want to know how to load the data from the database in the JSP?
comment on: http://stackoverflow.com/q/25204160
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25096743
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39053399
accepted answer: http://stackoverflow.com/a/25097501
has comment: http://stackoverflow.com/comment/39052256
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39053144
tagged with: modernizr
has body: I'm looking at modernizr which is supposed to help with feature detection which is supposedly the bees knees in figuring out if your website is compatible with a given web browser but I do not see anything that indicates that I can use it to detect custom HTML elements that we create &amp; define in our content. If it's not modernizr, how do I reliably detect whether a browser is capable of handling custom HTML elements the "HTML 5" way?
upvote count: 7
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/63859525
has answer: http://stackoverflow.com/a/63859525
score: 7
has answer: http://stackoverflow.com/a/25097501
type: Question
answer count: 2
has title: how to detect if browsers support custom elements
downvote count: 0

http://stackoverflow.com/comment/39002746
score: 2
comment on: http://stackoverflow.com/q/25070001
type: Comment
type: QuestionComment
has text: If parent/child always go in pairs, the Angular way would be to use a single directive and drop all the $watch and click listeners and manipulate the scope variables directly. Of course, in some cases that might not be possible, but it usually is.

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/25128679
tags question: http://stackoverflow.com/q/25229819
tags question: http://stackoverflow.com/q/25189263
tags question: http://stackoverflow.com/q/25143866
tags question: http://stackoverflow.com/q/25130694
tags question: http://stackoverflow.com/q/25093456
tags question: http://stackoverflow.com/q/25079189
tags question: http://stackoverflow.com/q/25101980
tags question: http://stackoverflow.com/q/25144329
tags question: http://stackoverflow.com/q/25211111
tags question: http://stackoverflow.com/q/25071805
tags question: http://stackoverflow.com/q/25183579
tags question: http://stackoverflow.com/q/25206242
tags question: http://stackoverflow.com/q/25102593
tags question: http://stackoverflow.com/q/25166150
tags question: http://stackoverflow.com/q/25116990
tags question: http://stackoverflow.com/q/25105773
tags question: http://stackoverflow.com/q/25092969
tags question: http://stackoverflow.com/q/25109255
tags question: http://stackoverflow.com/q/25113110
tags question: http://stackoverflow.com/q/25215307
tags question: http://stackoverflow.com/q/25198225
tags question: http://stackoverflow.com/q/25131640
tags question: http://stackoverflow.com/q/25087930
tags question: http://stackoverflow.com/q/25208124
tags question: http://stackoverflow.com/q/25126067
tags question: http://stackoverflow.com/q/25192947
tags question: http://stackoverflow.com/q/25146449
tags question: http://stackoverflow.com/q/25070397
tags question: http://stackoverflow.com/q/25201257
tags question: http://stackoverflow.com/q/25216911
tags question: http://stackoverflow.com/q/25208591
tags question: http://stackoverflow.com/q/25212027
tags question: http://stackoverflow.com/q/25104137
tags question: http://stackoverflow.com/q/25114299
tags question: http://stackoverflow.com/q/25183726
tags question: http://stackoverflow.com/q/25138522
tags question: http://stackoverflow.com/q/25205563
tags question: http://stackoverflow.com/q/25174140
tags question: http://stackoverflow.com/q/25204863
tags question: http://stackoverflow.com/q/25103031
tags question: http://stackoverflow.com/q/25116384
tags question: http://stackoverflow.com/q/25193806
tags question: http://stackoverflow.com/q/25169267
tags question: http://stackoverflow.com/q/25215109
tags question: http://stackoverflow.com/q/25197581
tags question: http://stackoverflow.com/q/25178707
tags question: http://stackoverflow.com/q/25146762
tags question: http://stackoverflow.com/q/25151814
tags question: http://stackoverflow.com/q/25191970
tags question: http://stackoverflow.com/q/25091621
tags question: http://stackoverflow.com/q/25145058
tags question: http://stackoverflow.com/q/25077700
tags question: http://stackoverflow.com/q/25105528
tags question: http://stackoverflow.com/q/25221095
tags question: http://stackoverflow.com/q/25196326
tags question: http://stackoverflow.com/q/25137757
tags question: http://stackoverflow.com/q/25217181
tags question: http://stackoverflow.com/q/25156674
tags question: http://stackoverflow.com/q/25132681
tags question: http://stackoverflow.com/q/25072105
tags question: http://stackoverflow.com/q/25147447
tags question: http://stackoverflow.com/q/25098210
tags question: http://stackoverflow.com/q/25223843
tags question: http://stackoverflow.com/q/25101947
tags question: http://stackoverflow.com/q/25144195
tags question: http://stackoverflow.com/q/25190211
tags question: http://stackoverflow.com/q/25221005
tags question: http://stackoverflow.com/q/25186822
tags question: http://stackoverflow.com/q/25217747
tags question: http://stackoverflow.com/q/25171907
tags question: http://stackoverflow.com/q/25206171
tags question: http://stackoverflow.com/q/25182810
tags question: http://stackoverflow.com/q/25173985
tags question: http://stackoverflow.com/q/25170844
tags question: http://stackoverflow.com/q/25093883
tags question: http://stackoverflow.com/q/25193309
tags question: http://stackoverflow.com/q/25191133
tags question: http://stackoverflow.com/q/25168301
tags question: http://stackoverflow.com/q/25096785

http://stackoverflow.com/q/25134167
tagged with: color-picker
answer count: 1
downvote count: 1
has body: I am making a simple painting program in jQuery and HTML. For this I am using the Spectrum color picker (http://bgrins.github.io/spectrum/). I have made a grid of hundreds of 16x16 squares (div class pixel), and when one of them is clicked, it will get filled in with the color from the Spectrum color picker, but I don't know how to. Here is my code: Pixel Painter http://jsfiddle.net/jGb33/
has answer: http://stackoverflow.com/a/25134376
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25134376
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has title: jquery - Fill div with color from color-picker
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: paint
has comment: http://stackoverflow.com/comment/39121830
upvote count: 2

http://stackoverflow.com/a/31621665
type: Answer
has body: I've used jClock in previous project and it's always worked well: https://github.com/dsparling/jclock After installing the plugin js file you can call it like this: $(document).ready(function () { $('.jclock').jclock({format: '%I:%M:%S %p'}); }); Sample Styling: .jclock { background-color:Navy; color: #ffffff; font-weight: bold; font-size: 64pt; text-align: center; height: 100px; text-shadow: 2px 2px 2px #fff; border-radius: 15px 15px 0px 0px; -moz-border-radius: 15px 15px 0px 0px; -webkit-border-radius: 15px 15px 0px 0px; -webkit-text-stroke-width: 2px; -webkit-text-stroke-color: black; }
score: 0
answers question: http://stackoverflow.com/q/25120056

http://stackoverflow.com/comment/39424730
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25219723
has text: I (newbie!) Separated windows in fiddle, quite confusing. Always see parts parts on crap sites, not sure where to put! Why no complete codes blended together? Can a Animation codes all put in 1 side like my pic below? Not every codes blended can run in fiddle guarantee can work in Blogger. Answer: Not compatible, or Glitch! But your code amended (add 'moveUp' function one) same as removed the .stop() (Now working!) But both methods, the balloon bypass underneath the footer open big gap! Till can scrolling down.... Any solution to fix it, stop at a certain height?
type: AnswerComment

http://stackoverflow.com/comment/39020699
score: 0
comment on: http://stackoverflow.com/a/25079680
type: Comment
type: AnswerComment
has text: It wouldn't. That's why there is the `default` case.

http://stackoverflow.com/comment/39187942
type: Comment
type: QuestionComment
has text: `JSON.parse()` -- use it.
comment on: http://stackoverflow.com/q/25169513
score: 0

http://stackoverflow.com/q/25184469
accepted answer: http://stackoverflow.com/a/25184870
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39214984
score: 1
has comment: http://stackoverflow.com/comment/39215032
upvote count: 1
linked to: http://stackoverflow.com/q/6298566
type: Question
has answer: http://stackoverflow.com/a/25184870
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39215449
has title: Match input field with pattern
favorite count: 0
has body: Im using a java script method to check if fields are valid so that the form can continue. This works fine until it gets to the post code because that has to be a specific pattern . Is there anyway to check if the value of the field matches the pattern and then allow the form to continue. As you can see , its set to only let the form progress if the lengths are greater than 0 , which is not good for the form , but worse for the postcode part. Javascript: function processPhase2(){ houseN = _("Hnumber").value; lineone = _("Caddress1").value; linetwo = _("Caddress2").value; cityC = _("Ccity").value; countyC = _("Ccounty").value; postalcodeC = _("Cpostalcode").value; if(houseN.length > 0 && lineone.length > 0 && cityC.length > 0 && countyC.length > 0 && postalcodeC.length > 0){ _("phase2").style.display = "none"; _("phase3").style.display = "block"; _("progressBar").value = 66; _("status").innerHTML = "Phase 3 of 3"; } else { } } Input field: Postal Code
has comment: http://stackoverflow.com/comment/39215480

http://stackoverflow.com/q/25192111
has answer: http://stackoverflow.com/a/25195941
answer count: 1
tagged with: angularjs
type: UnansweredQuestion
tagged with: forms
has body: I am including the .css and .js files for macgyver in my HTML. I am also including 'Mac' as a dependency in my angular app. I put this code in my HTML: And I get an input box, but it is not auto-completing. Any ideas?
has comment: http://stackoverflow.com/comment/39229828
type: Question
has title: MacGyver Angular mac-autocomplete directive not auto-completing
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39082102
type: Comment
comment on: http://stackoverflow.com/a/25110789
score: 0
has text: @user3665790 so the above code isn't qualified as a "simple example"? I would be happy to answer if you have specific questions.
type: AnswerComment

http://stackoverflow.com/comment/39301329
comment on: http://stackoverflow.com/q/25230122
has text: @prajmus I tried it as shown in my edit but it executes a second after I released the button again..
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25214141
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: macros
type: Question
has answer: http://stackoverflow.com/a/25214239
tagged with: sweet.js
downvote count: 0
answer count: 1
tagged with: javascript
has title: Sweet.js - How to put variable in identifier name and string variable?
favorite count: 0
has body: I'm brand new to Sweet.js. My first simple macro is the following macro test { rule { $className($entityName) } =&gt; { function test$className() { console.print("$className"); console.print("$entityName"); } } } test me(More) which produces function test$className() { console.print(me); console.print(More); } but I'd like it to produce this: function testMe() { console.print("me"); console.print("More"); } but any variants I've tried for it haven't worked. Any suggestions?
accepted answer: http://stackoverflow.com/a/25214239

http://stackoverflow.com/comment/39267621
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25211609
has text: @Jcmoney1010 I'll typically include the network name plus my search criteria in Google in order to get to the relevant page on the site, otherwise it can be hard to navigate to.

http://stackoverflow.com/comment/39228413
score: 1
has text: Links can go away. Any relevant information should be included as part of your question. If it is too long, you need to create an [MCVE](http://stackoverflow.com/help/mcve).
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25190791

http://stackoverflow.com/a/25225556
type: Answer
accepted answer of: http://stackoverflow.com/q/25198155
answers question: http://stackoverflow.com/q/25198155
has body: <cfinclude template="webservices/travelit_request.cfm"> <cfset mynewURL = "#XML_URL#"> <cfset mynewURL &= "&adref=0"> Page didn't open? Click Here. Your request was cancelled. Please retry. This would work, it leaves the page you're on where it's at, and opens a new page, offering a link if it didn't open. Of course, this should actually be in the proper place in your document's output.
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39237998
has text: It should be `ng-checked="is_active_yes"`
type: QuestionComment
comment on: http://stackoverflow.com/q/25196643
score: 1
type: Comment

http://stackoverflow.com/a/25126594
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25126532
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25126532
has body: wrap it in a function, say init, and call that function on the success of your ajax call. function initSearch(){ $("#SearchTitle").autocomplete({ source: availableMasters }); } if ($('input[name=SearchType]:checked').val() == "m") { var availableMasters = ["ActionScript", "AppleScript", "Asp"]; $.ajax({ cache: false, type: "GET", url: "@(Url.Action("Get", "Masters"))", success: function (data) { availableMasters = data.list; initSearch(); }, error: function () { alert('No Master Available.'); } }); }
type: Answer
score: 1

android
tags question: http://stackoverflow.com/q/25109044
tags question: http://stackoverflow.com/q/25144195
tags question: http://stackoverflow.com/q/25081375
tags question: http://stackoverflow.com/q/25103975
tags question: http://stackoverflow.com/q/25163401
tags question: http://stackoverflow.com/q/25120749
tags question: http://stackoverflow.com/q/25118869
tags question: http://stackoverflow.com/q/25188160
tags question: http://stackoverflow.com/q/25199615
tags question: http://stackoverflow.com/q/25151940
tags question: http://stackoverflow.com/q/25159850
tags question: http://stackoverflow.com/q/25105727
tags question: http://stackoverflow.com/q/25130670
tags question: http://stackoverflow.com/q/25195477
tags question: http://stackoverflow.com/q/25098705
tags question: http://stackoverflow.com/q/25192488
tags question: http://stackoverflow.com/q/25202432
tags question: http://stackoverflow.com/q/25078590
tags question: http://stackoverflow.com/q/25173360
tags question: http://stackoverflow.com/q/25140718
tags question: http://stackoverflow.com/q/25139227
tags question: http://stackoverflow.com/q/25210456
tags question: http://stackoverflow.com/q/25211001
tags question: http://stackoverflow.com/q/25169863
tags question: http://stackoverflow.com/q/25201699
tags question: http://stackoverflow.com/q/25118331
tags question: http://stackoverflow.com/q/25152829
tags question: http://stackoverflow.com/q/25106396
tags question: http://stackoverflow.com/q/25099515
tags question: http://stackoverflow.com/q/25188684
tags question: http://stackoverflow.com/q/25076736
tags question: http://stackoverflow.com/q/25123697
tags question: http://stackoverflow.com/q/25179387
tags question: http://stackoverflow.com/q/25164927
tags question: http://stackoverflow.com/q/25205456
tags question: http://stackoverflow.com/q/25184236
tags question: http://stackoverflow.com/q/25135354
tags question: http://stackoverflow.com/q/25071202
tags question: http://stackoverflow.com/q/25139888
tags question: http://stackoverflow.com/q/25125967
tags question: http://stackoverflow.com/q/25074903
tags question: http://stackoverflow.com/q/25226939
tag name: android
tags question: http://stackoverflow.com/q/25070444
tags question: http://stackoverflow.com/q/25178894
tags question: http://stackoverflow.com/q/25209407
tags question: http://stackoverflow.com/q/25163497
tags question: http://stackoverflow.com/q/25177609
type: Tag

http://stackoverflow.com/q/25228571
has body: I'm working on a system for my university and I'm using the play framework to do that. The Admin of this system sets a marker on a google map and I get the coordinates from that point. Now I'm trying to pass this information to the server side, so that I might store these to Strings in a mySQL database. The only problem I have is passing the data from my String in javascript/JQuery to the java function. I tried different solutions on the internet but some of them seemed outdated and I couldn't figure out how to do it. I've only been programming in Java, Javascript, JQuery and PHP and have never used AJAX (like the $.get() methode from JQuery), but I think it might be pretty similar to what I know from PHP. e.g. http://java.dzone.com/articles/jquery-ajax-play-2 I'd like to pass my String with a button click to my java function, so I can store it in my db. I'm really confused about this. I know I can use something like &lt;a href="{@routes.Application.postMethod()}"&gt; Send &lt;/&gt; and then mention the function in the routes like POST /post controllers.Application.post(); but how do I pass my qjuery string? and how do I store my String as a String in a java function like: public static Result post(String Lat, String Lng){ ???????????? EVOLUTION NEEDED ????? } Thanks in advance I really need your help :)!
upvote count: 3
tagged with: playframework-2.3
has title: Sending a String in Javascript to java method in Play Framework
tagged with: java
accepted answer: http://stackoverflow.com/a/25229653
type: Question
type: AnsweredQuestion
score: 3
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25229653

http://stackoverflow.com/comment/39096921
comment on: http://stackoverflow.com/a/25120616
score: 0
type: AnswerComment
has text: Alright- a bit of explanation: The data is actually created in a `form` whose `action` attribute, say, is `page1.php` (so the data is sent to `page1.php`) Now I need this data in `page2.php`. `page1.php` is not linked to `page2.php`
type: Comment

http://stackoverflow.com/comment/39121213
type: QuestionComment
has text: How does the output of `responseObj.me[i].webUrl` look like?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25133812

http://stackoverflow.com/q/25192343
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39230380
type: Question
accepted answer: http://stackoverflow.com/a/25192487
answer count: 1
tagged with: javascript
score: 0
tagged with: node.js
has body: I'm just getting started with Node and have some simple results from the gm package. What I want to do now is draw many (thousands or more) shapes on an image. I can't figure out how to create multiple shapes other than gm(source) .draw('rectangle', 0, 0, 100, 100, 'rectangle', 100, 100, 200, 200) .write(dest, writeCallback); or gm(source) .drawRectangle(0, 0, 100, 100) .drawRectangle(100, 100, 200, 200) .write(dest, writeCallback); Is there a way to use an iterator to achieve this? Building a string doesn't work due to the way that 'draw()' accepts arguments. I appreciate any assistance or direction!
has title: What is a method to draw many graphic primitives using node.js and gm?
has answer: http://stackoverflow.com/a/25192487
tagged with: graphicsmagick

http://stackoverflow.com/comment/39036405
type: QuestionComment
has text: I updated the answer to fit what you needed.
comment on: http://stackoverflow.com/q/25087783
score: 0
type: Comment

http://stackoverflow.com/comment/39060196
has text: Why are you reading line-by-line? There is some streaming JSON code out there but it's finicky... you need the rest of the object for full context. Just read the whole thing and use `json_decode()`.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25100983
score: 2

http://stackoverflow.com/q/25113959
upvote count: 1
downvote count: 1
has title: angularjs amount of method calls in in-include with ng-repeat
type: Question
accepted answer: http://stackoverflow.com/a/25114187
tagged with: javascript
score: 0
answer count: 1
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25114187
type: AnsweredQuestion
has body: We need to render a tree structure with angularjs. We are doing it with recursive templates, and it works before we have more than 100 items in the tree. What I noticed it that getTemplate method is called multiple times. I know that its ok for angular to do that, but as for me it is too much. In this simple example getTemplate method is called 9 times, I don't believe that this won't hurt the performance. In our real case with recursive template amount of get template is just insane and can reach 100 for 3 items in tree. Is there any way to optimize ng-include somehow? Sample: http://plnkr.co/edit/tDAL5I0L5qVR4JYxhjaa?p=preview

http://stackoverflow.com/comment/39066389
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25097737
has text: @FélixGagnon-Grenier, this error is due the fact that jsFiddle does not accept GET request, only POST and the link is a relative one. See [here](http://stackoverflow.com/questions/11528621/please-use-post-request-in-jsfiddle) for more details
score: 0

http://stackoverflow.com/q/25155691
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25155866
tagged with: javascript
has body: I'm having an issue in mapping the elements of an object and binding them to an element using Knockout.js. The relevant section of HTML is as follows: Distribution: The elements of the options.distributions array contain two elements, key and value. Relevant Javascript: function Options(data) { var self = this; self.distributions = ko.observableArray(data.Distributions); //Disposal self.isDisposed = false; self.dispose = function () { self.distributions.dispose(); self.isDisposed = true; }; } And the output options tags: Average Triangular A Distribution contains two elements: key, an integer, and value, a String. The value element is definitely coming through accurately into optionsText, but the key attribute is not coming through into the HTML at all. I'm almost certain the issue here lies in the HTML. Alternative value: bindings that I've tried are 'key', function() { return key; }, $data.key and item.key, but none of these have worked. If anyone can see what I'm missing here, that would be greatly appreciated.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39162543
has answer: http://stackoverflow.com/a/25155866
tagged with: knockout.js
type: Question
has title: Options value data-bind not working
possible better answer: http://stackoverflow.com/a/25156232
has answer: http://stackoverflow.com/a/25156232

http://stackoverflow.com/comment/39130605
comment on: http://stackoverflow.com/q/25136600
type: QuestionComment
has text: I checked, yes it is dynamically run
score: 0
type: Comment

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

http://stackoverflow.com/q/25198119
possible better answer: http://stackoverflow.com/a/25198268
score: 0
has title: how to cut object from array and put it in object itself
has comment: http://stackoverflow.com/comment/39240747
has comment: http://stackoverflow.com/comment/39240919
has answer: http://stackoverflow.com/a/25198215
accepted answer: http://stackoverflow.com/a/25198215
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39240715
has body: I have response object which contain array: Cars: [0]: { Name: 'Name1', Color: 'Color2' }, [1]: { Name: 'Name2', Color: 'Color2' }, I want to copy the first item in the array and put it to object, Cars have to look: Cars: { Name: 'Name1', Color: 'Color' },
has comment: http://stackoverflow.com/comment/39240907
type: Question
has answer: http://stackoverflow.com/a/25198268
answer count: 2
has comment: http://stackoverflow.com/comment/39241304
has comment: http://stackoverflow.com/comment/39241072
tagged with: javascript
has comment: http://stackoverflow.com/comment/39240717

http://stackoverflow.com/comment/39293892
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25226505
score: 0
has text: i use FreeTextBox and get text with : var html = ftb.GetHtml(); how use $('html style').remove()

http://stackoverflow.com/comment/39317102
comment on: http://stackoverflow.com/a/25169040
type: AnswerComment
has text: actually we have few other building jobs while this is running.as we started running code through the terminal,we came to know that this alone is eating up more memory.and moreover the js files are 210 in number that is around 949 MB.So is there any way to approach this reading and writing synchronously sort of idea? thanks in advance :)
score: 0
type: Comment

http://stackoverflow.com/a/25191358
has comment: http://stackoverflow.com/comment/39228473
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25191235
has comment: http://stackoverflow.com/comment/39228773
type: Answer
upvote count: 1
has body: Here you go: function geturl(url){ if (typeof url === 'string'){ var a = document.createElement('a'); a.href = url; url = a.pathname; } else url = window.location.pathname; alert(url.replace(/^\/[^\/]+\//, '/')); } Call this function using geturl('your url'). If no url is passed, it'll use the page's current url. The regular expression will replace a string at the beginning of the URL's path portion which is inside 2 / characters.
accepted answer of: http://stackoverflow.com/q/25191235
score: 1
has comment: http://stackoverflow.com/comment/39228686
downvote count: 0
has comment: http://stackoverflow.com/comment/39228389

http://stackoverflow.com/a/25111348
upvote count: 13
answers question: http://stackoverflow.com/q/25088406
accepted answer of: http://stackoverflow.com/q/25088406
type: Answer
has comment: http://stackoverflow.com/comment/42192792
downvote count: 0
score: 13
has body: AngularJS doesn't support CommonJS at the moment, so var angular = require("angular") doesn't work. Instead of it, use just require('angular'). 'use strict'; require('angular'); var Routes = require("./routes"); angular.module('MyAngularApp') .config(Routes); The Angular object will be loaded globally and it'll be able to be accessed by other JS files, too.
has comment: http://stackoverflow.com/comment/45029351
has comment: http://stackoverflow.com/comment/50898307
type: AcceptedAnswer

http://stackoverflow.com/comment/39084912
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25114299
has text: Please enter specific details of the problems. CSS and JS errors are shown in the browser console. Server logs also might lead to the root cause of the problem directly rather than asking people to execute some random code and find it out themselves. You may want to provide those. Its not clear what you are asking here. Please read the FAQ on how to ask proper questions.
score: 0

http://stackoverflow.com/q/25078521
has title: PouchDb - remove object inside document
type: Question
tagged with: javascript
tagged with: api
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25079799
tagged with: pouchdb
tagged with: angularjs
has body: I'm an Italian PouchDb and AngularJS Developer. My json document is: { "_id": "6", "_rev": "3-f7283d7683cd6fb15753f494aad1d49f", "name": "Ivrea", "owners": [ { "owner_id": 1, "name": "asdas", "address": "asdas", "gender": "Uomo", "type": "Assente", "notes": [ ] }, { "owner_id": 2, "name": "balbaba", "address": "blabla", "gender": "Uomo", "type": "Assente", "notes": [ ] } ] } and after an ng-click action, I will delete owner_id: 2 object inside _id: 6 document. In API reference I found only document delete action, but not how to delete object inside document. Thanks for your reply!! Alessandro
accepted answer: http://stackoverflow.com/a/25079799
score: 2
type: AnsweredQuestion
upvote count: 2

http://stackoverflow.com/comment/39102622
has text: you have an error there. Just remove "filter" function to see that it works and work a bit on your function, because it doesn't filter.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25123611

http://stackoverflow.com/a/25213280
type: Answer
downvote count: 0
has body: If you are just looking for the basic JavaScript SDK setup, it should go directly under the opening body tag (along with the snippet to asynchronously load the SDK) like so: &lt;body&gt; &lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : '{your-app-id}', xfbml : true, version : 'v2.0' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); &lt;/script&gt; &lt;!-- Your code here --&gt; &lt;/body&gt; Here's where it's described in their quickstart guide: https://developers.facebook.com/docs/javascript/quickstart/v2.1. Then, later, you should just be able to use the share dialogue wherever you need it: FB.ui({ method: 'share', href: 'https://developers.facebook.com/docs/', }, function(response){}); Here's where that's described: https://developers.facebook.com/docs/sharing/reference/share-dialog
score: 3
accepted answer of: http://stackoverflow.com/q/25212768
answers question: http://stackoverflow.com/q/25212768
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/q/25189041
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has title: Loading ajax first time on page load
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25189139
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: On my PHP page I use AJAX to fetch items for an auction, everything is working properly when something is chosen from the dropdown lists (as can be seen from picture 1 ). My problem is that when the page loads for the first time (see second picture ) than nothing happens while I just want the default values of the dropdown list to be loaded in Ajax just like the rest, how do I go around this issue? Note that in the first picture I first selected something else and then selected the default values again, the 2nd picture is the page when i open up my browser and do nothing else. my code: $(function() { $("#filtercatselect").on("change", function() { var categoryid = document.getElementById("filtercatselect").value; var orderbyname = document.getElementById("filterorderbyselect").value; if(categoryid == "") { categoryid = 0; } $.post('homefiltering.php', { catid: categoryid, sortname: orderbyname }, function(result) { $('#item-container').html(result); } ); }); $("#filterorderbyselect").on("change", function() { var categoryid = document.getElementById("filtercatselect").value; var orderbyname = document.getElementById("filterorderbyselect").value; if(categoryid == "") { categoryid = 0; } $.post('homefiltering.php', { catid: categoryid, sortname: orderbyname }, function(result) { $('#item-container').html(result); } ); }); });
type: Question
possible better answer: http://stackoverflow.com/a/25189162
has answer: http://stackoverflow.com/a/25189162
has answer: http://stackoverflow.com/a/25189139

http://stackoverflow.com/comment/39032231
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25085473
score: 0
has text: Typically you would create a single global object (like jquery does for example) and all of your stuff you want exposed is exposed on that object. Everything else is stored in the closures of the immediate function that created that object.

http://stackoverflow.com/comment/39023269
comment on: http://stackoverflow.com/q/25080897
score: 0
type: Comment
type: QuestionComment
has text: if you care about older browsers, you should always check the function before calling stopPropagation aka if(e.stopPropagation) e.stopPropagation();

http://stackoverflow.com/q/25136439
type: UnansweredQuestion
has title: HtmlUnit download file
score: 3
has comment: http://stackoverflow.com/comment/39126110
tagged with: java
has comment: http://stackoverflow.com/comment/39126176
type: Question
has comment: http://stackoverflow.com/comment/39125934
answer count: 2
has answer: http://stackoverflow.com/a/28471835
has comment: http://stackoverflow.com/comment/39126481
tagged with: htmlunit
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I am trying to download file via HTMLUnit. But every time when I use code like this: InputStream stream = anchor.click().getWebResponse().getContentAsStream(); i get website instead file. Download link looks like this: Is there any way to download this?
has answer: http://stackoverflow.com/a/45687835
upvote count: 3

http://stackoverflow.com/comment/39281445
score: 0
has text: Essentially what I am trying to do is make photos seem like they are overlapped. When the first image fades in it will remain for a while and then fade out and the other one will be right there behind it.
type: QuestionComment
comment on: http://stackoverflow.com/q/25219638
type: Comment

http://stackoverflow.com/a/25109380
has body: here you go => http://jsfiddle.net/c3w6X/1/ var children=''; $('#container').children().each(function(){ $(this).html($(this).html().replace(/Hi/g,"Hello")); //change the text of the children children=children+$(this)[0].outerHTML; //copy the changed child }); var theText=$('#container').clone().children().remove().end().text(); //get the text outside of the child in the root of the element $('#container').html(''); //empty the container $('#container').append(children+theText.replace(/Hi/g,"Hello")); //add the changed text of the root and the changed children to the already emptied element
answers question: http://stackoverflow.com/q/25109275
has comment: http://stackoverflow.com/comment/39075927
score: 0
has comment: http://stackoverflow.com/comment/39075917
has comment: http://stackoverflow.com/comment/39075958
type: Answer
has comment: http://stackoverflow.com/comment/39075886

http://stackoverflow.com/q/25102841
score: 1
accepted answer: http://stackoverflow.com/a/25321289
has title: How to create crawelable Ajax using jquery?
answer count: 2
upvote count: 1
tagged with: php
has answer: http://stackoverflow.com/a/25108830
has body: I am going to create a crawelable ajax by jquery, How to do it? before I had a website that used jquery Ajax for searching my website but nothing indexed. this is the new way tha I use: page 1 And then show result by ajax and don't allow the link to go: javascript $("body").on("click","#linkA",function(e){ e.preventDefault(); var href=$(this).attr('href'); $.ajax({ type:"POST", url:"ajax/return.php", data:({page:href}), success:function(data){ $("body").html(data); } }) }); my questions: 1- Is the way that I am using true? 2- Is this way crawelable?
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25108830
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39063439
has comment: http://stackoverflow.com/comment/39063493
type: Question
has answer: http://stackoverflow.com/a/25321289
tagged with: seo

http://stackoverflow.com/q/25181848
upvote count: 1
answer count: 1
has body: I am in the middle of creating a node.js project however I am concerned as to the performance of the website once it is up and running. I am expecting it to have a surge of maybe 2000 users for 4-5 hours over a period of one night per week. The issue is that each user could be receiving a very small message once every second. i.e a timer adjustment or a price change. 2000*60 = 120000 messages in total per minute. Would this be possible it would be extremely important that there was minimum lag, less than 1 second if possible? Thanks for the help
favorite count: 0
tagged with: sockets
tagged with: node.js
has title: Node.js scalable/performance capabilities with large number of users
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: socket.io
has answer: http://stackoverflow.com/a/25183022
tagged with: javascript
type: Question

http://stackoverflow.com/q/25082126
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25082259
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25082259
has body: I want to fetch the json data from serve and then loop the rows of table. the html code is like: Topic Title Author Name Likes Created Time Actions the jQuery part: $.ajax({ url: some url here, type:'GET', success:function(res){ $.each(res, function(index, value){ $('#topics_list_table > tbody:last'). append( " " + " " + value.title + " "+ " " + value.author_name + " "+ " " + value.likes + " "+ " " + value.created + " "+ " " + "check"+ " "+ " " ); }); } }); I could get all the data from the remote side, but the key question is this part check I inspect this page and found, sth like check already exists in the dom. but 1, the style class="mini ui black buttons" can not be applied. 2, when you try to click the "check" and want to trigger the somefunction(). it doesnt work. so, why couldn't i get the dom element after appending the rows? OR, is there any other better way to loop rows after fetching the data? thx
linked to: http://stackoverflow.com/q/12284168
score: 1
has title: can not get the dom element after appending rows of table
duplicate of: http://stackoverflow.com/q/12284168
upvote count: 1
type: AnsweredQuestion
tagged with: javascript
tagged with: dom
type: Question
answer count: 1

http://stackoverflow.com/comment/39117870
score: 0
type: Comment
has text: We have committed several new features (including support for embedding YouTube videos) and bug fixes in the last couple of hours. Would you mind testing again? We haven't yet done a full analysis of which versions of jQuery the library supports. We are developing with jQuery v1.11.1 -- Firefox, Safari, and Chrome browser support is excellent, however IE min version right now is 10. Don't forget to visit this page frequently as each time we develop something new we showcase it here: http://xep.cloudformatter.com/doc/
comment on: http://stackoverflow.com/a/25088024
type: AnswerComment

http://stackoverflow.com/q/25131997
tagged with: google-maps
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39123688
favorite count: 0
has comment: http://stackoverflow.com/comment/39123017
has comment: http://stackoverflow.com/comment/39122061
has comment: http://stackoverflow.com/comment/39123440
accepted answer: http://stackoverflow.com/a/25135779
has comment: http://stackoverflow.com/comment/39123369
has comment: http://stackoverflow.com/comment/39121167
has body: I'm a beginner and was playing around with Javascript and GMAPS API v3. At first the map was loading to my page, but then when I created a form on that same page such that the user gives coordinates and upon clicking the submit button, the map should load. Now I've noticed two things: 1) It is constantly giving the error: TypeError: s is null https://maps.gstatic.com/mapfiles/api-3/17/13/main.js 2)The API is loading correctly, but the map is not being displayed. My JavaScript: var marker; var mapProp; var map; var myCenter; function initialize() { mapProp = { center: myCenter, zoom: 5, mapTypeId: google.maps.MapTypeId.TERRAIN }; map = new google.maps.Map(document.getElementById("googleMap"), mapProp); marker = new google.maps.Marker({ position: myCenter, }); marker.setMap(map); } function pan() { myCenter = new google.maps.LatLng(document.getElementById("latitude").value, document.getElementById("longitude").value); map.panTo(myCenter); } google.maps.event.addDomListener(window, 'load', initialize); My HTML: Redirect to: Latitude: Longitude: Submit And My CSS file: #googleMap { width: 800px; height: 600px; border: 2px solid black; } fieldset { display: block; width: 450px; border: 2px solid black; position: fixed; top: 5px; right: 5px; } legend { padding: 0.2em 0.5em; border:1px solid black; color:black; font-size:90%; text-align:right; } label { float:left; width:25%; margin-right:0.5em; padding-top:0.2em; text-align:right; font-weight:bold; } #submit { position: relative; margin-top: auto; margin-left: 63%; }
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39120403
downvote count: 0
has answer: http://stackoverflow.com/a/25135779
type: Question
has title: Google Maps API not loading map to page
has comment: http://stackoverflow.com/comment/39124603
tagged with: javascript
tagged with: google-maps-api-3
upvote count: 2
has comment: http://stackoverflow.com/comment/39124066

http://stackoverflow.com/comment/39217076
type: Comment
has text: Oh! You want to check against the pattern *every time* you validate; right now you are only checking when the page loads (which doesn't actually matter). Throw all of the postal-code validation stuff into your `processPhase2` function. Make sense?
comment on: http://stackoverflow.com/a/25184870
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39283848
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25220478
score: 0
has text: The way I would do that is have an attribute in your directive to set the number of months you're going to show, then use an `ng-repeat` for the month block inside your template.

http://stackoverflow.com/comment/39152051
has text: Thanks, may I know the approximate time to fix this.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25123019
type: Comment

http://stackoverflow.com/a/25095496
answers question: http://stackoverflow.com/q/25095354
upvote count: 2
downvote count: 0
type: Answer
score: 2
has body: Remove the onClick listener on the li tag. Instead, in the jQuery, find the band, album, and track names and call the function. Something like this: $('.song').click(function(band, album, track) { $('.footer').show('easeInExpo'); var band = $(this).data("band"); var album = $(this).data("album"); var track = $(this).data("track"); audioPlayer(band, album, track); }); And add the data attributes on the li: &lt;li class="song" data-band="test band" data-album="test album" data-track="test track"&gt;&lt;/li&gt;

http://stackoverflow.com/comment/39127919
type: AnswerComment
has text: As I get it from foundation this isn't intended to work this way. Why not mimic the optics with your own elements? We had this a couple of times where I work and it always ended with us building the elements needed if the framework can not provide the behaviour we want. And as you noticed yourself, messing with foundation's guts messes up things. :/
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25136538

http://stackoverflow.com/q/25118196
tagged with: javascript
tagged with: ionic-framework
score: 0
answer count: 2
tagged with: web-sql
tagged with: angularjs
type: UnansweredQuestion
has title: WebSQL empty array after execution
has answer: http://stackoverflow.com/a/25118853
type: Question
has body: I am trying to return the array I got from the database using websql but its empty. angular.module('starter.services', []) .factory('Products', function() { var db = openDatabase('db', '1.0', 'DB',5 * 1024 * 1024); return { all: function(subId) { var products = []; db.transaction(function (tx) { tx.executeSql('SELECT * FROM products where category_id ='+subId, [], function (tx, results) { var len = results.rows.length, i; for (i = 0; i &lt; len; i++){ products.push(results.rows.item(i)); console.log(products);// this will print out the products } }, null); }); console.log(products);// empty return products; },
has answer: http://stackoverflow.com/a/25118871

http://stackoverflow.com/comment/39095764
score: 0
has text: @SargoDarya you don't need to check every vertex, just check against `min(abs(A.x0 - S.x), abs(A.x1 - S.x))` for example (that being the delta-x of the nearest x coordinate)
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25115931

http://stackoverflow.com/a/25226031
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/128720055
type: Answer
has comment: http://stackoverflow.com/comment/96543671
score: 26
answers question: http://stackoverflow.com/q/25225551
upvote count: 26
accepted answer of: http://stackoverflow.com/q/25225551
has body: You get this error because you use google maps v3 API on your application but do not have any code, which will initialize window.google property, when you run your tests. Solution 1 Compile this mock to javascript and reference compiled *.js in files of your config. Solution 2 Create your own google-mock.js Add it to files array of your karma.config Add stab to google-mock.js for each Google Maps API call which you use in your app like in example below: (function(){ window.google = window.google || { maps: { Map: function(){}, // and so on... } }; })(); Solution 3 Open this link Save ALL text from this page to file google-maps-api.js Add path to this file to your files array in karma.config

http://stackoverflow.com/a/25126178
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39134292
has comment: http://stackoverflow.com/comment/39112884
has body: You're missing the rules property when calling the validate function, try something like this: $("#form1").validate({ rules: { cpf: { required: true, }, cep: { required: true, }, tel: { required: true, }, email: { required: true, }, cnpj: { required: true, }, }, highlight: function (element) { $(element).closest('.form-group').addClass('has-error'); }, unhighlight: function (element) { $(element).closest('.form-group').removeClass('has-error'); }, errorElement: 'span', errorClass: 'help-block' });
downvote count: 0
answers question: http://stackoverflow.com/q/25125902
has comment: http://stackoverflow.com/comment/39134046
type: Answer
has comment: http://stackoverflow.com/comment/39133790

http://stackoverflow.com/comment/39145157
comment on: http://stackoverflow.com/q/25140217
score: 0
type: Comment
type: QuestionComment
has text: You can't mix Javascript and JSP like that. They run at different times. And you need to explain what you mean by "restrict a request if that has been issued by meta refresh"; count the number of times refreshed and stop it from doing it again, or what?

http://stackoverflow.com/comment/39028397
comment on: http://stackoverflow.com/q/25083177
has text: Which version of angular are you using?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39058566
type: Comment
has text: Is there a native equivalent to this extend? I'm guessing not.
comment on: http://stackoverflow.com/a/25098755
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39233836
has text: Yes, it's a completely valid way to do that, and if there's no specific interval between the delays, there's no better way to do it really, other than maps and loops etc. which isn't neccessarely better or easier to do
comment on: http://stackoverflow.com/q/25194207
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25201893
score: 0
type: Answer
has body: add contacttype to datastring var dataString = 'contacttype='+ contacttype +'&amp; name='+ name + '&amp; email=' + email + '&amp; phone=' + phone + '&amp; comment=' + comment; also you have missed to include id to the input boxes eg: &lt;input type="text" name="name" id="name" placeholder="Name"&gt; and also dont alert inside php tag.just echo the result and catch it in the javascript eg: &lt;?php include("connect.php"); if($_POST) { $contacttype=$_POST['contacttype']; $name=$_POST['name']; $email=$_POST['email']; $phone=$_POST['comment']; $comment=$_POST['comment']; mysql_query("insert into `contact_form`(`type`, `name`, `email`, `phone`, `comment`) VALUES ($contacttype,$name,$email,$phone,$comment)"); echo $name; } else { echo("not"); } ?&gt; javascript $.ajax({ type: "POST", url: "contact.php", data: dataString, success: function(data){ alert(data); $('.success').fadeIn(200).show(); $('.error').fadeOut(200).hide(); } }); } return false;
answers question: http://stackoverflow.com/q/25201312

http://stackoverflow.com/comment/39167537
comment on: http://stackoverflow.com/a/25158934
type: AnswerComment
has text: now i have put values in $result and tried but still the same problem
score: 0
type: Comment

http://stackoverflow.com/a/25181989
score: 0
type: AcceptedAnswer
type: Answer
has body: The reason is the Same Origin Policy - unless images are requested with CORS, they trigger this security issue in browsers. leaflet-image re-requests images to work around this.
answers question: http://stackoverflow.com/q/25172591
accepted answer of: http://stackoverflow.com/q/25172591

http://stackoverflow.com/q/25191520
tagged with: async.js
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25191676
has title: ASYNC in Node.JS
has body: I'm kind of new to async in Node.JS and callbacks. Could you please let me know if this is the right way to have an async call? function myFunc(schema) { async.each(Object.keys(schema), function(variable) { for (item in schema[variable]) { for (field in schema[variable][item]) { // Some operations go here } createDB(item, schema[variable][item]); } }); } function CreateDB(name, new_items) { ddb.createTable(selected_field.name, {hash: ['id', ddb.schemaTypes().number], range: ['time', ddb.schemaTypes().string], AttributeDefinitions: new_items }, {read: 1, write: 1}, function(err, details) { console.log("The DB is now created!"); }); } Thanks
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/39228759
favorite count: 0
has comment: http://stackoverflow.com/comment/39228796
type: Question
tagged with: node.js
has answer: http://stackoverflow.com/a/25191676
has comment: http://stackoverflow.com/comment/39228774
has comment: http://stackoverflow.com/comment/39228704
upvote count: 1
has comment: http://stackoverflow.com/comment/39228647
answer count: 1

http://stackoverflow.com/a/25191782
answers question: http://stackoverflow.com/q/25190951
score: 2
accepted answer of: http://stackoverflow.com/q/25190951
downvote count: 0
has body: It has been a while since I've done any Angular, but are you sure you need the double brackets in your collection and sortcolumn attributes? As in, does this work? {{col.DisplayName}}
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39028599
comment on: http://stackoverflow.com/a/25079840
type: Comment
has text: Could you put a breakpoint in the `_renderItem` function to ensure that the code is being run. Could it be a caching issue? Your JSON response looks like it should work fine as shown here: [jsfiddle](http://jsfiddle.net/sP9xn/2/)
type: AnswerComment
score: 0

http://stackoverflow.com/q/25179486
tagged with: dynamics-crm
has title: Getting error while Creating Case Record Using Odata Rest Services
score: 0
answer count: 1
tagged with: dynamics-crm-2011
has answer: http://stackoverflow.com/a/25195132
tagged with: javascript
type: UnansweredQuestion
has body: I have Ribbon button on CustomEntity. CustomEntity has one text field and account lookup Based on the fields i'm Creating case Record. but record was not creating. could anybody help me on this? where i'm doing wrong. Below is my sample function test() { debugger; var PostID = Xrm.Page.getAttribute("ism_name").getValue(); var ismaccount = Xrm.Page.getAttribute("ism_account").getValue()[0].name; var serverUrl = document.location.protocol + "//" + document.location.host; var incident = {}; incident.Title = PostID; incident.CustomerId = ismaccount; var jsonEntity = window.JSON.stringify(incident); //incident.Description = "Dynamicallty created record using REST Odata"; var oDataPath = serverUrl + "/Retail/XRMServices/2011/OrganizationData.svc"; var retrieveReq = new XMLHttpRequest(); var Odata = oDataPath + "/IncidentSet"; retrieveReq.open("POST", Odata, true); retrieveReq.setRequestHeader("Accept", "application/json"); retrieveReq.setRequestHeader("Content-Type", "application/json;charset=utf-8"); retrieveReq.setRequestHeader("X-HTTP-Method", "CREATE"); retrieveReq.send(JSON.stringify(jsonEntity)); }
tagged with: odata
tagged with: rest
type: Question

http://stackoverflow.com/comment/39276174
has text: Thank you for this and the code snippets, I figured I'd have to do something with the positioning of the elements on browser resize (unfortunately). The tough part is that I'm trying to make a standalone plugin and not rely on anything other than jQuery - but this definitely gives me a starting point.
comment on: http://stackoverflow.com/a/25216819
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/25082307
answers question: http://stackoverflow.com/q/25082050
has comment: http://stackoverflow.com/comment/39026404
type: Answer
has comment: http://stackoverflow.com/comment/39025844
has comment: http://stackoverflow.com/comment/39026638
has comment: http://stackoverflow.com/comment/39026018
has comment: http://stackoverflow.com/comment/39025836
has comment: http://stackoverflow.com/comment/39025696
score: 0
has comment: http://stackoverflow.com/comment/39025964
has body: Since IE8 doesn't let you change the type of your input, you'll have to create a new element that mimics the old one, and put it where the old one was. var button = document.createElement("INPUT"); var input = document.getElementsByTagName("INPUT")[0]; for(var i = 0, attrs = input.attributes, l = attrs.length; i &lt; l; i++) button.setAttribute(attrs.item(i).nodeName, attrs.item(i).nodeValue); button.setAttribute("type", "button"); var parent = input.parentNode; parent.replaceChild(button, input);
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39025650
accepted answer of: http://stackoverflow.com/q/25082050
has comment: http://stackoverflow.com/comment/39025978

http://stackoverflow.com/comment/39278680
has text: If you don't have any images or any other heavy stuff loaded in the css, then it isn't particularly resource consuming. I suggest you should examine your css and script content or maybe post it in a new question. Then we can see what could be a problem.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25217796

http://stackoverflow.com/comment/39163013
type: QuestionComment
comment on: http://stackoverflow.com/q/25156058
has text: you have to return it from `pw.generate()` & you will get in `password`.
score: 0
type: Comment

http://stackoverflow.com/comment/39239104
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25171883
has text: @TrazeK I feel like I'm really missing something which I would like to understand. The incipit to my answer is: "_The getJSON method is Asynchronous, that means that once started it will eventually hold a result, the function wrapped in document ready instead fires as soon as the DOM is ready_", your comment says: "_it was because the $.getJSON is fired on page load (outside .ready()) and could finish before or after the DOM is ready, depending on outside factors._", are this two statements different or maybe mine was not clear? Because that's exactly what I meant. Thanks for the patience.
score: 0

http://stackoverflow.com/comment/39289019
comment on: http://stackoverflow.com/q/25223943
type: Comment
type: QuestionComment
score: 1
has text: Unless I'm wrong here, an assignment will pretty much always equal true. If you're curious why equality doesn't work, then log the actual content of `event.type`.

http://stackoverflow.com/comment/39056722
type: Comment
has text: Also note, you've indicated that performance isn't the only concern so this is really a balancing judgement that only you can make. If you really needed this to be the fastest page possible, you wouldn't say anything like "we'd like to keep the server as a data only api". You'd do whatever is necessary to get the speed up.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25098524

http://stackoverflow.com/a/25191466
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39229038
answers question: http://stackoverflow.com/q/25191351
has body: You need to go up a bit farther in the DOM (with .closest()), then back down (with .find()): $('.ranking-dropdown li a').click(function () { $(this).closest('.input-group-btn').find('span.chosen-rank').text(this.text); }); jsFiddle example
downvote count: 0

http://stackoverflow.com/comment/39031001
score: 0
has text: Check the css of your surrounding elements. You may have an element that is overlaying that link, preventing you from actually clicking on it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25084732

http://stackoverflow.com/a/25109258
downvote count: 0
has body: (function($){ $.fn.test = function(){ var container = $('#my-container'); var totalWidth = 0; container.each(function(){ totalWidth += get the width of each element }); container.css('width', totalWidth); return container; }; }(jQuery)); This should work and keep the chaining.
type: Answer
answers question: http://stackoverflow.com/q/25109041
score: 1
upvote count: 1

http://stackoverflow.com/comment/39286531
type: Comment
comment on: http://stackoverflow.com/a/25222514
score: 1
type: AnswerComment
has text: A+ for the filter idea. I'm only starting with angular and haven't used them much yet so I didn't even think of it.

http://stackoverflow.com/comment/39010206
type: AnswerComment
has text: Hi, I added the extra brackets but that change my problem. Are IIFE's discouraged against? This was the general format of the open source code and I'm pretty unfamiliar with JavaScript. I googled my question but there wasn't much advice regarding when/whether it should be used. Thanks!
type: Comment
comment on: http://stackoverflow.com/a/25074285
score: 1

http://stackoverflow.com/comment/39887889
type: AnswerComment
comment on: http://stackoverflow.com/a/25546315
has text: @WorldOfProper Can you please provide a link to that page
type: Comment
score: 0

http://stackoverflow.com/comment/39147902
comment on: http://stackoverflow.com/q/25141004
score: 0
type: Comment
has text: Yes, that was the problem.
type: QuestionComment

http://stackoverflow.com/q/25162596
accepted answer: http://stackoverflow.com/a/25162652
has answer: http://stackoverflow.com/a/25162649
tagged with: javascript
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25162649
has body: I have a string (value is from textarea control) like following: 1 2 3 4 5 6 I'd like to split with new line character to get the string on commas; however, in the case where there is no text after new linebreak (after 2, 3, and 5), I need it ignore new linebreak as follows: 1,2,3,4,5,6 I have used myVal.split(/\r\n|\r|\n/g) but it gives result as 1,2,,3,,4,5,,6. Also if there is any new line at last it should ignore that.
type: Question
answer count: 2
tagged with: regex
has title: Split string at any linebreak character but ignore if there is no text after
has answer: http://stackoverflow.com/a/25162652
score: 0

http://stackoverflow.com/comment/39284488
type: Comment
has text: Do not listen to Crockford on this, if you need a new instance, use the `new` keyword. Crockford is confused and have for some reason decided that prototypical inheritance is a bad thing, in a language built around prototypical inheritance
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25221312

http://stackoverflow.com/q/25107941
type: Question
accepted answer: http://stackoverflow.com/a/25112803
answer count: 2
has comment: http://stackoverflow.com/comment/39075757
has title: jQuery Cross Domain Iframe Height Issue
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25112803
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25109602
has comment: http://stackoverflow.com/comment/39073575
favorite count: 0
has comment: http://stackoverflow.com/comment/39074298
tagged with: iframe
upvote count: 1
tagged with: css
type: AnsweredQuestion
score: 1
has body: I have the following javascript that determines the content height of an iframe: var body = document.body, html = document.documentElement; var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); First time, this works great! Once i have the height i post it to the parent page, like so: parent.postMessage(height, '*'); On the parent page i listen for the post message event and set the height of the iframe, like so: $('#frame').height(data); So far so good! Now when the iframe navigates within it self to a different page and it recalculates the content height, it keeps returning the height it calculated the first time. I am assuming that this is because the iframe now has an explicit height. How do i ensure that i get the actual content height and not the height set on the iframe?
possible better answer: http://stackoverflow.com/a/25109602

http://stackoverflow.com/a/25145951
type: Answer
has comment: http://stackoverflow.com/comment/39144171
score: 3
has comment: http://stackoverflow.com/comment/39144188
has comment: http://stackoverflow.com/comment/39144100
upvote count: 3
answers question: http://stackoverflow.com/q/25145873
downvote count: 0
has body: to detect which from what click the event is comming, you can use that code: $(document).mousedown(function(e){ switch(e.which) { case 1: //left Click break; case 2: event.preventDefault(); newLocation = this.href; $('body').fadeOut(700, newpage); break; case 3: //right Click break; } return true;// to allow the browser to know that we handled it. });
has comment: http://stackoverflow.com/comment/39144238

http://stackoverflow.com/comment/39146013
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25146804
type: AnswerComment
has text: Thanks for your help. I did try this originally (something really similar) but it does not save it into the database which is what I needed it to. I would like it to be able to save just their email and zip and then they can fill out additional information if they want to but it is not required. If they go to the second page, I don't want them to just leave it because they don't know they have to submit it there.

http://stackoverflow.com/comment/39294909
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25226907
has text: I don't think it even gets to onlogin="checkLoginState();" in the fb element.
score: 0

http://stackoverflow.com/comment/39269922
score: 0
type: Comment
type: QuestionComment
has text: You can find more information [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments) and [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function)
comment on: http://stackoverflow.com/q/25213517

global
type: Tag
tags question: http://stackoverflow.com/q/25151952
tag name: global
tags question: http://stackoverflow.com/q/25174097
tags question: http://stackoverflow.com/q/25140815

rgraph
type: Tag
tag name: rgraph
tags question: http://stackoverflow.com/q/25198655

http://stackoverflow.com/comment/39095550
has text: It is overriden becasue after the text change event is completed, tab key press event is fired. it is event bubbling
type: Comment
comment on: http://stackoverflow.com/a/25086117
type: AnswerComment
score: 0

http://stackoverflow.com/q/25148791
downvote count: 0
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25148867
tagged with: selenium
upvote count: 1
accepted answer: http://stackoverflow.com/a/25148867
has body: I have a select statement and a bunch of options. How do I choose an option by text using jQuery and at the same time deselect the default one, I am using selenium webdriver with python but I want to be able to do this in jQuery, because it seems like a basic thing I should know in jQuery and I would be able to translate it to python selenium myself once I understand how the jQuery works. Test1 Test2 This is close to what I want. I have tried multiple functions and selections, but they result in either an empty array, or when I loop them give me all a list of undefined, or a list of every possible attribute they can have. The site is also designed using jQuery mobile if that makes any big difference in selection. Please and thank you.
type: AnsweredQuestion
score: 1
has title: JQuery Drop Down List select option by text
type: Question

http://stackoverflow.com/comment/39118656
comment on: http://stackoverflow.com/a/25121051
score: 0
type: AnswerComment
type: Comment
has text: A valable solution indeed! Yet i prefer @vishwanath solution

http://stackoverflow.com/a/25101524
has body: Since you are using forEach, I assume you're safe with ES5. You can use Object.keys to return an array of keys from an object. Then use forEach on it. Object.keys(myObj).forEach(function(key,i){ myObj[key].addEventListener(...); }); Do note that the order of the keys returned by Object.keys is the same case for for-in loops. It doesn't guarantee the same order across browsers. If order does matter, I suggest you stick with arrays instead.
has comment: http://stackoverflow.com/comment/39061289
upvote count: 3
downvote count: 0
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39061406
answers question: http://stackoverflow.com/q/25101517

http://stackoverflow.com/q/25171907
accepted answer: http://stackoverflow.com/a/25172046
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25172080
has answer: http://stackoverflow.com/a/25172080
type: Question
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25172025
has title: URL Link gives pop-up of photo with NO URL?
score: 0
has answer: http://stackoverflow.com/a/25172046
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: url
has body: On this site when you click on an item, an image pops-up with the nutritional data. Here is the url: http://www.uniondining.com/WeeklyMenu_182.htm But i can't seem to find the url of that link, I have looked at the source code, and still can't see it. Under the tag for each item there is an "onclick" attribute, but I can't see what it links to. For example on Aztec corn here is some of the html: Aztec Corn this html is in the table, but the onclick doesn't appear to go anywhere in the html. I am looking for the url of the pop up with the nutritional info Thanks a bunch in advance.

http://stackoverflow.com/q/25106679
has answer: http://stackoverflow.com/a/25106796
tagged with: angularjs
type: Question
tagged with: regex
has title: Regex on item inside ng-repeat
has answer: http://stackoverflow.com/a/25106815
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25106792
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25106792
tagged with: javascript
has body: I'm currently building an app that's using the Soundcloud SDK and I need to be able to run a regexp on the artwork_url to replace -large with 500x500, according to: https://developers.soundcloud.com/docs/api/reference# This was my approach which doesn't seem to trigger the artworkRegex: track info $scope.artworkRegex = function (artwork) { console.log(artwork); } What's the best way to go about being able to run a regexp track.artwork_url?
possible better answer: http://stackoverflow.com/a/25106796

http://stackoverflow.com/comment/39227845
score: 0
comment on: http://stackoverflow.com/q/25191141
type: QuestionComment
type: Comment
has text: http://stackoverflow.com/questions/2076299/how-to-close-current-tab-in-a-browser-window

http://stackoverflow.com/comment/39073023
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25107893
has text: Oh, I see the how callback works, question modeified.

http://stackoverflow.com/a/25210037
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25209834
type: Answer
has body: Javascript is an interepreter based language, in case you want to write script first and use later, add a function instead. Text. link Cheers !!
upvote count: 1

http://stackoverflow.com/q/25229173
has comment: http://stackoverflow.com/comment/39339994
score: 0
tagged with: events
type: UnansweredQuestion
tagged with: triggers
has answer: http://stackoverflow.com/a/25280623
has comment: http://stackoverflow.com/comment/39339859
type: Question
has comment: http://stackoverflow.com/comment/39299045
has comment: http://stackoverflow.com/comment/39298906
answer count: 1
tagged with: javascript
tagged with: jquery
has title: script generated input not formatting properly
has body: Just started working with javascript and have struggled to find a solution to formatting an input. I have a form with inputs generated by a calculation script. When I manually enter numbers they are formatted to 2 decimal places using JQuery. However when the numbers are generated by the script the formatting does not work. I get numbers to 14 decimal places. I have read something about the event not being triggered. Is this happening here ? any help greatfully received. &lt;script language="JavaScript"&gt; // apply the two-digits behaviour to elements with 'two-digits' as their class $( function() { $('.two-digits').keyup(function(){ if($(this).val().indexOf('.')!=-1){ if($(this).val().split(".")[1].length &gt; 2){ if( isNaN( parseFloat( this.value ) ) ) return; this.value = parseFloat(this.value).toFixed(2); } } return this; //for chaining }); }); &lt;/script&gt; &lt;script language="JavaScript"&gt; &lt;!-- function cmConverter(){ document.converter.inchwidth.value = document.converter.cmwidth.value / 2.54 document.converter.inchdrop.value = document.converter.cmdrop.value / 2.54 } //--&gt; &lt;/script&gt; My form html Width cm: &lt;input type="text" name="cmwidth" onChange="cmConverter()" &gt;&lt;br /&gt; Width Inch: &lt;input type="text" name="inchwidth" id="a" class="two-digits"&gt;&lt;br /&gt; Drop cm: &lt;input type="text" name="cmdrop" onChange="cmConverter()" &gt;&lt;br /&gt; Drop Inch: &lt;input type="text" name="inchdrop" id="d" class="two-digits"&gt;&lt;br /&gt;

http://stackoverflow.com/a/25070899
score: 2
has body: No catch block, use a regular error callback function: API.query() .$promise .then(function(data) { isEmpty = (data.length === 0); if (!isEmpty) { days = data; }, function(error) { // removed catch here console.log("rejected " + JSON.stringify(error)); var data = null; days = dataFactory.daysOfWeek; console.log(days.length); // returns 5 ... See in the docs: then(successCallback, errorCallback, notifyCallback) – regardless of when the promise was or will be resolved or rejected, then calls one of the success or error callbacks asynchronously as soon as the result is available. The callbacks are called with a single argument: the result or rejection reason. Additionally, the notify callback may be called zero or more times to provide a progress indication, before the promise is resolved or rejected.
has comment: http://stackoverflow.com/comment/39015342
has comment: http://stackoverflow.com/comment/39036189
answers question: http://stackoverflow.com/q/25070690
upvote count: 2
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39004716

http://stackoverflow.com/comment/39194004
score: 2
type: Comment
has text: Yep all I needed was "context.textAlign = "center";" :) cheers for the answer
comment on: http://stackoverflow.com/a/25172778
type: AnswerComment

http://stackoverflow.com/comment/39195157
type: Comment
has text: I use this code of yours, `if ($(".required").filter(function() { return !this.value.length; }).length) { //stuff is not filled in } else { alert ('textboxes must be empty'); }` the alert message is not showing when the fields have values.
comment on: http://stackoverflow.com/a/25173074
type: AnswerComment
score: 0

http://stackoverflow.com/a/25220892
has comment: http://stackoverflow.com/comment/39302715
downvote count: 0
score: 1
has body: Try using Meteor.userId() rather than this._id. Template.profile.events({ 'click input.add': function (e, t) { var firstname = t.$('#profile_firstname').val(); Meteor.users.update({_id: Meteor.userId()}, { $set:{"profile.name": firstname}} ); } }); In the click handler, this refers to the data context of templates input element. Alternatively, you could also set the context using #with and your original code would work. {{#if currentUser}} Profile {{#with currentUser}} {{/with}} {{/if}}
has comment: http://stackoverflow.com/comment/39302180
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25220722
has comment: http://stackoverflow.com/comment/39302734
accepted answer of: http://stackoverflow.com/q/25220722
has comment: http://stackoverflow.com/comment/39302547
type: Answer

http://stackoverflow.com/q/25089601
tagged with: javascript
score: 4
has body: How would I match the quotations around "text" in the string below and not around "TEST TEXT" using RegEx. I wanted just quotations only when they are by themselves. I tried a negative lookahead (for a second quote) but it still captured the second of the two quotes around TEST TEXT. This is some "text". This is also some ""TEST TEXT"" Be aware that I need this to scale so sometimes it would be right in the middle of a string so something like this: /(\s|\w)(\")(?!")/g (using $2...) Would work in this example but not if the string was: This is some^"text".This is also some ""TEST TEXT"" I just need quotation marks by themselves. EDIT FYI, this needs to be Javascript RegEx so lookbehind would not be an option for me for this one.
upvote count: 4
possible better answer: http://stackoverflow.com/a/25089662
answer count: 3
has answer: http://stackoverflow.com/a/25091949
has answer: http://stackoverflow.com/a/25089836
has answer: http://stackoverflow.com/a/25089662
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39078717
tagged with: regex
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25089836
has comment: http://stackoverflow.com/comment/39039380
has comment: http://stackoverflow.com/comment/39082600
has comment: http://stackoverflow.com/comment/39044080
type: Question
has comment: http://stackoverflow.com/comment/39046099
has title: RegEx - Match Character only when it's not proceeded or followed by same character

http://stackoverflow.com/comment/39180621
has text: there is not firewall, the web service works fine if I put http://localhost:8888/rauco/oxygen/1/1/last on the navigator.
comment on: http://stackoverflow.com/q/25165481
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25179898
type: Answer
has body: Where is cordova.js in your project . Include cordova.js in hTML . remove this phonegap-1.4.1.js If you have cordova project
score: 0
answers question: http://stackoverflow.com/q/25164927

http://stackoverflow.com/q/25161088
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25193581
has title: JQuery Plugin File Loading But Is Not Working
tagged with: plugins
type: AnsweredQuestion
tagged with: tablesorter
type: Question
linked to: http://stackoverflow.com/q/4083351
has answer: http://stackoverflow.com/a/25193581
has comment: http://stackoverflow.com/comment/39231387
has body: I am attempting to load the tablesorter JQuery plugin, I am using JQuery version 2.1.1 and the latest version of tablesorter. I load them in the following order : &lt;script src="javascript/jquery-2.1.1.min.js"&gt;&lt;/script&gt; &lt;script src="javascript/jquery.tablesorter.min.js"&gt;&lt;/script&gt; I have tried forks of tablesorter and none of them work. I tested that I had the right plugin file location by putting alert("Plugin File"); at the top of the file and this works when the page loads. None of the plugins functionality is working and I tested it using this code : $(document).ready(function(e){ if(jQuery.fn.tablesorter){ alert("pluginloaded"); } jQuery.tablesorter(); } } The alert does not work and firebug reports that tablesorter is not a function.
has comment: http://stackoverflow.com/comment/39186641
tagged with: javascript
score: 0

http://stackoverflow.com/a/55845612
score: 2
answers question: http://stackoverflow.com/q/25224793
downvote count: 0
upvote count: 2
has body: I think it depends on the case. I just had the same question that why I'm here. I just think that if the component to render is huge, it can be usefull to have an IF component instead of the standard conditional rendering method. ... Then statement other Statement and so on ... is definitively more readable than ... { screenIs("xs") && ( Then statement other Statement and so on ) } ... also for ternary statement, ... <IF.Ternary condition={screenIs("xs")}> Then statement other then Statement and so on Else statement other Else Statement and so on </IF.Ternary> ... is more readable than ... { screenIs("xs") ? ( Then statement other Then Statement and so on ) : ( Else statement other Else Statement and so on ) } ... anyway, to make it more readable, you can just define your conditional rendering part in some method and call it in your main render { ... renderParts = () => { return screenIs('xs') ? XS : Not XS } ... render() { return ( ... {this.renderParts()} ... ) } }
type: Answer

http://stackoverflow.com/a/25101532
has comment: http://stackoverflow.com/comment/39061346
has body: Just do: var str = res.join(""); // "16373" The .join() call will join all the elements of the array by the specified string, in this case empty string and returns that string.
type: Answer
answers question: http://stackoverflow.com/q/25101518
accepted answer of: http://stackoverflow.com/q/25101518
has comment: http://stackoverflow.com/comment/39061302
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/39061284

http://stackoverflow.com/q/25190478
answer count: 1
has body: I'm using d3 to create a few list items on my screen, and when I click a button I need it to run again as if the first time it ran had never happened. setupgui: function() { d3.select("#SampcoISrevenues").selectAll("li") .data(function () { if($("#radio-choice-h-2a").is(":checked")) { return sampleQ1; } else if($("#radio-choice-h-2b").is(":checked")) { return sampleQ2; } else if($("#radio-choice-h-2c").is(":checked")) { return sampleQ3; } else if($("#radio-choice-h-2d").is(":checked")) { return sampleQ4; } }) .enter() .append("li") .attr("class", function (d){return d.textcolor;}) .text(function (d) { var indentvalstring = ""; for(var i = 0; i &lt; d.indentval; i++) { indentvalstring += "\u00a0"; } indentvalstring += d.itemname; return indentvalstring; }) .append("span") .attr("class", "right") .text(function (d){return d.numvalue;}); } when this is run, it loads data in from the array and depending on the button that is checked it outputs it. When I select another button for a different set of data, it does not do anything. Is there a way to remove the data onscreen and replace it with the one selected from the button?
tagged with: d3.js
has answer: http://stackoverflow.com/a/25220944
type: AnsweredQuestion
has title: Using D3 or JQuery to update a d3 created screen
accepted answer: http://stackoverflow.com/a/25220944
type: Question
has comment: http://stackoverflow.com/comment/39229594
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/39290218
comment on: http://stackoverflow.com/q/25224630
has text: why are you using ng-class for showing/hiding? Why aren't you using ng-show?
score: 0
type: Comment
type: QuestionComment

node.js
tags question: http://stackoverflow.com/q/25090299
tags question: http://stackoverflow.com/q/25073287
tags question: http://stackoverflow.com/q/25070194
tags question: http://stackoverflow.com/q/25181441
tags question: http://stackoverflow.com/q/25082272
tags question: http://stackoverflow.com/q/25089911
tags question: http://stackoverflow.com/q/25130463
tags question: http://stackoverflow.com/q/25212991
tags question: http://stackoverflow.com/q/25140894
tags question: http://stackoverflow.com/q/25169644
tags question: http://stackoverflow.com/q/25069777
tags question: http://stackoverflow.com/q/25166601
tags question: http://stackoverflow.com/q/25196301
tags question: http://stackoverflow.com/q/25229888
tags question: http://stackoverflow.com/q/25117016
tags question: http://stackoverflow.com/q/25163681
tags question: http://stackoverflow.com/q/25091772
tags question: http://stackoverflow.com/q/25192122
tags question: http://stackoverflow.com/q/25126791
tags question: http://stackoverflow.com/q/25211731
tags question: http://stackoverflow.com/q/25106505
tags question: http://stackoverflow.com/q/25159457
tags question: http://stackoverflow.com/q/25098632
tags question: http://stackoverflow.com/q/25081805
tags question: http://stackoverflow.com/q/25150273
tags question: http://stackoverflow.com/q/25137488
tags question: http://stackoverflow.com/q/25080121
tags question: http://stackoverflow.com/q/25122123
tags question: http://stackoverflow.com/q/25206610
tags question: http://stackoverflow.com/q/25124019
tags question: http://stackoverflow.com/q/25229130
tags question: http://stackoverflow.com/q/25210133
tags question: http://stackoverflow.com/q/25229613
tags question: http://stackoverflow.com/q/25181848
tags question: http://stackoverflow.com/q/25127692
tags question: http://stackoverflow.com/q/25138285
tags question: http://stackoverflow.com/q/25166047
tags question: http://stackoverflow.com/q/25111589
tags question: http://stackoverflow.com/q/25190933
tags question: http://stackoverflow.com/q/25144517
tags question: http://stackoverflow.com/q/25188952
tags question: http://stackoverflow.com/q/25153517
tags question: http://stackoverflow.com/q/25088102
tags question: http://stackoverflow.com/q/25126887
tags question: http://stackoverflow.com/q/25155194
tags question: http://stackoverflow.com/q/25097520
tags question: http://stackoverflow.com/q/25132463
tags question: http://stackoverflow.com/q/25099305
tags question: http://stackoverflow.com/q/25073328
tags question: http://stackoverflow.com/q/25207333
tags question: http://stackoverflow.com/q/25201668
tags question: http://stackoverflow.com/q/25089024
tags question: http://stackoverflow.com/q/25100175
tags question: http://stackoverflow.com/q/25122257
tags question: http://stackoverflow.com/q/25168557
tags question: http://stackoverflow.com/q/25177035
tags question: http://stackoverflow.com/q/25209207
tags question: http://stackoverflow.com/q/25160079
tags question: http://stackoverflow.com/q/25186026
tags question: http://stackoverflow.com/q/25181304
tags question: http://stackoverflow.com/q/25199824
tags question: http://stackoverflow.com/q/25122757
tags question: http://stackoverflow.com/q/25112200
tags question: http://stackoverflow.com/q/25198256
tags question: http://stackoverflow.com/q/25220998
tags question: http://stackoverflow.com/q/25085285
tags question: http://stackoverflow.com/q/25082070
tags question: http://stackoverflow.com/q/25152821
tags question: http://stackoverflow.com/q/25167138
tags question: http://stackoverflow.com/q/25075811
tags question: http://stackoverflow.com/q/25151726
tags question: http://stackoverflow.com/q/25099519
tags question: http://stackoverflow.com/q/25112033
tags question: http://stackoverflow.com/q/25154135
tags question: http://stackoverflow.com/q/25079075
tags question: http://stackoverflow.com/q/25179337
tags question: http://stackoverflow.com/q/25089023
tags question: http://stackoverflow.com/q/25194856
tags question: http://stackoverflow.com/q/25173396
tags question: http://stackoverflow.com/q/25202005

arrays
tags question: http://stackoverflow.com/q/25151347
tags question: http://stackoverflow.com/q/25194537
tags question: http://stackoverflow.com/q/25119323
tags question: http://stackoverflow.com/q/25190500
tags question: http://stackoverflow.com/q/25114206
tags question: http://stackoverflow.com/q/25121863
tags question: http://stackoverflow.com/q/25092465
tags question: http://stackoverflow.com/q/25152596
tags question: http://stackoverflow.com/q/25145359
type: Tag
tags question: http://stackoverflow.com/q/25168086
tags question: http://stackoverflow.com/q/25156726
tags question: http://stackoverflow.com/q/25183263
tags question: http://stackoverflow.com/q/25172671
tags question: http://stackoverflow.com/q/25165905
tags question: http://stackoverflow.com/q/25199875
tags question: http://stackoverflow.com/q/25197502
tags question: http://stackoverflow.com/q/25072220
tags question: http://stackoverflow.com/q/25124392
tags question: http://stackoverflow.com/q/25213048
tags question: http://stackoverflow.com/q/25133320
tags question: http://stackoverflow.com/q/25174792
tags question: http://stackoverflow.com/q/25081834
tags question: http://stackoverflow.com/q/25206021
tags question: http://stackoverflow.com/q/25145497
tags question: http://stackoverflow.com/q/25078596
tags question: http://stackoverflow.com/q/25093701
tags question: http://stackoverflow.com/q/25100268
tags question: http://stackoverflow.com/q/25163772
tags question: http://stackoverflow.com/q/25110066
tags question: http://stackoverflow.com/q/25106832
tags question: http://stackoverflow.com/q/25163565
tags question: http://stackoverflow.com/q/25137959
tags question: http://stackoverflow.com/q/25157510
tags question: http://stackoverflow.com/q/25135872
tags question: http://stackoverflow.com/q/25175798
tags question: http://stackoverflow.com/q/25217706
tags question: http://stackoverflow.com/q/25097538
tags question: http://stackoverflow.com/q/25165908
tags question: http://stackoverflow.com/q/25174134
tags question: http://stackoverflow.com/q/25183077
tags question: http://stackoverflow.com/q/25125255
tags question: http://stackoverflow.com/q/25218842
tags question: http://stackoverflow.com/q/25150644
tags question: http://stackoverflow.com/q/25100707
tags question: http://stackoverflow.com/q/25189937
tags question: http://stackoverflow.com/q/25226942
tags question: http://stackoverflow.com/q/25083932
tags question: http://stackoverflow.com/q/25159457
tags question: http://stackoverflow.com/q/25074341
tags question: http://stackoverflow.com/q/25171630
tags question: http://stackoverflow.com/q/25172082
tags question: http://stackoverflow.com/q/25145724
tags question: http://stackoverflow.com/q/25187267
tags question: http://stackoverflow.com/q/25225428
tags question: http://stackoverflow.com/q/25172500
tags question: http://stackoverflow.com/q/25218101
tags question: http://stackoverflow.com/q/25103348
tags question: http://stackoverflow.com/q/25124635
tags question: http://stackoverflow.com/q/25222765
tags question: http://stackoverflow.com/q/25128278
tags question: http://stackoverflow.com/q/25077282
tags question: http://stackoverflow.com/q/25151339
tags question: http://stackoverflow.com/q/25099904
tags question: http://stackoverflow.com/q/25170702
tags question: http://stackoverflow.com/q/25216885
tags question: http://stackoverflow.com/q/25156091
tag name: arrays
tags question: http://stackoverflow.com/q/25212810
tags question: http://stackoverflow.com/q/25170758
tags question: http://stackoverflow.com/q/25195567
tags question: http://stackoverflow.com/q/25101518
tags question: http://stackoverflow.com/q/25119308
tags question: http://stackoverflow.com/q/25094211
tags question: http://stackoverflow.com/q/25150971
tags question: http://stackoverflow.com/q/25143225
tags question: http://stackoverflow.com/q/25184080
tags question: http://stackoverflow.com/q/25224732
tags question: http://stackoverflow.com/q/25198717
tags question: http://stackoverflow.com/q/25100714

http://stackoverflow.com/q/25101892
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25104444
has title: Add store to already open IndexedDB
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/39067974
tagged with: http://stackoverflow.com/tag/html
has body: Is there a way to create a store in an IndexedDB after it has been open and passed the onupgradeneeded? I tried: var store = db.createObjectStore('blah', {keyPath: "id", autoIncrement:true}); Get this error: InvalidStateError: A mutation operation was attempted on a database that did not allow mutations.
favorite count: 0
possible better answer: http://stackoverflow.com/a/25104444
has comment: http://stackoverflow.com/comment/39078256
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25121505
accepted answer: http://stackoverflow.com/a/25121505
downvote count: 0
tagged with: indexeddb

http://stackoverflow.com/a/25091986
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25091928
answers question: http://stackoverflow.com/q/25091928
downvote count: 0
has body: Made a mistake in closing the form. Closed it twice..
score: 1
has comment: http://stackoverflow.com/comment/39043616
upvote count: 1

http://stackoverflow.com/comment/39148011
has text: I'd say this is somewhat (if not much) opinion-based. I personally return strings.
type: QuestionComment
comment on: http://stackoverflow.com/q/25147656
type: Comment
score: 1

http://stackoverflow.com/a/25160327
has comment: http://stackoverflow.com/comment/39198863
has body: You have to define an isolated scope within your directive to not change the global scope. Use two different objects in the scope: Group 1 Value : {{ d1.group1 }} Group 2 Value : {{ d1.group2 }} Group 1 Value : {{ d2.group1 }} Group 2 Value : {{ d2.group2 }} define a isolated scope in the directive: App.directive('radioControls', [function() { return { restrict: 'E', scope: { group1: '=', group2: '=' }, templateUrl: 'radio-controls-template.html', controller: ['$scope', function($scope) { $scope.radio1= 'group1'; $scope.panelStyle = 'group4'; }] } }]) And use the directive scope in the template: Radio 1 Radio 2 Radio 3 Radio 4 Radio 5 Plunker: http://plnkr.co/edit/yNVDMe?p=preview
has comment: http://stackoverflow.com/comment/39199942
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39200432
answers question: http://stackoverflow.com/q/25157375

http://stackoverflow.com/comment/39123316
comment on: http://stackoverflow.com/q/25134903
score: 0
has text: @PeeHaa: How about "I add a slider more than 3 slides, then he begins to work not correctly"? (ignoring grammar sounds like a problem to solve :))
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25209523
upvote count: 3
has body: I have the problem of running this. I get back an error stating that I either am missing a ) after arguments or that I have an illegal character. I understand that it must be thinking that I am trying to insert an argument when I am not. I believe I just need help with the syntax. browser.execute_script("url = '/Administration/SwitchCompany?' + jQuery.param({CompanyId: $('#companyDropDownList option:contains('DTLTest')').val() })") browser.execute_script("$('#userInfoPlaceholder').load(url, switchCompanyCallback);" )
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 3
tagged with: python
has answer: http://stackoverflow.com/a/25215343
favorite count: 0
tagged with: selenium-webdriver
type: UnansweredQuestion
tagged with: selenium
has answer: http://stackoverflow.com/a/25209568
has title: Selenium Python Javascript Execution

http://stackoverflow.com/a/25089576
accepted answer of: http://stackoverflow.com/q/25089394
has comment: http://stackoverflow.com/comment/39040885
has comment: http://stackoverflow.com/comment/39043234
score: 1
answers question: http://stackoverflow.com/q/25089394
has body: As others have said, it's performing fine on my personal mobile device. However, you can try using the transform css property to compare (it has performed better for me in history, especially with hardware acceleration). Example: .content { transform: translate3d(0, 0, 0); } .content.open { transform: translate3d(-250px, 0, 0); }
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39196315
score: 0
type: AnswerComment
type: Comment
has text: Do the other 3 the same way that I did the first one...Go forth and code!
comment on: http://stackoverflow.com/a/25165895

http://stackoverflow.com/q/25133144
answer count: 1
tagged with: sharepoint-2010
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39146068
type: Question
has answer: http://stackoverflow.com/a/25148035
has title: Javascript add parameter to url
has body: This is a javascript/sharepoint question. p.s new to programming and this is modifying the current code. I currently have a custom webpart with a 'Add new item' button that links to a template when clicked on. The goal is to amend the url of the template to include the title of the page where the webpart came from. E.g. The page is 'Test Page', test page has the webpart with 'Add new item', when clicked on 'Add new item' it takes to template page. Original URL = testtesttest%test%test%20.aspx?blah= and to add an &amp;'page title' New URL = testtesttest%20test%20test%20.aspx?blah=&amp;testpage. Hope that make sense. Below is a chunk of javascript code that I've found believe to be prepopulating something, how would I amend this to amend the url too? function populateList (element, template, data) { if (!element) { return; } var templateHtml = ''; try { var summaryTemplate = _.template(template); templateHtml = summaryTemplate ({ items: data }); } catch (e) { templatedHtml = 'Template failed'; } $(element).html(templateHtml); }
tagged with: javascript
tagged with: jquery
tagged with: sharepoint
score: 0
has comment: http://stackoverflow.com/comment/39219275

http://stackoverflow.com/comment/39247126
type: AnswerComment
score: 0
type: Comment
has text: `addClass` should be after `$("header ul li a").removeClass("active");` as this will remove class from all a tag, if you put `addClass` before it then no use
comment on: http://stackoverflow.com/a/25201610

http://stackoverflow.com/comment/39109488
comment on: http://stackoverflow.com/q/25126935
type: Comment
type: QuestionComment
score: 0
has text: possible duplication: http://stackoverflow.com/questions/17030455/launching-browser-with-capybara

http://stackoverflow.com/comment/39073362
type: AnswerComment
has text: see my edit. If you're sure there's no duplicate, just use ==. Now if there may be duplicate, you must test for ( max(a,b) % min (a,b) ) == 0 to be sure.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25106192

http://stackoverflow.com/a/25129085
upvote count: 3
type: AcceptedAnswer
has body: You should use a callback function when you expect a result from the service. Like this : function checkService(callback) { //this may return TRUE or FALSE var RET = someServiceResponse(); // here waits 1 second, then ask the service again if( RET == true ) { callback(RET); } else { setTimeout( function() { //it must return the second response of the service RET = someServiceResponse(); callback(RET); }, 1000 ); // I want the checkService() return the response after de timeout return RET; } } So when you want to call the service, you just need to do : checkService(function(status){ alert(status); // Here some code after the webservice response });
has comment: http://stackoverflow.com/comment/39112993
has comment: http://stackoverflow.com/comment/39113591
type: Answer
score: 3
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25129057
answers question: http://stackoverflow.com/q/25129057

http://stackoverflow.com/comment/65621420
type: AnswerComment
comment on: http://stackoverflow.com/a/25201040
has text: The question is not answered the concern was does r.js loads file aync even after compiling the modules to single file and not should AMD be used.
type: Comment
score: 0

http://stackoverflow.com/comment/39099209
comment on: http://stackoverflow.com/a/25121813
type: Comment
score: 0
type: AnswerComment
has text: `var str = "02076861111"; str.replace(/^\s*([0-9]{3})\s*\-?([0-9]{3})\s*\-?([0-9]{4})$/, '$1 $2 $3');` will take care of possible whitespace and hyphens.

http://stackoverflow.com/a/25139824
answers question: http://stackoverflow.com/q/25119637
accepted answer of: http://stackoverflow.com/q/25119637
has body: I ended up implementing the transaction callbacks like @frank suggested, but my counters were still 0. Though the results.rowsAffected was always accurate, for some reason the counter variable was never accessible outside the for loop. I ended up implementing global variables ($rootScope.{variablename} for you angular people) and incremented that everytime from the results.rowsAffected and that worked. var inc = function(incCounter) { $rootScope.counter = $rootScope.counter + incCounter; }; ExecuteQueryWhereQueryAndParamsBothArrays: function (queryArray, paramsArray, success, fail) { var hasError = false; var counter = 0; $rootScope.db.transaction(function (tx) { for (var i = 0; i &lt; paramsArray.length; i++) { var query = queryArray[i]; var params = paramsArray[i]; tx.executeSql(query, params, function (tx, results) { window.logger.logIt("results.rowsAffected: " + results.rowsAffected); // this is showing the correct results inc(results.rowsAffected); }, function(tx, r) { hasError = true; onError(tx, r); }); } }, function () { fail(); }, function () { success(); }); },
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/39098032
has text: Get rid of ng-controller="NavCtrl" and put it to "body" tag or closer where you don't reload the controller every time.
type: AnswerComment
comment on: http://stackoverflow.com/a/25102721
type: Comment
score: 0

http://stackoverflow.com/comment/39203606
score: 1
has text: for better usability you can put a small `?` icon before or after the input field.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25178392

http://stackoverflow.com/comment/39147794
has text: i want to one iteration not two different
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25147673

http://stackoverflow.com/comment/39216586
type: Comment
has text: Can you create http://jsfiddle.net or something similar to fully illustrate the problem? Or at least include full HTML+JS sample code?
comment on: http://stackoverflow.com/a/25185204
type: AnswerComment
score: 0

http://stackoverflow.com/a/25212449
answers question: http://stackoverflow.com/q/25212306
score: 2
downvote count: 0
has body: Your question is not clear. Your code uses setInterval, but your error is about setTimeout. Let me assume that you want and use setInterval because that makes more sense as you want to refresh the page every 5 seconds. The setInterval function is defined by the browser. It requires a function name as first argument. You passed in a function call. To fix it, simple delete the pair of parentheses: setInterval(refreshPage, 5000); function refreshPage() { window.location.reload(1); }
upvote count: 2
has comment: http://stackoverflow.com/comment/39268218
type: Answer

http://stackoverflow.com/q/25152404
has answer: http://stackoverflow.com/a/25153329
favorite count: 0
tagged with: firefox-addon
accepted answer: http://stackoverflow.com/a/25153329
tagged with: geturl
upvote count: 3
has title: What is method to get URL before tab redirect in firefox?
downvote count: 1
score: 2
type: AnsweredQuestion
has body: I have developed a Add-on for Firefox. It has a redirect link: https://www.google.com.vn/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0CB0QFjAA&amp;url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2FAdd-ons%2FCode_snippets%2FTabbed_browser&amp;ei=3pfhU-TMIMPo8AXhg4GoAw&amp;usg=AFQjCNGYBJDxF8FAEl3gxl1DcqTes93HFQ&amp;bvm=bv.72197243,d.dGc This link redirects to: https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Tabbed_browser I am using this code to get redirect link before redirect var doc = event.originalTarget; var origEl = event.target || event.srcElement; if(origEl.tagName === 'A' || origEl.tagName === 'a') { alert( gBrowser.currentURI.spec); } It gives: https:// developer. mozilla. org/en-US/Add-ons/Code_snippets/Tabbed_browser But I need the previous redirect link. I think gBrowser.currentURI.spec get current Url of tab. I searched on Google but didn't find method to get original redirect link.
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25076047
has body: I am using OpenTok API to create a video chat app. In this app no more that two people should be able to connect to a session at a time. For that I am Using sessionId to create room and token Id that tells which room you want to connect. But as I am specifying this session Id in JavaScript, and any intruder can go and view the source of page and can get the session ID and can misuse it. From my understanding if a person gets his hands on a session id it will be as easy as using OpenTOK quickstart tutorial with my session id to snoop my video session. Can this be prevented?
tagged with: javascript
has title: Opentok- how to prevent video from intruder?
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion
answer count: 0
upvote count: 1
type: Question

http://stackoverflow.com/comment/39186723
has text: @AfzaalAhmadZeeshan Sorry about that, I modified the code here to make it easy for you guys to understand but forgot to replace .open-modal with .open-portfolio-item-details. I just edited.
comment on: http://stackoverflow.com/q/25168735
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39096051
comment on: http://stackoverflow.com/a/25119991
has text: @Takuya: Yes, I'd assumed that the OP wanted the local time for the user - if they always want London time regardless of the user's time zone, then using Europe/London makes sense... although it's a very odd design decision to start with.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25179498
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39206629
has body: You need to use it like this with:$root.myData Also make sure about the spell as javascript is case sensitive language
has comment: http://stackoverflow.com/comment/39205764
upvote count: 1
answers question: http://stackoverflow.com/q/25179347
type: Answer

http://stackoverflow.com/comment/39146795
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25146989
score: 0
has text: Please read carefully. My code has `#content`, not `body`! But the resulting effect is *as if* it was `body`. I don't know how to reproduce a problem in JSFiddle that is browser-specific...

http://stackoverflow.com/a/25249626
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25211746
answers question: http://stackoverflow.com/q/25211746
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/50911866
has body: solved.. for the interest of others with the same problem: the file in https://github.com/pivotal/jasmine-ajax/blob/master/lib/mock-ajax.js did not worked for me. I installed jasmine-ajax via npm and then referenced its version of mock-ajax.js from the gruntfile: vendor: ['node_modules/jasmine-ajax/lib/mock-ajax.js'], thanks to jsoverson for the hints in checking the paths (https://github.com/gruntjs/grunt-contrib-jasmine/issues/111#issuecomment-51806488)
type: Answer

http://stackoverflow.com/q/25114642
type: Question
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25142847
has comment: http://stackoverflow.com/comment/39120512
tagged with: css
has title: positioning entries on a timeline
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25116946
has body: Hello I have calender/schedule in an app that looks similar to this very basic example, | Jan | Feb | Mar | Apr | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Project #1 (Runs from start of Jan to mid March) ............... Project #2 (Runs from mid march to early september) .............................. The dots under the project title illustrate the length of the project, what I am struggling with is giving the entry the correct value of left margin to push the project to the correct start date. The figures I have available to me are: Number of days the projects run, Number of days between the 01/01/2014 and the first days of the project. Total number of days in the calendar (the calendar runs Jan 2014 - Dec 2019). Width of the container holding the calendar. I thought it would be something like this: var remainder = number_of_days_in_calendar - this.model.get('num_days_from_year_start'); var decimal = remainder / number_of_days_in_calendar; var marginLeft = decimal * 100 + "%"; But this returns percentages far too close together there is barely any difference between, Jan and August. I have worked out the project length successful using this sum, var width = (parseInt(this.model.get('run_number_days')) / number_of_days_in_calendar) * 100; this.$el.width(width + "%"); But nothing similar works for positioning the projects.
has comment: http://stackoverflow.com/comment/39090071
tagged with: math

http://stackoverflow.com/q/25070698
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39004368
has comment: http://stackoverflow.com/comment/39004695
has body: How do I set the error container style to display none after all the error messages have been resolved? I am using data-parsley-errors-container="#element" to create a div area at the top of my form. I want to apply a background color to it, but when I do, after all errors messages &lt;li&gt; are removed I am left with all the &lt;ul&gt; which has the effect of an empty div area with a colored background.
type: Question
tagged with: parsley.js
has title: How do I make data-parsley-errors-container="#element" go away after all errors are resolved?
score: 0
has answer: http://stackoverflow.com/a/25078464

http://stackoverflow.com/comment/39277181
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25217364
has text: I just tried your example and it returned the first include. For the second one the following error: `TypeError: Cannot read property 'insertBefore' of null`
score: 0

http://stackoverflow.com/comment/39043112
comment on: http://stackoverflow.com/q/25091589
has text: Hi Musa, I quickly tried: if (gv.spriteSheet.complete) { // do all the stuff in the gv.spriteSheet.onload function } else { gv.spriteSheet.onload = function() { // run the gv.spriteSheet.onload function } } But that yielded exactly the same results. I'm guessing then it's not because the sprite sheet has already loaded.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25120435
possible better answer: http://stackoverflow.com/a/25120490
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25120569
type: Question
has answer: http://stackoverflow.com/a/25121677
tagged with: arrays
downvote count: 0
tagged with: javascript
has title: How to find a value into an Array of Obects
linked to: http://stackoverflow.com/q/5424488
answer count: 3
linked to: http://stackoverflow.com/q/6116474
favorite count: 0
score: 2
accepted answer: http://stackoverflow.com/a/25121677
has comment: http://stackoverflow.com/comment/39096494
has answer: http://stackoverflow.com/a/25120490
has body: I have an Array of Objects in Javascript: function focal( name, data ) { this.name = name; this.data = data; } count = 0; arrayFocal = []; arrayFocal[count] = new focal( "Name", "12/08/2014" ); count++; Now I want to find into arrayFocal by name NOTE: IE 8
upvote count: 2
has comment: http://stackoverflow.com/comment/39096416

http://stackoverflow.com/q/25197085
score: 4
has comment: http://stackoverflow.com/comment/39255103
tagged with: security
linked to: http://stackoverflow.com/q/220231
downvote count: 0
has body: Cookie is a special type of HTTP header. Javascript can retrieve all cookies for the current page (e.g. https://stackoverflow.com/a/3400787/418439). However, it is not possible to retrieve the header of the current page (Accessing the web page&#39;s HTTP Headers in JavaScript) unless making another request. Why it is designed in this way? Due to security concern?
favorite count: 0
type: UnansweredQuestion
answer count: 0
linked to: http://stackoverflow.com/q/3400759
tagged with: http
has title: Can Javascript retrieve cookies from response header of current page?
type: Question
upvote count: 4
tagged with: javascript

http://stackoverflow.com/comment/39160671
has text: Just wondering - what browsers will you have to support with this code?
comment on: http://stackoverflow.com/a/25155008
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39142500
type: QuestionComment
score: 1
has text: You can shorten `[0-9]` by `\d`
comment on: http://stackoverflow.com/q/25145198
type: Comment

http://stackoverflow.com/a/25131373
has comment: http://stackoverflow.com/comment/39191767
has body: Use web scraping tools in Android and work out with the code. Try this solution: https://github.com/emirkin/bobik_java_sdk The following tools and code resources can come handy to your use : https://code.google.com/p/android-scripting/source/browse/rhino/rhino1_7R2.jar?r=835425b4ac473f2a2acfe9c4c2b92343f31b36ec http://zscraper.wordpress.com/2012/07/03/a-comparison-shopping-android-app-without-backend/ https://gist.github.com/emirkin/3041523
score: 0
has comment: http://stackoverflow.com/comment/39196233
type: Answer
answers question: http://stackoverflow.com/q/25130670

http://stackoverflow.com/comment/39255063
has text: Good answers accompany code samples with an explanation for future readers. While the person asking this question may understand your answer, explaining how you arrived at it will help countless others.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25205695

http://stackoverflow.com/q/25172693
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/32177087
score: 1
accepted answer: http://stackoverflow.com/a/25172828
type: Question
has comment: http://stackoverflow.com/comment/39193951
tagged with: javascript
has answer: http://stackoverflow.com/a/25172828
upvote count: 2
has answer: http://stackoverflow.com/a/32177087
answer count: 2
tagged with: html5-canvas
has comment: http://stackoverflow.com/comment/39193940
downvote count: 1
tagged with: jquery
has body: The Codecademy website has a lesson where the user can learn to create an animated name on a canvas element using JavaScript. I've been trying to recreate the result for months, but nothing I've tried has gotten me anywhere close to what I'm looking for. Below is the HTML and JavaScript used in the lesson (Link here: http://www.codecademy.com/goals/animate-your-name). This works, albeit only at the Codecademy website. JavaScript: Note 1: this version of the JS is slightly modified from the original. Note 2: the filename for this JavaScript is main.js. var red = [359, 100, 29.8]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; var purple = [280, 50, 60]; var bluefield = [199, 100, 22.9]; var myName = "Bluefield"; var letterColors = [bluefield,red]; var bubbleShape = "square"; drawName(myName, letterColors); bounceName(); bounceBubbles(); HTML (full): Note: I had not seen this HTML until today (August 6, 2014). Below is from a recent JSFiddle using similar code (Link here: http://jsfiddle.net/mnbishop017/cd7djy02/). This doesn't work. JavaScript var red = [359, 100, 29.8]; var orange = [40, 100, 60]; var green = [75, 100, 40]; var blue = [196, 77, 55]; var purple = [280, 50, 60]; var bluefield = [199, 100, 22.9]; var myName = "Bluefield"; var letterColors = [bluefield,red]; var bubbleShape = "square"; drawName(myName, letterColors); bounceName(); bounceBubbles(); HTML (within 'body' tags): External Resources linked (Important!): http://s3.amazonaws.com/codecademy-content/courses/hour-of-code/js/alphabet.js (from HTML of original lesson)
favorite count: 0
has title: JavaScript: How to recreate "Animate Your Name" lesson from Codecademy?
tagged with: animation
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39095492
has text: Why are you using `utc()` if you want a local time? Surely it's behaving exactly as expected...
comment on: http://stackoverflow.com/q/25119826
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25095705
type: Question
accepted answer: http://stackoverflow.com/a/25098255
has body: I am trying to adjust the tree layout example of mike bostock with embedded data http://bl.ocks.org/mbostock/4339083 .The embedded data should be a copy of a non-hierarchical .csv file: getData2() gets the data from the 'pre' tag and nests it. But for some reason it doesn't work. getData3() also doesn't work for some reason, there I use a variable with a non nested array and then nest it. How do I have to change the getData2() and the getData3() approaches to make it work ? Here is my html file: Year,Make,Model,Length 1997,BMW,E350,2.34 1997,BMW,E350,2.34 2000,Mercury,Cougar,2.38 d3.layout.tree click or option-click to expand or collapse
has title: D3.js how to use hierarchical layouts with embedded non hierarchical data
tagged with: d3.js
score: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25098255
type: AnsweredQuestion

http://stackoverflow.com/a/32061320
type: Answer
answers question: http://stackoverflow.com/q/25168593
has comment: http://stackoverflow.com/comment/81008170
downvote count: 0
score: 4
upvote count: 4
has body: You can have pure AngularJS lazy loading. Create "LazyService": var ng = angular.module('app'); ng.factory('lazyService', [ '$http', function($http) { var jsPath = 'js/${ name }.js'; var promisesCache = {}; return { loadScript: function(name) { var path = jsPath.replace('${ name }', name); var promise = promisesCache[name]; if (!promise) { promise = $http.get(path); promisesCache[name] = promise; return promise.then(function(result) { eval(result.data); console.info('Loaded: ' + path); }); } return promise; } } }]); Then, define your config: var ng = angular.module('app', [ 'ngRoute' ]); ng.config([ '$routeProvider', '$controllerProvider', '$provide', function($routeProvider, $controllerProvider, $provide) { // Lazy loading ng.lazy = { controller: $controllerProvider.register, //directive: $compileProvider.directive, //filter: $filterProvider.register, factory: $provide.factory, service: $provide.service } $routeProvider .when('/', { templateUrl: 'view/home.html' }) .when('/vendor', { templateUrl: 'view/vendor.html', resolve: { svc: [ 'lazyService', function(lazyService) { return lazyService.loadScript('services/vendor'); }], ctrl: [ 'lazyService', function(lazyService) { return lazyService.loadScript('controllers/vendor'); }] } }); . . . On "js/services/vendor.js", create service as: var ng = angular.module('app'); ng.lazy.service('vendorService', [ function() { . . . On "js/controllers/vendor.js", create controller as: var ng = angular.module('app'); ng.lazy.controller('vendorController', [ function() { . . . The "resolve" property on when defines which promises should be resolved before route loads.
has comment: http://stackoverflow.com/comment/136302070

http://stackoverflow.com/comment/39231562
comment on: http://stackoverflow.com/a/25193094
type: Comment
has text: That's just assigning the value to a variable, just in case I did try it but no it doesn't work :(
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39006056
has text: Exactly. Or use a callback function to call the `$('body').show();` if callAjaxFunction() accept the callback function passing.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25071810
type: Comment

http://stackoverflow.com/q/25100181
has answer: http://stackoverflow.com/a/25102619
has comment: http://stackoverflow.com/comment/39058706
has comment: http://stackoverflow.com/comment/39059064
favorite count: 0
has comment: http://stackoverflow.com/comment/39059058
has comment: http://stackoverflow.com/comment/39059244
has comment: http://stackoverflow.com/comment/39059451
has comment: http://stackoverflow.com/comment/39068834
has comment: http://stackoverflow.com/comment/39058799
type: UnansweredQuestion
tagged with: python
has comment: http://stackoverflow.com/comment/39059073
has body: Problems with comparator functions Behavior is undefined when the function is not transitive, or if it's not antisymmetric. The expected return value, an int in the set {-1, 0, 1}, is awkward It's longer than the keyfunc approach and uses imperative style when declarative style would do nicely In JavaScript Isn't the underscore function _.sortby(myArray, keyFunc) always better than myArray.sort(comparatorFunc)? Well, if only there weren't these two problems in JS: Unfortunately _.sortBy has no "reverse" argument when you want to sort in reverse order of the key. _.sortBy doesn't treat array keys as having lexicographical-ordering semantics, it just uses the native JS &lt; operator which converts them to a string, so there's no good way to do arbitrary lexicographic orderings. In Python The more recently implemented mylist.sort(key=keyfunc, reverse=True/False) seems always better than the older mylist.sort(cmp=comparatorfunc) approach.
has comment: http://stackoverflow.com/comment/39059293
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/39059154
upvote count: 3
score: -1
has comment: http://stackoverflow.com/comment/39059837
type: Question
downvote count: 4
answer count: 1
tagged with: javascript
has title: Is sorting with a comparator ever better than sorting with a key-func?
tagged with: sorting
has comment: http://stackoverflow.com/comment/39059440
has comment: http://stackoverflow.com/comment/39059880
has comment: http://stackoverflow.com/comment/39059068
linked to: http://stackoverflow.com/q/11476371

http://stackoverflow.com/a/25162568
has body: ng-table doesn`t sort groups with rows when set groupingBy parameter in ngTableParams as integer value (in my code it was a string) P.s. be carefull, because ng-table will sort groups again when integer value greater than 999.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25133661
type: Answer
accepted answer of: http://stackoverflow.com/q/25133661
score: 1
upvote count: 1

http://stackoverflow.com/a/25189502
accepted answer of: http://stackoverflow.com/q/25189426
answers question: http://stackoverflow.com/q/25189426
upvote count: 2
has comment: http://stackoverflow.com/comment/39225123
type: AcceptedAnswer
has body: The slash is double escaped, it only needs escaped once: str = str.replace('.', '\\.');
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/25107751
answers question: http://stackoverflow.com/q/25107586
accepted answer of: http://stackoverflow.com/q/25107586
score: 4
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/46770749
has comment: http://stackoverflow.com/comment/46783208
upvote count: 5
type: Answer
has body: Pull the logic out of the helper, making it available to be called both by the helper, and by non handlebars helper items alike. Parsing it into handlebars template and evaluating it is over complicating it. Where you put it is up to you, you could namespace it to your app, or just create it as a function that lives with your helper. function getStatusText(value){ switch(value) { case 1: return "Fresh"; break; case 2: return "Callback"; break; default: return "Unable to get Status"; } } Ember.Handlebars.helper('getStatusText', function (value, options) { return getStatusText(value); }); http://emberjs.jsbin.com/cenep/1/edit

http://stackoverflow.com/comment/39375697
type: AnswerComment
has text: What action starts the process? I can't see in your code where the $.getJSON() method is called. Usually these are attached to event handlers. Like when someone clicks a button, or changes a drop down, the code executes. My question is where in your code does the process of updating the select options occur.
type: Comment
comment on: http://stackoverflow.com/a/25194115
score: 0

http://stackoverflow.com/q/25182192
has comment: http://stackoverflow.com/comment/39212233
tagged with: javascript
tagged with: unique
linked to: http://stackoverflow.com/q/16810913
tagged with: angularjs
has answer: http://stackoverflow.com/a/25184151
score: 0
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/16810913
has comment: http://stackoverflow.com/comment/39213247
type: Question
has body: I want to check whether the prefix is unique or not while user is filling the form for that i have followed Plunker In my code: Prefix Prefix is required. How can i use name-unique properly in my code so that i can validate the prefix properly?
has title: How to check name uniqueness in angular js?
has comment: http://stackoverflow.com/comment/39213161
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/40171447

http://stackoverflow.com/a/25075917
score: 2
has body: The attribute is on your img, not your .prod_amount_add div, so you'd do $(this).find('img').attr('data-validamount');
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25075886
answers question: http://stackoverflow.com/q/25075886
upvote count: 2
type: Answer

http://stackoverflow.com/q/25170753
tagged with: python
score: 2
has answer: http://stackoverflow.com/a/26953242
type: Question
answer count: 2
has title: BeautifulSoup scrape from javascript (encoded) variable
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/26953403
tagged with: http://stackoverflow.com/tag/html
has body: I am scraping a page and cannot get a certain field because it is stored in a javascript variable. My question is, how can I scrape the following code, decode it, and save the &lt;li&gt; tag(s) content? Using BeautifulSoup and anything else python. Here is the code inside the &lt;script&gt; tag: &lt;script type="text/javascript"&gt; var html_audition_details_sidebar = ' \u003Cdiv id\u003D\u0022apply_wrapper\u0022\u003E \u003Cdiv class\u003D\u0022header\u0022\u003E \u003Cp\u003EAudition Information\u003C/p\u003E \u003C/div\u003E \u003Cdiv class\u003D\u0022text \u0022\u003E \u003Cdiv class\u003D\u0022roleContainer \u0022 style\u003D\u0022color: #999\u003B font\u002Dsize: 14px\u003B\u0022\u003E \u003Cp\u003EOnly official members can see audition information for this job\u003C/p\u003E \u003C/div\u003E \u003C/div\u003E \u003Cdiv class\u003D\u0022applyButton\u0022\u003E \u003Cp\u003E\u003Ca class\u003D\u0022applyLink\u0022 href\u003D\u0022/accounts/login/apply/41680/\u0022\u003ESubscribe Now \u003C/a\u003E\u003C/p\u003E \u003C/div\u003E \u003C/div\u003E'; var html_additional_requirements = ''; var html_role_listing = '\u003Cdiv class\u003D\u0022text callListing loggedout \u0022\u003E \u003Cp class\u003D\u0022title\u0022\u003E\u003Ca name\u003D\u0022roles\u0022\u003E\u003C/a\u003ESeeking Talent \u003Cspan class\u003D\u0022optional\u0022\u003ESelect a role below for more information and submission instructions.\u003C/span\u003E\u003C/p\u003E \u003Cdiv class\u003D\u0022castingRoles\u0022\u003E \u003Cul\u003E \u003Cli \u003E \u003Ca href\u003D\u0022/casting/untitled\u002Dcomedy\u002Dshort\u002D41680/martinique\u002D159296/\u0022\u003E Martinique (Lead): \u003Cspan class\u003D\u0022roletag\u0022\u003E Female, 18\u002D25, Caucasian \u003C/span\u003E \u003Cspan class\u003D\u0022applyNow\u0022\u003E \u003C/span\u003E \u003C/a\u003E \u003Cp class\u003D\u0022role\u002Ddesc\u0022 style\u003D\u0022border\u002Dbottom: none\u003B padding\u002Dbottom: 0px\u003B margin\u002Dbottom: 0px\u…
favorite count: 0
tagged with: beautifulsoup
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/a/25171033
has comment: http://stackoverflow.com/comment/39191058
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25171011
has comment: http://stackoverflow.com/comment/39191143
has comment: http://stackoverflow.com/comment/39191264
answers question: http://stackoverflow.com/q/25171011
type: Answer
has comment: http://stackoverflow.com/comment/39191252
has comment: http://stackoverflow.com/comment/39191149
has body: position: fixed is what you want. This causes the element to be removed from the flow entirely and stay in the same position even after scrolling the page. position: absolute is similar, but it only removes an element from the flow. Scrolling a containing div (or in this case, the whole page) will still cause it to move. I opened up your web page in Chrome, and changed the styles for #navigation to: background: white; height: 100%; text-align: center; position: fixed; width: 18.72%; This does what you want. You will just need to position the rest of the content to the right.
has comment: http://stackoverflow.com/comment/39191715
has comment: http://stackoverflow.com/comment/39191572
has comment: http://stackoverflow.com/comment/39191043
has comment: http://stackoverflow.com/comment/39191549
upvote count: 5
has comment: http://stackoverflow.com/comment/39191523

http://stackoverflow.com/comment/39272122
comment on: http://stackoverflow.com/a/25214718
type: AnswerComment
has text: sir im supposed to have 2 values 1st the value of the card number and what type of card. For example 1234 5678 1234 5123 Visa.
score: 0
type: Comment

http://stackoverflow.com/a/25167711
answers question: http://stackoverflow.com/q/25167584
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25167584
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can use prefix matching to catch any rel attribute starting with 201 (or 20, to work for the rest of the century): $(document).ready(function(){ $("a[rel^='201']").colorbox(); }); See Attribute Starts With Selector
score: 1

http://stackoverflow.com/q/25134693
tagged with: javascript
has title: How to only update a Backbone view if the collection changed on the server?
score: 0
tagged with: polling
answer count: 1
tagged with: backbone.js
tagged with: templates
tagged with: view
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25135077
has body: I've got a page for which I poll for notifications. If there are any notifications I populate a Backbone.js view with the notifications. I currently poll for notifications every 2 seconds and simply repopulate the view every two seconds. function updateNotificationView(ticketId) { var ticketNotificationCollection = new TicketNotificationCollection([], {id: ticketId}); $.when(ticketNotificationCollection.fetch()).done(function() { var notificationView = new NotificationsView({collection: ticketNotificationCollection}); $('#ticket-notifications-area').html(notificationView.render().el); }); } window.notificationsIntervalId = setInterval(function() {updateNotificationView(ticketId);}, 2000); I now want to only populate the view if the Backbone fetched collection has changed, but I have no idea how I could do that? Could anybody give me a tip on how I could only populate the view on collection change? All tips are welcome! [EDIT] I now changed the function to this: function updateNotificationView(ticketId) { var ticketNotificationCollection = new TicketNotificationCollection([], {id: ticketId}); var notificationsView = new NotificationsView(); notificationsView.listenTo(ticketNotificationCollection, 'change', notificationsView.render); notificationsView.listenTo(ticketNotificationCollection, 'add', notificationsView.render); ticketNotificationCollection.fetch(); } and I changed the NotificationsView to this: var NotificationsView = Backbone.View.extend({ addNotificationView: function(notification) { var singleNotificationView = new SingleNotificationView({model: notification}); this.$el.append(singleNotificationView.render().el); }, render: function() { console.log('ITS BEING CALLED!!'); this.collection.each(this.addNotificationView, this); $('#ticket-notifications-area').html(this); } }); I now get the "ITS BEING CALLED!!" in the console every two seconds, but also an error: "Uncaught TypeError: Cannot read property 'each' of undefined.". I get why this error occurs; i…

http://stackoverflow.com/comment/39002522
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25069836
has text: Are there any externally loaded files such as images?
type: Comment

http://stackoverflow.com/a/25177216
score: 0
has body: I found two solutions for this problem, but they are more of working around,because as I understood and I quote "rendering an h:form after initial page load messes with ajax requests", and for my situation I can't remove the h:form from the included pages. So instead of c:if I used f:subview it has a render attribute you can check this at subview with including pages The other solution is using javascript to append the pages on the main page $('.main-button2').click(function(e) { $(".parent-panel").empty(); $.get("../history.xhtml", function(data) { $(".parent-panel").append(data); }); });
answers question: http://stackoverflow.com/q/25165386
type: Answer
has comment: http://stackoverflow.com/comment/39238932

http://stackoverflow.com/a/25122549
answers question: http://stackoverflow.com/q/25122340
has comment: http://stackoverflow.com/comment/39100387
score: 0
has comment: http://stackoverflow.com/comment/39100457
type: Answer
has comment: http://stackoverflow.com/comment/39100700
has body: Take a look at my changes. http://jsfiddle.net/Gg92v/2/ Shortly, check your form like this: if($('#form1 input:not(.valid)').length == 0){ $('button[type=submit]').prop('disabled',false) }

http://stackoverflow.com/q/25166047
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25181337
tagged with: http://stackoverflow.com/tag/html
has title: Serve only requested content range
tagged with: header
upvote count: 3
type: UnansweredQuestion
tagged with: node.js
has body: Using Node.js, I'm trying to create a video server which serves only a small part of a larger media file. Following this gist I've been able to create a video server and feed that to a html5 video player using: &lt;video controls width="500"&gt; &lt;source src="http://127.0.0.1:1337/" type='video/mp4'&gt; &lt;/video&gt; However, the range request starts at 0 and potentially buffers beyond a point of interest (if say I only wanted to view under 25 seconds of video). Ideally I'd the ability to playback from some arbitrary point for a known duration and serve only that content. I know one solution is to seek to a specific point in the video client side and stop playback after a known duration; but is it possible to serve JUST the video content required? Is the only fool proof way of achieving this to use a tool like FFMpeg to trim a larger clip into smaller chunks? Thanks in advance, GW
tagged with: video
score: 3
type: Question
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25193494
accepted answer of: http://stackoverflow.com/q/25190400
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39270502
downvote count: 1
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/39233271
has comment: http://stackoverflow.com/comment/39233179
has comment: http://stackoverflow.com/comment/39233250
has comment: http://stackoverflow.com/comment/39233206
score: 3
answers question: http://stackoverflow.com/q/25190400
has body: It is possible indeed. Only for global variables though. Object.defineProperties(this, { myObject: { get: function () { return myObjectValue; }, set: function (value) { myObjectValue = value; }, enumerable: true, configurable: true }, myObjectValue: { value: 0, enumerable: false, configurable: true, writable: true } }); myObject = 5; console.log(myObject); console.log(delete myObject); Now, every time you assign a value to myObject, it shall actually run the set function and assign the value to the other property instead. Now, if you wanted to minimize pollution, you could create an IIFE and use variables inside that instead to hold the values, per se. http://jsbin.com/zopefuvi/1/edit And here is the version with the IIFE. http://jsbin.com/puzopawa/1/edit

http://stackoverflow.com/comment/122467738
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/57677731
type: Comment
has text: the fact that you can pass an array of ids to .val() is useful if you want to set more than one value as selected

http://stackoverflow.com/a/25213532
type: Answer
has body: What's a "hashbang"? Do you mean "#"? If so, then it's pretty much THE normal and "clean" way to link to a specific section of a page. That's why it was invented in the first place. Anything else is hackery.
upvote count: 0
score: -1
downvote count: 1
has comment: http://stackoverflow.com/comment/39270004
has comment: http://stackoverflow.com/comment/39270195
answers question: http://stackoverflow.com/q/25213501

count
tags question: http://stackoverflow.com/q/25075254
tag name: count
type: Tag
tags question: http://stackoverflow.com/q/25094723

http://stackoverflow.com/comment/39134720
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25141112
has text: Ahh! Thanks, I thought jQuery did that automatically.. :D
type: Comment

http://stackoverflow.com/a/25149808
has body: first you defined ng-app="myApp" but you didn't define any module named "myApp", so just use ng-app. second, seems like the angular version you used 1.3.0-beta.17 doesn't work if you don't declare a module like this angular.module("myApp", []) if you want to to make the example you posted work, use a different angular version, like 1.2.5 here's a working jsbin of your code
downvote count: 0
answers question: http://stackoverflow.com/q/25149560
accepted answer of: http://stackoverflow.com/q/25149560
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/comment/39232671
type: Comment
score: 0
type: AnswerComment
has text: Fantastic, so it's been just fine. Thank you! And I spent the day pondering about this m)
comment on: http://stackoverflow.com/a/25193743

http://stackoverflow.com/comment/39182356
comment on: http://stackoverflow.com/q/25165760
type: QuestionComment
type: Comment
has text: I think cleaning node and applyBinding new viewmodel again and again is not efficient instead you should swap-in/swap-out the template according to data. see this https://gist.github.com/kim3er/3478709
score: 0

http://stackoverflow.com/comment/39281114
has text: My colleagues just want to tell me about the function scope:the global object and the local object.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25219438
score: 0

http://stackoverflow.com/a/25163091
has comment: http://stackoverflow.com/comment/39176392
type: Answer
has body: Hopeless cause. JS doesn't have access to the System.
upvote count: 2
has comment: http://stackoverflow.com/comment/39176875
score: 2
accepted answer of: http://stackoverflow.com/q/25163061
has comment: http://stackoverflow.com/comment/39176018
has comment: http://stackoverflow.com/comment/39175780
answers question: http://stackoverflow.com/q/25163061
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39019092
type: QuestionComment
comment on: http://stackoverflow.com/q/25079087
score: 0
type: Comment
has text: syntax error close ` ` properly.

http://stackoverflow.com/comment/39239265
comment on: http://stackoverflow.com/a/25158134
type: Comment
has text: Ahhh thanks, I had the clip rectangle in the wrong order all along! I didn't actually need to use `overflow:hidden` at all, that was just confusing things.
score: 1
type: AnswerComment

http://stackoverflow.com/q/25202105
has answer: http://stackoverflow.com/a/25202306
accepted answer: http://stackoverflow.com/a/25202306
type: Question
tagged with: javascript
score: 0
has title: get selected checkbox value in array
answer count: 1
has body: I have created an applicaion in angular for getting all the checkbox value which is checked into an array, without any looping, but after simultaneous checking and un-checking i am getting wrong data within the array Working Demo can anyone please give me some solution for this var app = angular.module('checkbox', []); app.controller('homeCtrl', function ($scope) { $scope.selected = []; $scope.array_ = angular.copy($scope.array); $scope.list = [{ "id": 1, "value": "apple", "checked": false }, { "id": 3, "value": "orange", "checked": false }, { "id": 5, "value": "pear", "checked": false }]; $scope.checkedOrNot = function (id, isChecked, index) { if (isChecked) { $scope.selected.push(id); } else { $scope.selected.splice(index, 1); } } });
tagged with: angularjs
tagged with: checkbox
type: AnsweredQuestion

http://stackoverflow.com/a/25186448
has body: Just added different id's to each table row. HTML Adam Gil 0067 Australia Sydney Sydney AU 67543 50% CSS #name { width: 13.2%; } #lastname { width: 12.9%; } #id { width: 22.8%; } #country { width: 10.5%; } #branch { width: 9.3%; } #location { width: 10.9%; } #cardno { width: 10.5%; } #percent { }
downvote count: 0
answers question: http://stackoverflow.com/q/25185434
has comment: http://stackoverflow.com/comment/39239309
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/25134168
has comment: http://stackoverflow.com/comment/39121837
score: 0
has body: I have a webapp that runs on a pi thats just a animation. Now the pi struggles when there is loads of animation happening. What I would like to do is render the app on the server and stream is as a video feed to the pi thus taking all the javascript processing away from the pi. How would I go about doing that? The app has a java backend serving up the html.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Stream webapp as video feed
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39121903
has answer: http://stackoverflow.com/a/25134703
tagged with: java
has comment: http://stackoverflow.com/comment/39122075
type: Question
tagged with: javascript

internet-explorer
tags question: http://stackoverflow.com/q/25213016
tags question: http://stackoverflow.com/q/25109904
tags question: http://stackoverflow.com/q/25164795
tags question: http://stackoverflow.com/q/25091589
tags question: http://stackoverflow.com/q/25158696
tags question: http://stackoverflow.com/q/25200001
tags question: http://stackoverflow.com/q/25090606
tag name: internet-explorer
tags question: http://stackoverflow.com/q/25076138
tags question: http://stackoverflow.com/q/25117869
tags question: http://stackoverflow.com/q/25123157
tags question: http://stackoverflow.com/q/25201113
tags question: http://stackoverflow.com/q/25078689
tags question: http://stackoverflow.com/q/25140723
tags question: http://stackoverflow.com/q/25160112
tags question: http://stackoverflow.com/q/25226907
tags question: http://stackoverflow.com/q/25145722
tags question: http://stackoverflow.com/q/25167940
tags question: http://stackoverflow.com/q/25145901
tags question: http://stackoverflow.com/q/25121384
tags question: http://stackoverflow.com/q/25204285
tags question: http://stackoverflow.com/q/25083783
tags question: http://stackoverflow.com/q/25086985
tags question: http://stackoverflow.com/q/25143786
tags question: http://stackoverflow.com/q/25181052
tags question: http://stackoverflow.com/q/25159696
tags question: http://stackoverflow.com/q/25077036
tags question: http://stackoverflow.com/q/25142846
tags question: http://stackoverflow.com/q/25193927
tags question: http://stackoverflow.com/q/25224666
tags question: http://stackoverflow.com/q/25177698
tags question: http://stackoverflow.com/q/25088852
tags question: http://stackoverflow.com/q/25140476
tags question: http://stackoverflow.com/q/25079773
tags question: http://stackoverflow.com/q/25193788
tags question: http://stackoverflow.com/q/25135062
type: Tag
tags question: http://stackoverflow.com/q/25196001
tags question: http://stackoverflow.com/q/25213476
tags question: http://stackoverflow.com/q/25167593
tags question: http://stackoverflow.com/q/25101441
tags question: http://stackoverflow.com/q/25138322
tags question: http://stackoverflow.com/q/25141650
tags question: http://stackoverflow.com/q/25208218
tags question: http://stackoverflow.com/q/25134031
tags question: http://stackoverflow.com/q/25223708
tags question: http://stackoverflow.com/q/25198481

http://stackoverflow.com/comment/39106319
has text: Yup, it's not finding element. Are you dynamically adding the div? Are you sure, you're `$(document).on('ready')` function is working?
comment on: http://stackoverflow.com/q/25124553
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25186551
tagged with: google-maps
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Google map and markers choosable by html5
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25189813
score: -1
has body: Markers at map doesnt show. What's wrong? http://pastebin.com/VYbZVF7H After it. I want to make choosable marker [option] in [datalist] [html5]. http://pastebin.com/mgjEvG7A Can anyone help me with that?

customvalidator
tags question: http://stackoverflow.com/q/25111505
tag name: customvalidator
type: Tag

http://stackoverflow.com/a/25143675
has comment: http://stackoverflow.com/comment/39140167
score: 2
accepted answer of: http://stackoverflow.com/q/25143582
has body: There is no way to force the browser to maximum height. You can write css like .max_width{ width: 100%; } this will make the container 100%. But the height will be determined by the height of the elements inside. This can be solved using javascript though.
has comment: http://stackoverflow.com/comment/39139587
answers question: http://stackoverflow.com/q/25143582
has comment: http://stackoverflow.com/comment/39140213
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39141570
upvote count: 2
type: Answer

http://stackoverflow.com/comment/39028291
type: Comment
comment on: http://stackoverflow.com/a/25083555
has text: my code did execute but the default function of crtl click still worked, so how do I prevent that?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39155582
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25151924
has text: I don't see any pattern what you want, I can just print the steps, and there is no step such `0+0=0` the step to get `0` is `-1+1=0`.

http://stackoverflow.com/comment/39244355
comment on: http://stackoverflow.com/a/25199638
score: 0
type: AnswerComment
type: Comment
has text: I see the solution has worked for you, please approve the answer. Thanks

http://stackoverflow.com/a/25083555
has comment: http://stackoverflow.com/comment/39027712
has body: Capture the click event, and see if the control button is held down using event.ctrlKey document.getElementById("datAnchor").addEventListener("click", function(e) { if (e.ctrlKey) { //your code here } // else do nothing with e.preventDefault(); }, false); If you meant all anchor tags, you'll have to get fancy with the selector and throw it into a loop like.. Array.prototype.forEach.call(document.getElementsByTagName("a"), function(element) { //code from other sample in here, except replace the //getElementById with `this` }); For event fancier selectors, document.querySelectorAll should suit your benefits.
answers question: http://stackoverflow.com/q/25083421
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25083421
has comment: http://stackoverflow.com/comment/39027973
type: Answer
has comment: http://stackoverflow.com/comment/39028291
has comment: http://stackoverflow.com/comment/39027672
upvote count: 3
has comment: http://stackoverflow.com/comment/39028605
score: 3

http://stackoverflow.com/q/25120541
has comment: http://stackoverflow.com/comment/39096900
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39113582
possible better answer: http://stackoverflow.com/a/25120946
tagged with: cookies
has body: Is it possible to pass a variable from one page to another without a form, provided that the first page does not have a link (e.g. a button or other control where the user would click and would be redirected to the second page - so in a nutshell the first page does not directly link to the second page at all) to the second page. I can not use session variables because the first page and the second page are going to be visited by different users (so obviously in different sessions). I do not want to use cookies either. So please suggest a solution other than cookies or session variables?
has answer: http://stackoverflow.com/a/25120946
type: Question
accepted answer: http://stackoverflow.com/a/25120616
has title: How to pass variable from one page to another unlinked page
tagged with: javascript
has answer: http://stackoverflow.com/a/25120879
tagged with: post
tagged with: get
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25120616
tagged with: php

http://stackoverflow.com/q/25139521
has title: customise the scrollbar in Firefox and IE without know the container height
type: Question
tagged with: browser
score: 0
answer count: 2
has body: I need the scrollbar in my website has the same look and feel cross browsers, I already checked couple of plugins that are used to create customised scrollbar, for example this one, however, it seems that all these plugins require a fixed container's height(i.e the height should be pre-defined). But in my case, pre-defined height is not an option, anyone know other workaround?
tagged with: javascript
type: UnansweredQuestion
tagged with: scroll
has answer: http://stackoverflow.com/a/25154655
has answer: http://stackoverflow.com/a/25154945

http://stackoverflow.com/comment/39151408
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25149760
type: Comment
has text: Yes. that is possible. you want to create and append a script tag to the page.

http://stackoverflow.com/a/25221042
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25215609
accepted answer of: http://stackoverflow.com/q/25215609
type: Answer
has body: You seem a little confused on some Meteor ideas. Firstly Meteor.methods({ ... }) are functions that can be called client side using Meteor.call({ }) They should appear at the top level and not inside other functions like Accounts.onCreateUser For this use case I don't see why you need a method at all though. All you want to do is retrieve data that you will be storing in data that is going to be sent to the client anyway. If you use the accounts-base package then you automatically get a Meteor.users collection that would be fine for what you want to do. I don't see the need for a Profile collection Here's a meteorpad illustrating it: http://meteorpad.com/pad/xL9C8eMpcwGs553YD Note I store the bio in the profile section of the user. This is because a user can edit their own profile section by default and so I can do Meteor.users.update( ... ) client side. This is just an example to show some of the concepts. It does have bad practice in it. For a start I would recommend adding the package accounts-ui and using the {{> loginButtons}} helper. It gives you the error checking and so on. The reason I didn't use it was because I wanted to show how to allow a user to enter their bio prior to creating the account and how you can use that in Accounts.onCreateUser.
has comment: http://stackoverflow.com/comment/39441319
score: 0

http://stackoverflow.com/a/25198513
answers question: http://stackoverflow.com/q/25198225
has body: This code provides the expected functionality without jQuery: function changeEvent(event) { //add highlight class this.parentNode.classList.add("highlight"); try { //remove highlight class from previously selected radio in group //if already existing this.parentNode.parentNode.highlightDIV.classList.remove("highlight"); } catch (ignore) {} //keep the highlighted div as a property of the parent div this.parentNode.parentNode.highlightDIV = this.parentNode; } //select all radio buttons var radioList = document.querySelectorAll('input[type="radio"]'); //loop through list and add event listener for (var i = 0; i &lt; radioList.length; i++) { radioList[i].addEventListener("change", changeEvent, false); } It uses references to parentNode but they can be replaced by algorithms to dynamically find the wanted nodes in a more dynamic structure. I hope you get the direction and you may improve and modify the code to fit into your applications needs.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39243337
score: 1
has comment: http://stackoverflow.com/comment/39243193
accepted answer of: http://stackoverflow.com/q/25198225
has comment: http://stackoverflow.com/comment/39389856
has comment: http://stackoverflow.com/comment/39395014
type: Answer
has comment: http://stackoverflow.com/comment/39432460
has comment: http://stackoverflow.com/comment/39430748
has comment: http://stackoverflow.com/comment/39394834
has comment: http://stackoverflow.com/comment/39391834
has comment: http://stackoverflow.com/comment/39390927
upvote count: 1
has comment: http://stackoverflow.com/comment/39242868
has comment: http://stackoverflow.com/comment/39242928

http://stackoverflow.com/a/25141641
score: 0
type: Answer
has body: Currently I've gotten it working through javascript at the client side with the following modifications: &lt;div id="containerDiv"&gt; &lt;asp:Panel ID="firstpanel" runat="server"&gt; &lt;asp:RadioButtonList ID="rblSelect" runat="server" RepeatDirection="Vertical" &gt; &lt;asp:ListItem Text="Show hidden" Value="0" onclick="ShowMe($$(this, 'hiddenPan'));" &gt;&lt;/asp:ListItem&gt; &lt;asp:ListItem Text="Show other" Value="1" onclick="ShowMe($$(this, 'otherPan'));" &gt;&lt;/asp:ListItem&gt; &lt;/asp:RadioButtonList&gt; &lt;/asp:Panel&gt; &lt;asp:Panel ID="hiddenPan" runat="server" style="display:none"&gt; &lt;!-- stuff to work with --&gt; &lt;/asp:Panel&gt; &lt;/div&gt; javascript/client side functions: function ShowMe(showPanel) { showPanel.show(); } function $$(target, id) { var t = $(target); var con = t.closest("#containerDiv"); var el = $("#" + id, con); if (el.length &lt; 1) el = $("[id$=_" + id + "]", con); return el; } The following link was used to come to the solution.
answers question: http://stackoverflow.com/q/25136600

http://stackoverflow.com/q/25106676
has body: I can't echo value from ajax post. I don't know why. But when I same value put into mysql_query("SELECT INTO something VALUES('$kategorija')"); <-- THIS WORK but, echo $kategorija doesn't work PHP FILE : // pronadji-oglas.php <?php include_once('connect.php'); session_start(); $kategorija = mysql_real_escape_string($_POST["kategorije"]); $podkategorija= mysql_real_escape_string($_POST["podkat"]); echo $kategorija; ?> JS FILE : // filter.js $(function() { $("#pronadji-oglas").click(function() { var kategorija = $("#kategorije").val(); var podkategorija = $("#pod-kat").val(); $.post("includes/pronadji-oglas.php", { kategorije: kategorija, podkat: podkategorija }, function(info) { }); alert(kategorija); $("#pronadji-form").submit(function() { return false; }); }); $("#pronadji-oglas").click(function() { $(".dasdas").load("includes/pronadji-oglas.php"); }); }); HTML FILE : Kategorija : ----Odaberi---- <?php include_once('kategorije.php'); ?> Podkategorija : ----Odaberi--- Mesto/Grad : ----Odaberi---- <?php include_once('mesto.php');?> Po najnovijem Po najstarijem
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39071136
linked to: http://stackoverflow.com/q/12859942
tagged with: ajax
linked to: http://stackoverflow.com/q/24841356
has comment: http://stackoverflow.com/comment/39070721
score: 0
has title: ajax post to php echo not working
has comment: http://stackoverflow.com/comment/39070829
duplicate of: http://stackoverflow.com/q/24841356
has comment: http://stackoverflow.com/comment/39070638
favorite count: 0
has comment: http://stackoverflow.com/comment/39070788
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/39070746
tagged with: echo
has comment: http://stackoverflow.com/comment/39071982
type: Question
linked to: http://stackoverflow.com/q/60174

http://stackoverflow.com/q/25115585
has comment: http://stackoverflow.com/comment/39088971
has answer: http://stackoverflow.com/a/25141166
tagged with: javascript
tagged with: gulp
has body: I want to do a jshint on the files that is not library files like require js var gulp = require('gulp'); var jshint = require('gulp-jshint'); var ignore = require('gulp-ignore'); gulp.task('jshint', function() { gulp.src('./js/src/*.js') .pipe(ignore.exclude('require.js')) .pipe(jshint()) .pipe(jshint.reporter('default')); }); This still reports require js C:\Work\neolivz\js\src\require.js: line 12, col 267, Too many errors. (32% scanned). Any idea?
has title: gulp-ignore with gulp-jshint
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39087313
has answer: http://stackoverflow.com/a/25943413
has comment: http://stackoverflow.com/comment/39089011
has comment: http://stackoverflow.com/comment/39087986
type: Question
score: 0
answer count: 2

http://stackoverflow.com/comment/39278307
type: Comment
has text: Sorry I'm totally a noob at regex but I couldn't get the above regex to allow only the - dash symbol and no other symbols
comment on: http://stackoverflow.com/a/25217940
type: AnswerComment
score: 0

http://stackoverflow.com/q/25139551
accepted answer: http://stackoverflow.com/a/25258032
tagged with: dynamics-crm-online
has comment: http://stackoverflow.com/comment/39134251
tagged with: dynamics-crm
has title: Load a JavaScript event the last in CRM form
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25258032
has body: I have one image saved in Notes with every form in my CRM Online 2013 custom entity. I am using the following code to query the image and show it in an Image tag in a Web Resource on the form. For debugging purposes I was calling the following code through a button, but I want this process of querying the Notes and displaying the image in the web resource to be automatic when the form load. Here is my code: &lt;html&gt;&lt;head&gt;&lt;meta charset="utf-8"&gt;&lt;/head&gt; &lt;body&gt; &lt;img id="image" src="nothing.jpg" style="width: 25%; height: auto;" /&gt; &lt;script type="text/javascript"&gt; $(windows).load(function() { var recordId = window.parent.Xrm.Page.data.entity.getId(); var serverUrl = Xrm.Page.context.getServerUrl().toString(); var ODATA_ENDPOINT = "XRMServices/2011/OrganizationData.svc"; var objAnnotation = new Object(); ODataPath= serverUrl+ODATA_ENDPOINT; var temp= "/AnnotationSet?$select=DocumentBody,FileName,MimeType,ObjectId&amp;$filter=ObjectId/Id eq guid'" + recordId + "'"; var result =serverUrl + ODATA_ENDPOINT + temp; var retrieveRecordsReq = new XMLHttpRequest(); retrieveRecordsReq.open('GET', ODataPath + temp, false); retrieveRecordsReq.setRequestHeader("Accept", "application/json"); retrieveRecordsReq.setRequestHeader("Content-Type", "application/json; charset=utf-8"); retrieveRecordsReq.onreadystatechange = function () { if (this.readyState == 4 /* complete */) { if (this.status == 200) { this.onreadystatechange = null; //avoids memory leaks var data = JSON.parse(this.responseText, SDK.REST._dateReviver); if (data &amp;&amp; data.d &amp;&amp; data.d.results) { SuccessFunc(JSON.parse(this.responseText, SDK.REST._dateReviver).d.results); } } else { alert(SDK.REST._errorHandler(this)); } } }; var x = new XMLHttpRequest(); x.open("GET", result, true); x.onreadystatechange = function () { if (x.readyState == 4 &amp;&amp; x.status == 200) { var doc = x.responseXML; var title = doc.getElementsByTagName("feed")[0].getElementsByTagName("entry")[0…
type: Question
tagged with: dynamics-crm-2011
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/25167457
has body: Issue: I have problems with this page: http://kivusandcamera.com/blog/ The page loads with a proper layout, but then the two blog entries "jump" to the left behind the navigation bar. I have spent a good bit of time trying work through the various CSS, inspecting it with developer tools, etc..., but I have reached a point where I feel like I need some help. Any advice would be appreciated. Background: This is just a basic Wordpress theme that I am trying to customize for a website, so I am not 100% sure how Additional Information: Though I am passingly familiar with CSS, I have done hardly any work involving responsive design, media queries, etc... Basically, I am saying (1) I would not be surprised if it is something really simple that I am missing, and (2) if something could be done a better way, please feel free to let me know. UPDATE - It looks like this issue might be Javascript or JQuery related. Basically, a style attribute is getting injected into one of the div tags. The style attribute used an absolute position, with a certain width, and I have no idea how to modify it. UPDATE #2 - It appears the issue happens with any pages I set in the theme to "Full Width" (see also the http://kivusandcamera.com/about page.) I think those pages must get processed differently by JS layout framework that is used. Again, I still haven't figured out how that is all happening.
tagged with: wordpress
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25170609
has comment: http://stackoverflow.com/comment/39184345
tagged with: javascript
score: 0
has title: Debugging CSS (Possibly JavaScript or JQuery) Issue
upvote count: 1
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39185121
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39184092
tagged with: css

http://stackoverflow.com/comment/40973715
type: QuestionComment
score: 0
has text: possible duplicate of [Google Login Hitting Twice?](http://stackoverflow.com/questions/23020733/google-login-hitting-twice)
comment on: http://stackoverflow.com/q/25229721
type: Comment

http://stackoverflow.com/a/25097511
has comment: http://stackoverflow.com/comment/39054041
type: AcceptedAnswer
score: 0
type: Answer
has body: this.item is not a variable. this is an object, and item is a key for a property in the object. When you use the syntax: this.item = something; You are assigning a key:value pair (property) into the this object with a value of something. If you viewed the object as a string it would look like this: {"item":"something"} To have a value available outside of a function, you could create a global object, and put the value inside of the global object. var objGlobalForValues = {}; //Create a global object available globally navigator.geolocation.getCurrentPosition(function(position) { .... Deleted to minimize code var myInfo = $('#this-carousel-id .carousel-inner .item.active').attr("data-id"); objGlobalForValues['myPropertyName'] = myInfo; .... Deleted to minimize code } See this documentation for info on JavaScript objects: Working With Objects - Mozilla
answers question: http://stackoverflow.com/q/25097183
accepted answer of: http://stackoverflow.com/q/25097183

http://stackoverflow.com/q/25116697
upvote count: 0
has body: I have a fixed title in a DIV which scrolls under the website until the relevant section. I would like to know how to only have the DIV display once the user scrolls to the needed section.
tagged with: jquery
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39089291
score: -2
tagged with: css
has answer: http://stackoverflow.com/a/25116746
has title: Display fixed div at certain height
downvote count: 2
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25116746
type: AnsweredQuestion

http://stackoverflow.com/comment/39299054
score: 0
type: Comment
has text: Thanks for the answer, I'll try it out when I get access to the code again tomorrow and let you know if it works.
type: AnswerComment
comment on: http://stackoverflow.com/a/25208040

http://stackoverflow.com/q/25213150
favorite count: 0
has comment: http://stackoverflow.com/comment/39269408
has title: Selenium "return" javascript value not printing
accepted answer: http://stackoverflow.com/a/25213207
has comment: http://stackoverflow.com/comment/39269234
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: java
tagged with: selenium
has answer: http://stackoverflow.com/a/25213207
type: Question
tagged with: javascript
has body: I'm using Selenium with Java for some tests. The code I have to print the pages html from javascript works great as an alert: js.executeScript("alert($('html').html());"); However when I use return, nothing prints in the Eclipse console: js.executeScript("return $('html').html();"); What am I doing wrong, and how can i print (using System.out.print) the html result from returning in Javascript? Thanks, and no I do not want to use source.
upvote count: 1
answer count: 1

http://stackoverflow.com/q/25133088
has answer: http://stackoverflow.com/a/25133242
possible better answer: http://stackoverflow.com/a/25133287
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25133242
has title: How to dynamically change content of the classin an Angular JS?
type: Question
answer count: 2
has body: I am trying to dynamically change the class name when a showPending function called . I don't know how to achieve that through angular js. Pending
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25133287

http://stackoverflow.com/q/25074503
possible better answer: http://stackoverflow.com/a/25074583
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25074598
accepted answer: http://stackoverflow.com/a/25074553
has answer: http://stackoverflow.com/a/25075324
has answer: http://stackoverflow.com/a/25074957
type: Question
tagged with: javascript
has title: How to console the JSON.Stringify result
tagged with: jquery
has comment: http://stackoverflow.com/comment/39010469
has answer: http://stackoverflow.com/a/25074699
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25075159
answer count: 7
has answer: http://stackoverflow.com/a/25074583
has body: &lt;script&gt; $.getJSON('url/rest/1', function (data) { var mydata = JSON.stringify(data); }); &lt;/script&gt; This is my code. For console.log(mydata) my output is : { "data":[ { "orderid":"9", "ordercode":"TTG-13-06-3" }, { "orderid":"12", "ordercode":"TTG-13-06-4" }, { "orderid":"15", "ordercode":"TTG-13-06-5" }, { "orderid":"20", "ordercode":"TTG-13-06-6" }, { "orderid":"24", "ordercode":"TTG-13-06-7" }, { "orderid":"26", "ordercode":"TTG-13-06-8" }, { "orderid":"31", "ordercode":"TTG-13-06-9" }, { "orderid":"36", "ordercode":"TTG-13-06-10" }, { "orderid":"41", "ordercode":"TTG-13-06-11" }, { "orderid":"44", "ordercode":"TTG-13-06-12" } ], "status":"success" } I need to get ordercode alone in console. How can I achive it?
has answer: http://stackoverflow.com/a/25074553

http://stackoverflow.com/comment/39146541
has text: If I am understanding correctly you are wanting to retrieve data from sql every 15 minutes in return with the Date Time Now. Is This Correct ?
score: 0
comment on: http://stackoverflow.com/a/25146940
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39078164
has text: Well on every page load you will be overriding it....
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25110563

http://stackoverflow.com/comment/39164786
type: Comment
comment on: http://stackoverflow.com/q/25157312
type: QuestionComment
has text: You cannot. unless you find out which selector the javascript file uses and use another class or id for your form.
score: 0

http://stackoverflow.com/a/25090731
answers question: http://stackoverflow.com/q/25090686
has body: If you try on the console: []==null &gt; false you'll see that returns false. This means that if you check if the array equals null you will always get a false, and always run the code in the if statement. You should do this instead: if(tempJS.length) var kolor=tempJS[c-1].COLOR; You don't need if(tempJS.length &gt; 0) because every number is treated like true except 0 that means false.
type: Answer
has comment: http://stackoverflow.com/comment/39041451
downvote count: 0
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25090686
type: AcceptedAnswer

http://stackoverflow.com/a/25124660
accepted answer of: http://stackoverflow.com/q/25123931
answers question: http://stackoverflow.com/q/25123931
type: Answer
has body: jQuery Mobile's Popup widget has many ways to manipulate it. It can be called by a button or opened programmatically. The structure is simple, however, note that only page div should be the direct parent of a popup. To open it statically by a button or an anchor: Popup To open it programmatically: $("#foo").popup("open"); Also, you can use special events for any purpose you want, e.g. popupafteropen and popupafterclose. The below is an example of a dynamically created popup. // close button var closeBtn = $('Close'); // text you get from Ajax var content = " Lorem ipsum dolor sit amet, consectetur adipiscing. Morbi convallis sem et dui sollicitudin tincidunt. "; // Popup body - set width is optional - append button and Ajax msg var popup = $(" ", { "data-role": "popup" }).css({ width: $(window).width() / 1.5 + "px", padding: 5 + "px" }).append(closeBtn).append(content); // Append it to active page $.mobile.pageContainer.pagecontainer("getActivePage").append(popup); // Create it and add listener to delete it once it's closed // open it $("[data-role=popup]").on("popupafterclose", function () { $(this).remove(); }).on("popupafteropen", function () { $(this).popup("reposition", { "positionTo": "window" /* custom position x: 150, y: 200 */ }); }).popup({ dismissible: false, history: false, theme: "b", /* or a */ overlayTheme: "b", /* or a */ transition: "pop" }).popup("open"); Demo
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/39416127
score: 0
has text: Angular has a mechanism for detecting changes to models in memory. It cycles through all your scope variables, if any have changed, it calls its corresponding $watch listener. When a user action happens, it triggers this cycle (ie. ng-click event). If you do anything in angular, angular will usually trigger the cycle - not because anything changed necessarily, but just-in-case anything changed. It does this a *lot*. You might think this is inefficient, and you are right it is.
type: Comment
comment on: http://stackoverflow.com/a/25177827
type: AnswerComment

http://stackoverflow.com/comment/39229146
type: Comment
type: QuestionComment
has text: @jasonhansel that would make complete sense, except most of the js file has to be run before that.
comment on: http://stackoverflow.com/q/25191716
score: 0

http://stackoverflow.com/comment/82197945
type: Comment
comment on: http://stackoverflow.com/a/25223932
has text: Be aware that in the above example you create `" __oldData__"` property for the selection different from one you delete this property, since some items can be moved to the `exit` selection.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25106452
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25113108
type: UnansweredQuestion
has body: I tried to add this JS code on Magento 1.9 , but nothing happens when i click on add to cart button. I added code in XML file ( i see that is ok when i see source code in page via browser ) : and added this JS in folder JS/Carrello/cart.js : $('.btn-cart').on('click', function () { var cart = $('.skip-cart'); var imgtodrag = $(this).parent('.item').find("img").eq(0); if (imgtodrag) { var imgclone = imgtodrag.clone() .offset({ top: imgtodrag.offset().top, left: imgtodrag.offset().left }) .css({ 'opacity': '0.5', 'position': 'absolute', 'height': '150px', 'width': '150px', 'z-index': '100' }) .appendTo($('body')) .animate({ 'top': cart.offset().top + 10, 'left': cart.offset().left + 10, 'width': 75, 'height': 75 }, 1000, 'easeInOutExpo'); setTimeout(function () { cart.effect("shake", { times: 2 }, 200); }, 1500); imgclone.animate({ 'width': 0, 'height': 0 }, function () { $(this).detach() }); } }); I followed this guide : http://codepen.io/ElmahdiMahmoud/pen/tEeDn
has title: add js code on add to cart magento 1.9
type: Question
tagged with: magento
tagged with: javascript

http://stackoverflow.com/comment/39036938
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25087899
has text: _“In my fiddle you can drag the image around”_ – is that integral to the sought for solution?
score: 0

http://stackoverflow.com/comment/39053805
comment on: http://stackoverflow.com/q/25097529
score: 0
type: Comment
type: QuestionComment
has text: @Benjamin: Apparently there is also http://www.x-tags.org/, as I just found out about.

http://stackoverflow.com/comment/39027182
has text: I'm not sure what it was, but moving the gruntfile and package.json worked. I must have a syntax error somewhere because keeping them in the 'tools' folder has worked in the past. Thanks everyone for the assistance!
comment on: http://stackoverflow.com/a/25082028
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25110395
has comment: http://stackoverflow.com/comment/39077997
has answer: http://stackoverflow.com/a/25110435
has comment: http://stackoverflow.com/comment/39078118
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39077979
upvote count: 1
tagged with: php
has title: What is the most optimal way to work with database + javascript in terms of performance?
tagged with: mysql
answer count: 1
has body: Context : I would prefer to work with Javascript with a database (pref mySQL) to create a new website. I did a quick search, and one option would be to have PHP + JS + HTML. However, isn't PHP kind of "old"/"slow" now ? One other option would be to use Node.js (not really comfortable with it). Any comments ? Is PHP + JS + HTML still viable? Thanks!
downvote count: 5
tagged with: javascript
type: UnansweredQuestion
score: -4

http://stackoverflow.com/q/25194378
has comment: http://stackoverflow.com/comment/39234192
type: Question
answer count: 2
tagged with: javascript
has body: Name Qty Price adidas Kanadia TR 6 - Grey/Black $129.00 PGF GENTS MARKSMAN GOLF PACK $1,198.00 Puma Hooded Sweat - Pink - Women's $80.00 Total: $1,407.00 Get Total I have above dynamically generated HTML table. My requirement is to get each 'qty' value in the textbox and multiply with 'price' then finally show the total at the bottom. Can someone please help me with the javascript for this.
score: 0
has comment: http://stackoverflow.com/comment/39233980
has comment: http://stackoverflow.com/comment/39234316
accepted answer: http://stackoverflow.com/a/25194565
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25196016
has answer: http://stackoverflow.com/a/25196016
has answer: http://stackoverflow.com/a/25194565
has title: Get td textbox value in javascript

servlets
tags question: http://stackoverflow.com/q/25184925
tags question: http://stackoverflow.com/q/25179806
tags question: http://stackoverflow.com/q/25122660
tags question: http://stackoverflow.com/q/25072453
tags question: http://stackoverflow.com/q/25114911
tags question: http://stackoverflow.com/q/25075503
tag name: servlets
type: Tag
tags question: http://stackoverflow.com/q/25091928
tags question: http://stackoverflow.com/q/25140217
tags question: http://stackoverflow.com/q/25204160

http://stackoverflow.com/q/25183077
has answer: http://stackoverflow.com/a/25183107
type: AnsweredQuestion
has title: Array.lenght returns undefined
downvote count: 1
has body: I wish to get the length of an array so I can use it further in another function but it returns undefined. This piece of code gets a file, opens it and splits it for each new line. I'm trying to get the length of the array but returns undefined. function readBatFile(bfile){ var rawFile1 = new XMLHttpRequest(); rawFile1.open("GET", bfile, false); rawFile1.onreadystatechange = function () { if(rawFile1.readyState === 4) { if(rawFile1.status === 200 || rawFile.status === 0) { var allCode = rawFile1.responseText; var ary = new Array; ary = allCode.split(/.*\n/gm); var rcount = ary.lenght; document.getElementById('test').innerHTML = rcount; } } }; rawFile1.send(null); }
type: Question
has comment: http://stackoverflow.com/comment/39212061
score: -1
accepted answer: http://stackoverflow.com/a/25183107
upvote count: 0
tagged with: arrays
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39212083
favorite count: 0

http://stackoverflow.com/q/25146942
has body: Is this possible to access ViewState variable at Client Side javascript or jquery functions in asp.net web application? If yes then how?
accepted answer: http://stackoverflow.com/a/25147020
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25147020
type: Question
has title: How to access ViewState variable in Client side Javascript or JQuery
score: 12
upvote count: 12
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: viewstate
tagged with: asp.net
favorite count: 0

http://stackoverflow.com/comment/39267737
type: Comment
has text: I tried this but it will load the first image but the second doesn't load up
comment on: http://stackoverflow.com/a/25211957
score: 0
type: AnswerComment

http://stackoverflow.com/q/25094850
tagged with: draggable
type: AnsweredQuestion
has body: JS FIDDLE DEMO Here am adding dynamically child Div to parentDiv, drag drop functionality work fine, the only problem is the draggable item is not visible outside the parentDiv, if it have scrollbar, am i missing something ? HTML: DROP HERE JS: for (var i = 0; i < 100; i++) { var el = " iData " + i + " "; $("#ParentDiv").append(el); } $(".draggable").draggable({ containment: "window", cursor: "crosshair", revert: "invalid", scroll: false, stop: function (event, ui) { if ($(this).hasClass("tsh")) { $(this).attr("style", ""); } }, drag: function (event, ui) { var offset = $(this).offset(); var xPos = offset.left; var yPos = offset.top; // $(this).text('x: ' + xPos + 'y: ' + yPos); var shw_xy = 'x: ' + xPos + 'y: ' + yPos; console.log(shw_xy); } }); $(".drop").droppable({ accept: ".draggable", activeClass: "myhighlight", drop: function (event, ui) { $(this).removeClass("border").removeClass("over"); //$(this).addClass("over"); var dropped = ui.draggable; var droppedOn = $(this); $(dropped).detach().css({ top: 0, left: 0 }).appendTo(droppedOn); }, over: function (event, elem) { $(this).addClass("over"); $(this).removeClass("img_added"); var $this = $(this); console.log("over"); }, activate: function (event, elem) { } });
type: Question
has title: draggable item not visible while dragging container having scroll
answer count: 2
has answer: http://stackoverflow.com/a/40041660
tagged with: jquery-ui
linked to: http://stackoverflow.com/q/811037
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/40041660
score: 0
has answer: http://stackoverflow.com/a/25094997
accepted answer: http://stackoverflow.com/a/25094997

http://stackoverflow.com/a/25132559
accepted answer of: http://stackoverflow.com/q/25123070
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25123070
has comment: http://stackoverflow.com/comment/39122906
has comment: http://stackoverflow.com/comment/39123868
type: Answer
has body: Try to use this Alert class. public String getAlert() { Alert alert = driver.switchTo().alert(); String alertText = alert.getText(); alert.accept(); return alertText; } Will return the text message of Alert from java script Alert function. If a alert is with some kind of js framework which looks like error but its popup then use xpath to get the text of that locator.
score: 0

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

http://stackoverflow.com/comment/39299432
type: Comment
type: QuestionComment
score: 1
has text: Would `window.history.back()` be sufficient?
comment on: http://stackoverflow.com/q/25229422

http://stackoverflow.com/q/25187967
has body: I'm new to THREE.js and i'm looking into ways of adding a glow effect to a mesh to show that it is selected. I've found a third part library on GitHub; https://github.com/jeromeetienne/threex.geometricglow and a working example here; http://jeromeetienne.github.io/threex.geometricglow/examples/geometricglowmesh.html It seems it should be easy to get this working with the following lines; var mesh = new THREE.Mesh(geometry, materials[Math.floor(Math.random() * materials.length)]); var glowMesh = new THREEx.GeometricGlowMesh(mesh); mesh.add(glowMesh.object3d); But when trying to use it with custom geometry (unlike in the demo) I get the error; Uncaught type error: Cannot read property 'x' of undefined This comes from the dependent script threex.dialategeometry.js Does anyone know if what i'm trying to do is possible, or if there is a better way to achieve the glow effect i'm looking for? Full code example (without the library code) Glow example
score: 0
tagged with: three.js
has comment: http://stackoverflow.com/comment/39249732
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25216944
has answer: http://stackoverflow.com/a/38224585
has title: Can threex.geometricglow work with custom geometry?
answer count: 2
has comment: http://stackoverflow.com/comment/39237827
tagged with: javascript

http://stackoverflow.com/comment/39109994
has text: Please provide the HTML, too. In fact, having a http://jsfiddle.net would be nice.
score: 0
comment on: http://stackoverflow.com/q/25127496
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39050814
has text: I've changed the id names for both fields they're not the ones I'm actually using.
score: 0
comment on: http://stackoverflow.com/q/25095974
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39111548
has text: Take a look at the http://www.jqplot.com/docs/files/plugins/jqplot-categoryAxisRenderer-js.html
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25126621

http://stackoverflow.com/q/25132997
has comment: http://stackoverflow.com/comment/39119720
has comment: http://stackoverflow.com/comment/39119782
has answer: http://stackoverflow.com/a/25133259
has comment: http://stackoverflow.com/comment/39119716
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
answer count: 1
accepted answer: http://stackoverflow.com/a/25133259
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39119803
tagged with: http://stackoverflow.com/tag/html
has title: Setting the attribute values to and from the (jQuery)
score: -2
has body: I have 28 elements. Within each two, call them "top" and "bottom". I need to set the "top" and "bottom" elements of the attribute with a value from 0 to 6, and so that all elements were 28 different combinations of "top" and "bottom" elements. Like domino pieces (from 0-0 to 6-6). How to do it jQuery? $(function () { var domino = $('&lt;div/&gt;', { class: 'draggable ui-widget-content ui-draggable ui-draggable-handle' }); var dominoTop = $('&lt;div/&gt;', { class: 'top' }); var dominoBottom = $('&lt;div/&gt;', { class: 'bottom' }); $('.wrapper').append(domino); $('.draggable').append(dominoTop, dominoBottom); var i = 0; while (i &lt; 27) { $(domino).clone().prependTo(".wrapper"); $('.top').attr('number', i); i++; }; $(".draggable").draggable({ containment: "parent", stop: function () { // } }); });
downvote count: 3
has comment: http://stackoverflow.com/comment/39130510
upvote count: 1

http://stackoverflow.com/q/25147447
tagged with: javascript
has title: How to center an image created in Javascript?
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25147547
tagged with: cross-browser
answer count: 4
accepted answer: http://stackoverflow.com/a/25147626
tagged with: css
possible better answer: http://stackoverflow.com/a/25147858
has answer: http://stackoverflow.com/a/25147858
type: AnsweredQuestion
has body: I have this very simple code, the problem is it doesn't give the same output using Firefox and IE: in Firefox, the images are superposed but right-aligned, and in IE they are superposed and left aligned. What I want is that the images will be centered and superposed. I have to create images using Javascript to use a special library in creating the images. Thank you for your help. HTML &lt;body&gt; &lt;div id="Container"&gt; &lt;script type="text/javascript"&gt; document.write('&lt;img id="image1" src="image1.jpg"&gt;') document.write('&lt;img id="image1" src="image2.jpg"&gt;') &lt;/script&gt; &lt;/div&gt; &lt;/body&gt; CSS body { text-align: center; background-color: #e8e6e7; margin-left: auto; margin-right: auto; } #Container { position: relative; text-align: center; margin-left: auto; margin-right: auto; } #image1 { position : absolute; margin-left: auto; margin-right: auto; } #image2 { position : absolute; margin-left: auto; margin-right: auto; }
has answer: http://stackoverflow.com/a/25147560
has comment: http://stackoverflow.com/comment/39148226
tagged with: image
type: Question
has answer: http://stackoverflow.com/a/25147626

http://stackoverflow.com/comment/39263972
has text: With this would I need to make sure that the `DataTable` is somehow preserved? I'm assuming that when you "page" this would cause the page to reload. otherwise I'm still in that state of querying the database every time the user "pages".
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25207618
type: AnswerComment

http://stackoverflow.com/q/25086532
has title: Text Area linked with drop down
type: Question
has answer: http://stackoverflow.com/a/25087191
tagged with: angularjs
score: 0
answer count: 1
has body: I have a drop down linked to a text area, so that when a choice is selected from the drop down the textarea automatically populates from the same model. A working version can be seen here: JSFiddle What I'm trying to do is programatically change the drop down and have that change reflected in the text area. I can update the drop down by setting the value and while the dropdown appears correct the change is not cascaded to the text area. ng-change doesn't fire when the dropdown is set manually, and I cannot set the value of the text area since it's a relational product of the dropdown model. Is what I'm trying to do possible? Sample List: -- Select Option -- <textarea class="frequentInstructions inputLine" type="textarea" name="frequentInstructions" ng-model="allVarsDD.text_long"
has comment: http://stackoverflow.com/comment/39033623
tagged with: angularjs-directive
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39033600

http://stackoverflow.com/comment/39026072
has text: try to remove html tasks to understand if is the problem @Mdd
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25082028

http://stackoverflow.com/a/25095796
answers question: http://stackoverflow.com/q/25095789
upvote count: 63
downvote count: 0
has body: Object.keys gets the keys from the object, then you can filter the keys based on the values var obj = {1001: true, 1002: false}; var keys = Object.keys(obj); var filtered = keys.filter(function(key) { return obj[key] }); FIDDLE
score: 63
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/100387871
accepted answer of: http://stackoverflow.com/q/25095789
type: Answer

http://stackoverflow.com/comment/39218742
comment on: http://stackoverflow.com/a/25186153
type: AnswerComment
score: 0
type: Comment
has text: You could still show the output - eg, run the script from cron on your friends machines, and HTTP POST the results as JSON to a web server. But your friends *will* have to install the script themselves (or you could log in to their Linux machine via SSH and do it for them).

http://stackoverflow.com/a/25079682
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25079054
upvote count: 1
type: Answer
has body: I found the solution! $scope.url should be set with any non-empty value. Like there: http://jsfiddle.net/THZHL/2/ app.controller("formCtrl", function($scope){ $scope.url = "/def"; $scope.set = function(){ $scope.url = "/abc"; } });
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25079054

http://stackoverflow.com/q/25192416
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/52206443
favorite count: 0
tagged with: drag-and-drop
has answer: http://stackoverflow.com/a/32519286
has body: I'm having an issue when trying to use packery and draggabilly to create a sortable grid of items. I've also tried jquery ui dragabble and the issue remains. When I drag and drop the item it is possible to break the vertical alignment so the item "snaps" part way down the row. This also breaks the ordering of the items. http://jsfiddle.net/foobass/sasrx654/ If you drag an item horizontally, it snaps into place and aligns fine. If you drag vertically you can drop out of alignment, it doesn't snap into place correctly. Also the last items position is changed. Can anyone suggest what I might be doing wrong? var container = document.querySelector('#container'); var packery = new Packery(container, { rowHeight: '.module-sizer', itemSelector: '.module', columnWidth: '.module-sizer', isInitLayout: true, isResizeBound: true }); It seems for some reason the "top" css value of the dropped item and the item below are being set with incorrect values dynamically.
upvote count: 6
type: UnansweredQuestion
score: 6
tagged with: draggable
type: Question
tagged with: packery
has title: Packery when drag then drop an item vertically in a sortable grid, vertical alignment breaks

http://stackoverflow.com/q/25150590
answer count: 7
has answer: http://stackoverflow.com/a/52777875
tagged with: meteor
has answer: http://stackoverflow.com/a/30140085
favorite count: 0
has answer: http://stackoverflow.com/a/45657078
has body: I try to prepare my database field for geocoding with this: MyCollection._ensureIndex({'data.address.located':'2dsphere'}); But then this error comes: MongoError: Can't extract geo keys from object, malformed geometry?: { type: "Point", coordinates: [ 32.4586858, -110.8571443 ] } I can not see whats wrong with this field ? Any idea ? When I take a look to this it shows up this: The following example stores a GeoJSON Point: { loc: { type: "Point", coordinates: [ 40, 5 ] } }
possible better answer: http://stackoverflow.com/a/30140085
upvote count: 29
type: AnsweredQuestion
has title: "MongoError: Can't extract geo keys from object" with Type : Point
has answer: http://stackoverflow.com/a/25150815
has answer: http://stackoverflow.com/a/51548949
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/46507591
downvote count: 0
has answer: http://stackoverflow.com/a/73774752
tagged with: javascript
score: 29
accepted answer: http://stackoverflow.com/a/25150815

http://stackoverflow.com/a/25143880
has comment: http://stackoverflow.com/comment/39142404
type: Answer
has body: Selecting the first row of a grid is: grid.select($("tr:first", grid.tbody)); But I do not understand when you want to press "enter"... but might be a little tricky since keyboard key presses are bound to default handlers.
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25142086
upvote count: 1
has comment: http://stackoverflow.com/comment/39141436

http://stackoverflow.com/comment/39256065
has text: Also take note in this answer the external resource was added to the fiddle (.validate jquery plugin). Nice fix.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25206019
type: Comment

http://stackoverflow.com/comment/39025150
comment on: http://stackoverflow.com/q/25071275
score: 0
type: QuestionComment
type: Comment
has text: It uses grunt for launching the app ( you just do a "$ grunt" on the app folder). But I found commands to minify with grunt, not to "not minify" with grunt :(

http://stackoverflow.com/a/25138548
upvote count: 1
answers question: http://stackoverflow.com/q/25138425
score: 1
has body: You can use jquery for this as :- $(document).ready(function(){ $(".friend").click(function(){ $(this).closest("tr").hide(); }); }); In your update all actionlinks will have same id this is wrong do it as : @Html.ActionLink("Add Friend", "AddNewFriend", null, new { @class="friend" })
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25138425
type: Answer
has comment: http://stackoverflow.com/comment/39130364

http://stackoverflow.com/comment/39059244
comment on: http://stackoverflow.com/q/25100181
has text: The Python developers agree that key functions beat comparators, which is why `cmp` is gone in Python 3. Underscore's `sortBy` looks significantly less powerful, though, since Javascript doesn't have nice things like lexicographically-compared tuples.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25191141
linked to: http://stackoverflow.com/q/2076299
answer count: 1
tagged with: events
linked to: http://stackoverflow.com/q/1631959
tagged with: event-handling
tagged with: jquery
has comment: http://stackoverflow.com/comment/39227942
has comment: http://stackoverflow.com/comment/39227966
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39227979
has title: Window exit event
has body: I noticed when trawling the web for an answer that what sounded (to a relative newbie) like the easiest way of acting on a window being exited (window.unload()) was deprecated in a previous version of jQuery. is anyone aware of a (simple) way to do this using either JavaScript or jQuery events with the current version of jQuery? Edit: by this, I mean doing something when the user exits (or tries to exit) the webpage. Sorry for any ambiguity
type: Question
has comment: http://stackoverflow.com/comment/39227845
tagged with: javascript
has answer: http://stackoverflow.com/a/25191231
score: 0
tagged with: jquery-events

http://stackoverflow.com/comment/39230931
type: QuestionComment
comment on: http://stackoverflow.com/q/25192697
score: 0
has text: @Dagon That works for the Name, phone and email but not for the message or checkbox.
type: Comment

http://stackoverflow.com/comment/39027671
score: 0
comment on: http://stackoverflow.com/a/25079840
type: Comment
has text: result is the suggestion lines,, sorry for not explaining it clearly .. btw i do not have a drop down list ,,, i have an input field ..
type: AnswerComment

http://stackoverflow.com/q/25228559
tagged with: ruby-on-rails
has body: Environment: Ruby 2.0.0, Rails 4.0.3, Windows 8.1 Update, jquery-datatables-rails 2.2.1, jquery-ui-rails 5.0.0, jquery-rails 3.1.1 I have DataTables up and running, but I need to make my tables responsive. I'm confused by the instructions to do so. I have written some JavaScript but not Coffee. Either way, I'm not sure what to do. The jquery-datatables-rails instructions say: 5 - Initialize your datatables using: responsiveHelper = undefined breakpointDefinition = tablet: 1024 phone: 480 tableElement = $("#example") tableElement.dataTable autoWidth: false preDrawCallback: -&gt; # Initialize the responsive datatables helper once. responsiveHelper = new ResponsiveDatatablesHelper(tableElement, breakpointDefinition) unless responsiveHelper return rowCallback: (nRow) -&gt; responsiveHelper.createExpandIcon nRow return drawCallback: (oSettings) -&gt; responsiveHelper.respond() return I currently initialize my tables doing this: $(document).ready(function () { // Enable any datatables $('#datatable').dataTable({ "sPaginationType": "full_numbers", bJQueryUI: true }); $('#carstable').dataTable({ "sPaginationType": "full_numbers", bJQueryUI: true, bProcessing: true, bServerSide: true, sAjaxSource: $('#carstable').data('source') }); I used compileonline.com to generate the JavaScript: (function() { var breakpointDefinition, responsiveHelper, tableElement; responsiveHelper = void 0; breakpointDefinition = { tablet: 1024, phone: 480 }; tableElement = $("#example"); tableElement.dataTable({ autoWidth: false, preDrawCallback: function() { if (!responsiveHelper) { responsiveHelper = new ResponsiveDatatablesHelper(tableElement, breakpointDefinition); } }, rowCallback: function(nRow) { responsiveHelper.createExpandIcon(nRow); }, drawCallback: function(oSettings) { responsiveHelper.respond(); } }); }).call(this); But I cannot see what I need to do to integrate that into my current JavaScript initializer.
has comment: http://stackoverflow.com/comment/39298335
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25229305
has comment: http://stackoverflow.com/comment/39297805
type: Question
has title: Making DataTables responsive
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25229305
score: 0
has comment: http://stackoverflow.com/comment/39298176
has comment: http://stackoverflow.com/comment/39297831
tagged with: datatables

http://stackoverflow.com/comment/39046742
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25093528
has text: ok. it's more clear now. there is `app.run` entry point where you could utilize for your needs http://nadeemkhedr.wordpress.com/2013/11/25/how-to-do-authorization-and-role-based-permissions-in-angularjs/
score: 0

http://stackoverflow.com/a/25195132
has comment: http://stackoverflow.com/comment/39237517
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/39239466
has comment: http://stackoverflow.com/comment/39239274
answers question: http://stackoverflow.com/q/25179486
type: Answer
has comment: http://stackoverflow.com/comment/39238383
has comment: http://stackoverflow.com/comment/39239441
has body: Can you give more information like the HTTP response? And what your version of OData? Is that V3 or V4? If it's V3, the request should look like POST serviceRoot/entityset HTTP/1.1 DataServiceVersion: 3.0; MaxDataServiceVersion: 3.0; Content-Type: application/json;odata=minimalmetadata Accept: application/json;odata=minimalmetadata Accept-Charset: UTF-8 { content of the entity } If it's V4, the request should look like POST serviceRoot/EntitySet OData-Version: 4.0 Content-Type: application/json;odata=minimalmetadata Accept: application/json { "@odata.type" : "namespace.type", content of the entity } Seems that your code miss the odata version header.
downvote count: 1

http://stackoverflow.com/comment/39209727
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25181782
has text: `this.cells[0].innerHTML`?
score: 0

http://stackoverflow.com/comment/39153511
has text: @epascarello The function to click on the file1 does not operate. The #changeProfilepicture div disappears when I click on the #openOpen
comment on: http://stackoverflow.com/q/25150977
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39262586
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25207732
has text: @MikePrecup - it is indeed an array of arrays; however, nowhere (that I can find) is there an array that contains the items desired, namely ["Bob","Tom"].
score: 0

http://stackoverflow.com/a/25199469
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25199421
has body: On your test page, have you checked the console? Uncaught ReferenceError: value is not defined The posted code will work fine if you assign a value to the value variable.
downvote count: 0
score: 1

http://stackoverflow.com/q/25122462
score: 0
has answer: http://stackoverflow.com/a/25122541
accepted answer: http://stackoverflow.com/a/25122541
tagged with: node.js
type: AnsweredQuestion
has title: how to iterate through cursor in javascript
type: Question
tagged with: mongodb
has body: I have three columns in mongoDB. I want to retrieve data from the DB using node.js. I used the below code. var myCursor = Users.find({USER_MOBILE_NUMBER : Auth.USER_MOBILE_NUMBER} , function(err , success){ console.log('Response success '+success); console.log('Response error '+err); }); myCursor.forEach(function(race) { console.log(race); }); But when I run the code it returns null in the log for 'race'. I am new to node.js and I also searched a lot to find a solution, but I failed. Please help me where I went wrong in the code.
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25220456
tagged with: javascript
has answer: http://stackoverflow.com/a/25220473
score: 0
answer count: 2
has body: I have a div and its content changes depending on the value of a select box above of the div(I am making and ajax call to a php page to do this and there is no problem with that). After the pages's content changed there will be an another select box inside of the div(this select box comes after first ajax response). What i want to do is making an another ajax call by using this select box's change event but i couldnt access this select box via jquery. What can be the reason of this ? Here is my implementation: HTML: Select the internship type you want to edit: --select-- IENG 349 Grades IENG 449 Grades IENG 349 Stage 2 Form IENG 449 Stage 2 Form //The selectbox will be here after first ajax response and it will be like that --select-- Production Service JQuery: $("#fieldOfBusinessEditSelectBox").change(function(){ var value = $("select#fieldOfBusinessEditSelectBox option:selected").val(); alert(value); });
has answer: http://stackoverflow.com/a/25220471
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25220471
type: Question
has title: Could not access select box via JQuery
possible better answer: http://stackoverflow.com/a/25220473

http://stackoverflow.com/q/25198169
tagged with: drop-down-menu
has title: JS/CoffeeScript: Element doesn't receive focus on .focus()
has body: I'm trying to set up some proper object tree that resembles a dropdown menu. I managed to set up an object tree that resembles a dropdown menu. But now I'm struggling with manually setting focus to a sub menu. I know that I am on the correct item, but executing focus() on it doesn't seem to have the expected effect. I have prepared a codepen which illustrates the problem: http://codepen.io/jmuheim/pen/fAjcx In the output window, press tab until you're on "Programming languages". Then press enter to open the submenu. Now if you press "down", I'd expect the first item "Ruby" to gain focus. But it doesn't. Take a look at the handleDown function in RootParentItem class to see the corresponding code.
type: AnsweredQuestion
tagged with: coffeescript
type: Question
linked to: http://stackoverflow.com/q/25216020
has answer: http://stackoverflow.com/a/25199872
accepted answer: http://stackoverflow.com/a/25199872
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/39087278
has text: Hmm. Thought for sure it was an angular thing.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25112033
score: 0

http://stackoverflow.com/a/25131871
score: 1
type: Answer
upvote count: 1
has body: here is your answer. $('#cutoff').change(function () { if ($('#cutoff').find(":selected").text() == 'Daily') { $('#perioddiv').hide(); } else { $('#perioddiv').show(); } }); jsfiddle: http://jsfiddle.net/LNMW3/
answers question: http://stackoverflow.com/q/25131640
downvote count: 0

http://stackoverflow.com/comment/39109437
comment on: http://stackoverflow.com/a/25089383
type: AnswerComment
score: 0
type: Comment
has text: @NickG I found one solution. Check it below :)

http://stackoverflow.com/comment/40123812
has text: Take a look at this: https://groups.google.com/forum/#!msg/casperjs/RpDvMXGyjc8/aAoLOvGAe6UJ I was able to follow the working code to get my thing working.
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25107976

http://stackoverflow.com/a/25073439
type: AcceptedAnswer
downvote count: 0
has body: Firstly lets checkout html mark-up of transitioned web page: &lt;div id="pt-main" class="pt-perspective"&gt; &lt;div class="pt-page"&gt; &lt;div class="pt-page"&gt; &lt;div class="pt-page"&gt; &lt;div class="pt-page page-current"&gt; &lt;div class="pt-page"&gt; &lt;div class="pt-page"&gt; &lt;/div&gt; As you can see its very close with typical slider widget, but with full width and hight page size and different animation. Very close effect is in use on USA Today web site. How it works and how to implement it with MArionette: 1) We need two Views types (lets call is CardsCollectionView and CardView): var CardView = Marionette.ItemView.extend({ className: '.pt-page', template: "#card-template" }), CardsCollectionView = Marionette.CollectionView.extend({ childView: CardView }); 2) Next Step we need to catch an event for switching between pages, i would place it into collectionView: CardsCollectionView = Marionette.CollectionView.extend({ childView: CardView, events: { 'click .pt-page' : switchCard }, switchCard: function() { var currCard = this.$el.find('.pt-page.page-current'), nextCard = currCard.next() || this.$el.find('.pt-page').eg(0); currCard.removeClass('page-current'); nextCard.addClass('page-current') } }); 3) Add CSS classes for animation effect you need. Its very simpled example just to show logic steps to follow. Please consider that you may pahe different types of pages, may have Models to provide page data (in this case better keep current page position in model). Also expect an improvement to remove other cards but current and next for animation effect. I strongly recommend to dig into USA Today site code. It also use BB and it will be very useful in your case.
has comment: http://stackoverflow.com/comment/39030853
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25070123
answers question: http://stackoverflow.com/q/25070123

http://stackoverflow.com/comment/39238918
type: QuestionComment
comment on: http://stackoverflow.com/q/25197111
score: 0
has text: ? what does that mean?
type: Comment

http://stackoverflow.com/q/25216460
has comment: http://stackoverflow.com/comment/39275410
tagged with: bxslider
has answer: http://stackoverflow.com/a/25216500
has body: This weird bug is bugging me from half an hour. I am dynamically trying to apply a slider using only JavaScript. Any idea as to why this is occurring to me? I could find other questions on SO, but could not understand the solution. I am new to JS and highly appreciate if someone could explain me things in laymen terms. Here is my code. MARKUP JS sample test page JAVASCRIPT // code for thumbnail slider begins (function() { var ogImg = document.getElementsByClassName("og-fullimg"); alert(ogImg.length); var bxSlider = document.createElement("ul"); //created ul bxSlider.setAttribute("class", "bxslider"); // gave a class name bxslider. for (i = 1; i < 4; i++) { var itemsList = document.createElement("li"); var linkImages = document.createElement("img"); linkImages.src = "images/bid_" + i + ".jpg"; itemsList.appendChild(linkImages); bxSlider.appendChild(itemsList); } ogImg[0].appendChild(bxSlider); document.body.appendChild(ogImg); //append everything to the body. //call the slider. $(document).ready(function() { $('.bxslider').bxSlider({ auto: true, pager: false, adaptiveHeight: true, slideWidth: 550 }); }); }()); // code for thumbnail slider ends. Thanks in advance.
upvote count: 10
has comment: http://stackoverflow.com/comment/39275387
type: Question
score: 10
tagged with: javascript
has title: Failed to execute 'appendChild' on 'Node': The new child element is null
has comment: http://stackoverflow.com/comment/98214156
accepted answer: http://stackoverflow.com/a/25216500
downvote count: 0
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/39073413
score: 0
type: Comment
type: QuestionComment
has text: Yes, of course, it is the reason for reloading.
comment on: http://stackoverflow.com/q/25107820

http://stackoverflow.com/comment/39226559
score: 0
has text: @ThomasJunk, as we are dealing with geometry, I assumed input would be consistent (either some path generators or user actions producing these coordinates). So IMO, a simple check would be sufficient.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25190066

http://stackoverflow.com/q/25126184
downvote count: 0
has title: Google Maps hook into desiredTilt_changed event
score: 1
favorite count: 0
type: Question
upvote count: 1
has body: We have a Google maps on our website and would like to handle when a user selects or deselects the 45 degree option on satellite-type map views. Through some experimentation and console.logs, I have found what looks like to be an internal only method called desiredTilt_changed which seems to change a desiredTilt property only when the checkbox is clicked. This looks like exactly what we need, however I am seeing nothing on the Google Maps API reference or when I search the web. All they mention on the API docs is the tilt property and tilt_changed event-which fires when zooming to a level which allows (if available) a 45 degree view, as well as when the checkbox is clicked. Has anyone either had experience tapping into this desiredTilt_changed event, or some other way of distinguishing in tilt_changed if it was the checkbox being clicked or not? Thanks in advance! :)
tagged with: javascript
type: UnansweredQuestion
tagged with: google-maps-api-3
tagged with: google-maps
answer count: 0

http://stackoverflow.com/q/25168593
tagged with: jquery
favorite count: 0
answer count: 9
tagged with: angularjs
has answer: http://stackoverflow.com/a/25168952
possible better answer: http://stackoverflow.com/a/32061320
has answer: http://stackoverflow.com/a/27627014
upvote count: 27
tagged with: controllers
type: AnsweredQuestion
downvote count: 0
has body: In this simplified scenario, I have two files: index.htm, lazy.htm. index.htm: var myApp = angular.module('myApp', []); myApp.controller('embed',function($scope){ $scope.embed = 'Embedded Controller'; }); {{embed}} lazy.htm myApp.controller('lazy',function($scope){ $scope.lazy = 'Lazy Controller'; }); {{lazy}} The result is an error: "Argument 'lazy' is not a function, got undefined" Using a function instead lazy.htm function lazy($scope) { $scope.lazy = 'Lazy Controller'; } {{lazy}} This works until version 1.3 beta 14. In beta 15 was removed the global controller functions: https://github.com/angular/angular.js/issues/8296 So now, what is the better way to get angularized contents of lazy.htm dynamically? UPDATE: In this article (http://ify.io/lazy-loading-in-angularjs) I found another possible solution. The $controllerProvider allow us to register new controllers after angular bootstrap. Works like a charm. Tested in v1.3.0-beta.18 index.htm: var myApp = angular.module('myApp', []) .controller('embed',function($scope){ $scope.embed = 'Embedded Controller'; }) .config(function($controllerProvider) { myApp.cp = $controllerProvider; }); {{embed}} lazy.htm myApp.cp.register('lazy',function($scope){ $scope.lazy = 'Lazy Controller'; }); {{lazy}} UPDATE 2: Two other alternatives that works are: lazy.htm _app = $('[ng-app]').scope(); _app.lazy = function($scope) { $scope.lazy = 'Lazy Controller'; }; OR var $rootScope = $('[ng-app]').injector().get('$rootScope'); $rootScope.lazy = function($scope) { $scope.lazy = 'Lazy Controller'; }; But I believe these last two examples should not be used in production.
has comment: http://stackoverflow.com/comment/54726488
tagged with: lazy-loading
type: Question
has answer: http://stackoverflow.com/a/26544068
has title: AngularJS: lazy loading controllers and content
has comment: http://stackoverflow.com/comment/89463412
has answer: http://stackoverflow.com/a/32061320
has answer: http://stackoverflow.com/a/29217765
tagged with: javascript
has answer: http://stackoverflow.com/a/27359732
has answer: http://stackoverflow.com/a/45208323
has comment: http://stackoverflow.com/comment/45367016
score: 27
has answer: http://stackoverflow.com/a/25170581
has answer: http://stackoverflow.com/a/28199498
accepted answer: http://stackoverflow.com/a/28199498
has comment: http://stackoverflow.com/comment/39307053

http://stackoverflow.com/q/25188270
tagged with: ip-address
downvote count: 0
type: Question
score: 3
tagged with: javascript
upvote count: 3
has answer: http://stackoverflow.com/a/25188585
has title: Get IP address on Chrome App
answer count: 1
has body: I'm developing a Chrome app, and I need to get the external IP address. I've tried loading external scripts, but I was getting errors even though I added the sources to 'content_security_policy' on the manifest.json file. I gave up, and then I tried making an XMLHttpRequest request to an IP host/service website, but requests need to be async and I wasn't able to save the response to a variable even using setTimeout(). I was always getting undefined because the variable was clearly being set before the request was completed. So can you please help me find a simple solution to get the IP?
favorite count: 0
tagged with: google-chrome-app
type: UnansweredQuestion

http://stackoverflow.com/comment/39039256
has text: I am using apache and python. I am not using any framework like Django. As database I am using Oracle 11g
comment on: http://stackoverflow.com/q/25088917
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25086859
has title: How to run actions in a fake-browser on the server side?
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25087711
downvote count: 0
score: 1
has body: I need to simulate a user session (login, click, click, enter data) followed by an html page download on the server side. What are my options, if any? Python-requests was my first thought, but it can't run javascript--which is why I need to simulate a fake google-chrome/firefox session on the server side.
type: Question
tagged with: automation
tagged with: javascript
tagged with: browser
linked to: http://stackoverflow.com/q/7805486
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/39200165
type: QuestionComment
comment on: http://stackoverflow.com/q/25172544
has text: google.loader.ClientLocation is deprecated, you shouldn't use it anymore( http://stackoverflow.com/questions/14195837/is-google-loader-clientlocation-still-supported )
type: Comment
score: 1

http://stackoverflow.com/q/25149859
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has body: I have an AngularJS directive which is used in "Element" mode i.e. it is used as a custom tag in HTML. angular .module('myModule') .directive('myDirective', function() { return { restrict: 'E', scope: { attr1: '=', attr2: '=' }, ... }; }); When I use this directive, AngularJS creates a root element &lt;my-directive&gt; to contain all the elements inside the directive template. This element is visible in the browser debugger (Firebug or Chrome debugger). How do I apply a style to this root element? If I put a style or class attribute directly on the &lt;my-directive&gt; tag, it is ignored by the browser. &lt;my-directive attr1="val1" attr2="val2" style="...styles for root element (ignored)..." class="...alternate method (also ignored)..."&gt; &lt;/my-directive&gt; Currently, I am using the directive link function to add in those styles, as shown here: How to manipulate styles of directive in AngularJS?. However, these styles may not be related to the logic of the directive. They may even change based on how/where the directive is used. Some examples (off the top of my head): Styles for external positioning, for example, float: left Styles for element background - think alternating row colors in a grid etc. So they do not belong inside the directive. How do I declare these styles from outside the directive? The styles need to be "per instance", not a single common style for all my-directives. I'm using AngularJS 1.2.
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25213811
has answer: http://stackoverflow.com/a/25150277
has title: Style the root element of an AngularJS directive
linked to: http://stackoverflow.com/q/19246110
type: Question
tagged with: angularjs-directive
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25213811
possible better answer: http://stackoverflow.com/a/25150031
score: 0
has answer: http://stackoverflow.com/a/25150031

http://stackoverflow.com/comment/39224782
comment on: http://stackoverflow.com/q/25189159
score: 0
has text: I was not able to repro this, ran you script and all loads fine
type: Comment
type: QuestionComment

http://stackoverflow.com/a/51581081
score: 10
answers question: http://stackoverflow.com/q/25089297
has body: $('body').on("click", ".dropdown-menu", function (e) { $(this).parent().is(".show") &amp;&amp; e.stopPropagation(); });
upvote count: 10
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/90152308

http://stackoverflow.com/q/25166495
has body: I have two working Cloud Code functions: the first queries Parse.User and returns the objectId of record matching the username, the second queries Parse.Installation and looks returns the the objectId and deviceType of the record matching the pointer column to "user"(holds the users objectId). In the interest of not having to continually make new HTTP calls in a VBA application I am trying put combined these two functions into one. I have written Parse.Cloud.define ("lookupUser", function(request, response){ var email = request.params.email; if(!email) { response.error("Missing parameter: email"); return ; } Parse.Cloud.useMasterKey(); var objectId; var installations = []; var InstallationQuery = new Parse.Query(Parse.Installation); var UserQuery = new Parse.Query(Parse.User); UserQuery.equalTo("username", email); UserQuery.first({ success: function(user){ objectId = user.id; InstallationQuery.equalTo("user", objectId); InstallationQuery.find({ success: function(results){ for(var i = 0; i &lt; results.length; i++){ var object = result[i]; installations.push({ objectId: object.id, deviceType: object.get("deviceType") }); } } }), response.success(objectId + installations); } }); }); This successfully passes the objectId, unfortunately installations does not show up in the result and looks like this { "result":"b194RP5n89" } When I remove objectId from the response.succes like this response.success(installations); my result looks like this { "result":[ ] } I'm sure this is an issue with Async, but I'm operating outside of my depth. Any help is deeply appreciated.
type: Question
answer count: 1
tagged with: javascript
has title: Cloud Code Function with multiple queries
score: 0
tagged with: parse-platform
has answer: http://stackoverflow.com/a/25168726
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25168726

http://stackoverflow.com/a/25089361
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39075594
has comment: http://stackoverflow.com/comment/39108399
type: Answer
has comment: http://stackoverflow.com/comment/39131568
accepted answer of: http://stackoverflow.com/q/25088865
has comment: http://stackoverflow.com/comment/39141541
answers question: http://stackoverflow.com/q/25088865
has comment: http://stackoverflow.com/comment/39048657
has comment: http://stackoverflow.com/comment/39056551
score: 0
has body: I have not used this for a while but I am pretty sure it still works. Place this in the Head of your HTML e.g. desktop website - index.html &lt;!-- Detect and redirect for mobile --&gt; &lt;script type="text/javascript"&gt; if(navigator.userAgent.match(/iP(od|hone)/i) || navigator.userAgent.match(/Android/i)){ if(document.cookie.indexOf("iphone_redirect=false")==-1) { window.location.href="http://myWebsite.com/index_mobile.html"; } } &lt;/script&gt; Be sure to add your correct redirect here in this line from above: window.location.href="http://myWebsite.com/index_mobile.html"; As a second solution to support your original intentions, I managed to get a variation of your JS code working live here DEMO. My DEMO will take you to GitHub if you view it from a screen with a width &lt; or = to 600px. To test it properly you must view it from monitor sizes above and below 600px widths. Below is my variation of your JS code: &lt;body&gt; &lt;script&gt; var url = window.location.href; var filename = url.substring(url.lastIndexOf('/')+1); var a = 'index.shtml'; if((screen.width &lt;= 600) &amp;&amp; (filename == a)) { window.location.href = 'https://github.com/'; } &lt;/script&gt; * NOTE the difference that my code will redirect you to GitHub as opposed to 'mobile.shtml'

http://stackoverflow.com/q/25101413
has comment: http://stackoverflow.com/comment/39061100
answer count: 5
has answer: http://stackoverflow.com/a/25101535
accepted answer: http://stackoverflow.com/a/25101535
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/25101555
has answer: http://stackoverflow.com/a/25101504
score: 0
has answer: http://stackoverflow.com/a/25101555
linked to: http://stackoverflow.com/q/1414365
has answer: http://stackoverflow.com/a/25101440
has answer: http://stackoverflow.com/a/25101593
has comment: http://stackoverflow.com/comment/39061069
tagged with: javascript
tagged with: jquery
has body: I want to disabled and enable a submit-input type depending on the completeness user's input with jquery. I am able to shut it down but cant not turn it on :( $('#submit_btn').attr('disabled', 'disabled'); var nameFlag = false;; var emailFlag = false; var pwdFlag = false; $('#f-name').focusout(function() { if($(this).val() == '') { nameFlag = false; } else if($(this).val().length &lt; 4) { nameFlag = false; } else { nameFlag = true; //alert(nameFlag); } }); $('#f-email').focusout(function() { if($(this).val() == '') { emailFlag = false; } else if($(this).val().length &lt; 4) { emailFlag = false; } else { emailFlag = true; //alert(emailFlag); } }); $('#f-pwd').focusout(function() { if($(this).val() == '') { pwdFlag = false; } else if($(this).val().length &lt; 6) { pwdFlag = false; } else { pwdFlag = true; //alert(pwdFlag); } }); //alert(nameFlag + " " + emailFlag + " " + pwdFlag); if(nameFlag &amp;&amp; emailFlag &amp;&amp; pwdFlag) { $('#submit_btn').removeAttr('disabled'); } else { $('#submit_btn').attr('disabled', 'disabled'); } So I put some alert boxes and see that my flags change depending on the user input but it doesn't enable my submit button
has title: disabled/enabled button - jquery

http://stackoverflow.com/q/25204780
has title: JavaScript error: SCRIPT5007: Unable to get property 'getElementsByTagName'
has answer: http://stackoverflow.com/a/49118562
has comment: http://stackoverflow.com/comment/39255378
type: Question
tagged with: javascript
tagged with: sharepoint
has comment: http://stackoverflow.com/comment/39327307
score: 0
has comment: http://stackoverflow.com/comment/39253487
upvote count: 1
answer count: 1
downvote count: 1
tagged with: jquery
has body: I am using the following jQuery to get the field value from a Display Form in SharePoint 2013 so I can pass the value along in a URL. var itemID = $('h3:contains("My ID")').closest('td').next('td').text(); It is working perfectly, but I am getting an error when I inspect the action: SCRIPT5007: Unable to get property 'getElementsByTagName' of undefined or null reference File: sp.ui.dialog.js, Line: 2, Column: 22380 This contradicts what is actually occurring, since the code executes. I am running IE11 in IE10 compatibility mode.
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39254017

http://stackoverflow.com/comment/39172862
has text: @Archer - yes, but it's confusing, he's removing everything in the *current* TD, but then call `next` which should go to the next TD, which still has the second input etc. Need to do some testing.
type: Comment
comment on: http://stackoverflow.com/a/25161642
type: AnswerComment
score: 0

http://stackoverflow.com/q/25105643
has title: jQuery magnific-popup : create a button inside the popup to close the popup
tagged with: popup
upvote count: 3
answer count: 2
type: UnansweredQuestion
has body: Hope you can help me. I read and read again the documentation of Magnific Popup, but I'm not good enough with javascript. 1- I open a popup with this link : OPEN POPUP and this javascript : $('.pop').magnificPopup({ type:'iframe', showCloseBtn : true, closeOnBgClick : true, midClick: true }); 2- in my popup, I would like a button 'CLOSE' to close the pop-up. I try this but it doesn't worked : CLOSE CLOSE I read I need to place this code : var magnificPopup = $.magnificPopup.instance; But where ? in which page ? with what syntaxe ? Magnific Popup documentation : LINK Thanks for helping. Have a good day ;-)
score: 3
has answer: http://stackoverflow.com/a/25107166
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/26520770

http://stackoverflow.com/q/25160322
tagged with: javascript
has comment: http://stackoverflow.com/comment/39170636
score: 0
has comment: http://stackoverflow.com/comment/39169980
possible better answer: http://stackoverflow.com/a/25160392
has answer: http://stackoverflow.com/a/25160442
type: AnsweredQuestion
has body: I have a variable called progress as in below When clicked an image as in below, I want the progress to set to 0; I am trying below var progress = 10; var progress2 = $(".close2 img").click(function() { // if user clicks the reset button (Start Over) then var progress = 0; //console.log(progress); return progress; }); But it fails.. The progress is set to zero within scope. But outside I am having trouble passing it...can someone help me out to figure out the mistake I am making?
has title: How to pass variable from inside click function to set variable outside to zero
has answer: http://stackoverflow.com/a/25160381
accepted answer: http://stackoverflow.com/a/25160381
type: Question
has answer: http://stackoverflow.com/a/25160392
answer count: 3

http://stackoverflow.com/q/25181849
tagged with: requirejs
has title: PJAX/DJAX- rerun scripts after pjax load
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/28284830
type: Question
type: AnsweredQuestion
tagged with: javascript
answer count: 1
tagged with: pjax
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/28284830
has body: I'm using RequireJS to structure my JS and DJAX (basically PJAX) as a way to dynamically load content without a full page reload. The issue I have is that after DJAX has finished loading the content I need to rerun my scripts (e.g. a script that adds multiple images into a carousel) so that the new page renders correctly. I thought the best way to do this would be to simply rerun the function I'm running on $(document).ready(); but I'm getting this output in the console: Uncaught TypeError: Cannot read property 'djaxLoad' of undefined which is referring to this line in load-posts.js bootstrap.init(); I'm guessing I'm writing something incorrectly. Here is bootstrap.js which is my main file which fires on document.ready and initialises all my modules require(['base/responsive', 'base/main-menu', 'base/social-share', 'base/randomise-colours', 'base/infinite-scroll', 'base/load-posts', 'base/image-fade', 'base/carousel', 'base/misc'], function(responsive, main_menu, social_share, randomise_colours, infinite_scroll, load_posts, image_fade, carousel, misc) { var $ = jQuery; function djaxLoad() { //If page has JS (detected with Modernizr) then hide content until the //doc is ready to avoid flash of unstyled content $('#djax-container').css('display', 'block'); main_menu.init(); social_share.init(); randomise_colours.init(); load_posts.init(); image_fade.init(); infinite_scroll.init(); carousel.init(); misc.init(); responsive.init(); } $(document).ready(djaxLoad); } ); And this is load-posts.js which handles DJAX for me. DJAX works, I just need to get the scripts to fire again. define(['djax', 'base/bootstrap'], function(djax, bootstrap) { var $ = jQuery, $body = $('body'); return { init: function() { if($body.length &gt;= 1) { this.setUp(); } else { return false; } }, setUp: function() { this.pjaxLinks(); }, pjaxLinks: function() { //Initialise DJAX, but stop it from running on pagination links (URL is /page...) $('body').djax('.updateable', ['page']); //When clicking a d…

http://stackoverflow.com/comment/39277296
type: Comment
comment on: http://stackoverflow.com/q/25216883
type: QuestionComment
has text: @mplungjan I see that now. I just assumed that the presence of " " automatically makes it javascript.
score: 0

http://stackoverflow.com/q/25098967
has answer: http://stackoverflow.com/a/46234690
downvote count: 0
accepted answer: http://stackoverflow.com/a/25099262
tagged with: jquery
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39056462
has body: I am using bootstrap and have a one modal that I would like to have a link on to another modal. I can't seem to figure this out and currently I am using the modal.close()and .modal('show') but that is not working. $('a#to3heart').click(function(){ $('#portfolioModal2').modal({onShow: function (dialog) { $.modal.close() $('#portfolioModal1').modal('show'); return false; } }); });
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/65156214
has answer: http://stackoverflow.com/a/65156214
has answer: http://stackoverflow.com/a/25099262
type: Question
tagged with: javascript
answer count: 3
has title: close one modal and open a new modal with one button
score: 3
tagged with: modal-dialog

http://stackoverflow.com/comment/39198933
type: AnswerComment
comment on: http://stackoverflow.com/a/25175634
has text: It looks like `thread.comments.data` is an array of objects. These objects have a `message` property, and it contains a string.
type: Comment
score: 0

http://stackoverflow.com/a/25229692
type: AcceptedAnswer
upvote count: 6
type: Answer
accepted answer of: http://stackoverflow.com/q/25135261
answers question: http://stackoverflow.com/q/25135261
score: 6
downvote count: 0
has body: You can manipulate the dom directly inside React. This permits to integrate existing JS libraries or for custom needs not handled well by React. You can find an exemple here: https://github.com/stample/gulp-browserify-react-phonegap-starter/blob/master/src/js/home/homeComponents.jsx#L22 And here's what it looks like: The problem with integration of React and a library like Isotope is that you will end up having 2 different libraries trying to update the same dom subtree. As React work with diffs, it kind of assumes that it is alone modyfing the dom. So the idea could be to create a React component that will render only one time, and will never update itself. You can ensure this with: shouldComponentUpdate: function() { return false; } With this you can: Use React to generate your isotope item html elements (you can also create them without React) On componentDidMount, initialize isotope on the dom node mounted by React And that's all. Now React will never update this part of the dom again, and Isotope is free to manipulate it like it wants to without interfering with React. In addition, as far as I understand, Isotope is not intented to be used with a dynamic list of items so it makes sense to have a React component that never updates.

http://stackoverflow.com/q/25178198
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39203405
has body: hi I am using angularjs and when I print this line console.log(JSON.stringify($scope.data)); I am getting below data in my browser console "FirstName,LastName,CII Number,Document Path\r\nJohn1,Rambo1,bulktest1,D:/MyDOJ/input_2/1000.pdf\r\nJohn2,Rambo2,bulktest2,D:/MyDOJ/input_2/1020.pdf\r\nJohn3,Rambo3,bulktest3,D:/MyDOJ/input_2/1010.pdf\r\nJohn4,Rambo4,bulktest4,D:/MyDOJ/input_2/5010.pdf\r\n" I want to form this data as JSON object as below [{ "FirstName":"John1" , "LastName":"Rambo1" ...}, { "FirstName":"John2" , "LastName":"Rambo2" ...}, { "FirstName":"John3" , "LastName":"Rambo3" ...}] etc please suggest me how to do this.
has title: how to convert data of type object to JSON object
accepted answer: http://stackoverflow.com/a/25178391
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39203419
has comment: http://stackoverflow.com/comment/39203959
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39203373
tagged with: http://stackoverflow.com/tag/json
type: Question
has answer: http://stackoverflow.com/a/25178391

http://stackoverflow.com/comment/39140783
comment on: http://stackoverflow.com/q/25139244
score: 0
type: Comment
type: QuestionComment
has text: Basically what I meant is there is a list each having a expandable button. now if a user expands list item 1 it should see entity related to first list item. and if user clicks 2nd item in list it should see list items related to second. Currently what is happening is on first it show correct but when i expand 2nd list item it also override the first list data with second one.

http://stackoverflow.com/comment/39101969
type: AnswerComment
comment on: http://stackoverflow.com/a/25123220
has text: I don't think the `$scope.$apply()` will help. But yes, you are correct, the key to this problem is that the jKeyboard doesn't mimic a real keyboard i.e. not trigger any events.
score: 0
type: Comment

http://stackoverflow.com/comment/39217619
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25185758
has text: @AdamMerrifield I can't as a lot of the data is pulled from the back end of the site. I will try to update my question to make it more clear and simple.

http://stackoverflow.com/comment/39254075
comment on: http://stackoverflow.com/q/25202496
type: Comment
score: 0
has text: I would probably have the server spit out all the HTML, with a 'hidden' class (or similar) on the ckeditor input (or around it on a div). Then the click handler just needs to do a couple of class toggles. Obviously some CSS would handle the 'hidden' case. This depends on what triggers the loading of the editor. The js handler may need to 'activate' the ckeditor.
type: QuestionComment

http://stackoverflow.com/q/25184073
type: Question
score: 0
has answer: http://stackoverflow.com/a/25184118
has comment: http://stackoverflow.com/comment/39213979
tagged with: javascript
tagged with: jquery
has title: remove previos alert message
tagged with: css
has body: Im using the following code to add message and its working fine,the problem is that when I put the second message I see it on top of the preivos message and so on... there is a way to remove the previos message from the UI when I add new one function addInfoMessage(message) { var $msg = $("&lt;div class='alert alert-info'&gt;&lt;strong&gt;Information : &lt;/strong&gt;" + message + "&lt;button type='button' class='close' aria-hidden='true'&gt;&amp;times;&lt;/button&gt;&lt;/div&gt;"); $messages.append($msg); }
answer count: 4
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25184126
possible better answer: http://stackoverflow.com/a/25184102
accepted answer: http://stackoverflow.com/a/25184128
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25184102
has answer: http://stackoverflow.com/a/25184128

http://stackoverflow.com/comment/39250422
comment on: http://stackoverflow.com/q/25203527
score: 0
type: Comment
type: QuestionComment
has text: http://jsfiddle.net/amith009/th99H/

http://stackoverflow.com/comment/39500195
has text: played isotope for a while, it's not easy to get it work with knockout. Knockout wants to control view based on model, but isotope has no data layer, all its functions are based on DOM. I have not found a clean way to support isotope filters (isotope filter is based on css class, not data).
type: AnswerComment
comment on: http://stackoverflow.com/a/25320746
score: 0
type: Comment

http://stackoverflow.com/a/25226317
accepted answer of: http://stackoverflow.com/q/25225980
type: Answer
has body: You should declare your map variable outside of the initialize function, and then refer to it in your addmarker function when creating the marker, like this: var map; function initialize() { var myLatlng = new google.maps.LatLng(23.684994000000000000, 90.356330999999950000); var mapOptions = { zoom: 4, center: myLatlng } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); } function addmarker(Clientlatitude, Clientlongitude) { var latilongi = new google.maps.LatLng(Clientlatitude, Clientlongitude); var marker = new google.maps.Marker({ position: latilongi, map: map }); }
score: 0
answers question: http://stackoverflow.com/q/25225980
type: AcceptedAnswer

http://stackoverflow.com/a/25191590
score: 2
has comment: http://stackoverflow.com/comment/39228869
downvote count: 0
answers question: http://stackoverflow.com/q/25191517
has body: Remove the document.ready in the include.js. This creates scope, so changeColor and exclamation only live inside the wrapping function. include.js should be: function changeColor(elem) { $(elem).css({ "border-radius": "5px", "font-weight": "bolder", "border": "1px solid red" }); } function exclamation(elem) { $(elem).notify( "-", { position:"right" } ); } Notice how there is no longer document.ready. Some info on function scope in javascript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25191517

http://stackoverflow.com/comment/39157995
comment on: http://stackoverflow.com/q/25153416
has text: in in
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25132348
has comment: http://stackoverflow.com/comment/39118971
has comment: http://stackoverflow.com/comment/39118860
type: Question
has comment: http://stackoverflow.com/comment/39118929
tagged with: javascript
score: -1
has body: How to display time which comes from C# in this format: {12:47:00} in a label in javascript? When I display it in java script it displays as: [object Object] html: &lt;label id="start_time"&gt;&lt;/label&gt; js: $("#start_time").text(ret.Start_Time); and ret.Start_Time comes from C# as {12:47:00} and ret is the list which holds the return time.
has title: How to display object which contains time
has comment: http://stackoverflow.com/comment/39118688
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39118635
has comment: http://stackoverflow.com/comment/39118726
favorite count: 0
has comment: http://stackoverflow.com/comment/39118714
has answer: http://stackoverflow.com/a/25132428
has comment: http://stackoverflow.com/comment/39118571
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39118606

http://stackoverflow.com/comment/39207446
has text: It seems like a great solution. I will give it a try. Thanks
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25179764

http://stackoverflow.com/a/25083491
answers question: http://stackoverflow.com/q/25083201
has body: I think jQuery have a change event. And you don't use it in the good way. Read this page: http://api.jquery.com/change/ and this: jQuery checkbox change and click event When any change occurs in the checkbox, jQuery event function is called. And then you can write anything in this event function
score: 0
type: Answer

http://stackoverflow.com/a/25188415
has comment: http://stackoverflow.com/comment/39222567
has comment: http://stackoverflow.com/comment/39225350
type: Answer
has comment: http://stackoverflow.com/comment/39225751
downvote count: 0
has body: Here's the JavaScript based on the HTML you have: $(document).ready(function(){ $("#add").on("click", function(){ $("#container").append( " <g:field>Another field Delete " ); }); $(document).on("click", ".delete", function(){ $(this).parent().parent().remove(); }); }); Example
has comment: http://stackoverflow.com/comment/39225395
score: 1
has comment: http://stackoverflow.com/comment/39226020
has comment: http://stackoverflow.com/comment/39225634
upvote count: 1
answers question: http://stackoverflow.com/q/25186377
has comment: http://stackoverflow.com/comment/39222664

http://stackoverflow.com/comment/39020306
has text: But'page load' doesn't fire on orientation change. :P
comment on: http://stackoverflow.com/q/25079715
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39117447
score: 0
type: AnswerComment
has text: That's what I thought but after looking at the output and visually checking that it was indeed true a double = didn't work. Can you do a straight compare like that on strings?
comment on: http://stackoverflow.com/a/25116609
type: Comment

http://stackoverflow.com/a/33993106
type: Answer
accepted answer of: http://stackoverflow.com/q/25160597
score: 11
upvote count: 11
has body: There is no needing after time, convinient solution for me was: var gulp = require('gulp'), less = require('gulp-less'), cssmin = require('gulp-cssmin'), plumber = require('gulp-plumber'), rename = require('gulp-rename'); gulp.task('watch', function () { gulp.watch('./styles/*.less', ['less']); }); gulp.task('less', function () { gulp.src('./styles/*.less') .pipe(plumber()) .pipe(less()) .pipe(gulp.dest('./styles/')) .pipe(cssmin()) .pipe(rename({ suffix: '.min' })) .pipe(gulp.dest('./styles')) }); gulp.task('default', ['less', 'watch']);
answers question: http://stackoverflow.com/q/25160597
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25071687
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39005937
linked to: http://stackoverflow.com/q/7519203
has comment: http://stackoverflow.com/comment/39005757
score: 3
tagged with: performance
has comment: http://stackoverflow.com/comment/39005993
upvote count: 3
has comment: http://stackoverflow.com/comment/39005796
has comment: http://stackoverflow.com/comment/39005869
has body: I am currently working in a project with long living pages (LLP), what makes me worry about performance and memory leaks. Revisiting some material at MDN, I've discovered that this could lead to a memory leak: function addHandler() { var el = document.getElementById('el'); el.onclick = function() { this.style.backgroundColor = 'red'; }; } At first I did not understand why, but was easy to find a lot of explanations for this. I've found an article at codeproject, a more detailed explanation in this question and this article from Douglas Crockford. Now my question is: As far as I understood, this specific leak is an IE-only bug, is that correct? And, more important: until which version of our beloved blue browser from uncle Bill's company should I be worried about with this leak? Edit: Reliable references about the last question are desirable. Edit #2: Maybe I am wrong, but I think that using the 'new' standardized interface for events, we would not have the same problem: function addHandler() { var el = document.getElementById('el'); el.addEventListener('click', function() { this.style.backgroundColor = 'red'; }); } Since there is no direct assignment, I think there this solves the problem. However, this API is only IE9+, what makes me wonder if we would have the same problem with libraries' fallbacks, such as jQuery: var $el = $('.some-el'); $el.on('click', function(){ // ... }); I do not know enough about jQuery internals to say what this piece of code does on IE8-.
has comment: http://stackoverflow.com/comment/39006370
has comment: http://stackoverflow.com/comment/39005924
type: Question
linked to: http://stackoverflow.com/q/11186750
has comment: http://stackoverflow.com/comment/39006298
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39006231
has comment: http://stackoverflow.com/comment/39006327
has title: Have newer versions of Internet Explorer fixed circular references memory leak?
has comment: http://stackoverflow.com/comment/39005988
has comment: http://stackoverflow.com/comment/39006384
favorite count: 0
answer count: 0

http://stackoverflow.com/comment/39167914
score: 0
type: Comment
type: QuestionComment
has text: Using the data browser, check the "phone" column of one of your users and confirm it is exactly as show here, no extra spaces before/after.
comment on: http://stackoverflow.com/q/25149865

http://stackoverflow.com/comment/39273944
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25215597
has text: BTW, that's not how you call the setTimeout function... this is the correct way: `setTimeout(function() { nextPic(); }, 2000);`

http://stackoverflow.com/q/25182920
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
has body: i am editing content in an object saved in my AngularJs scope. Once submited i execute the following function: $scope.saveQuestion = function(){ var request = $http({ method: "post", url: "/manager/evaluations/evaluations/manage_questions/537c6179-8ed8-49b4-ac6b-25715f550349", data: {EvaluationQuestion: $scope.newquestion} }); } $scope.newquestion has the following object: [relevance: 3, evaluation_topic_id: 1, type: "text", action: "add", name: "asdfasdfsadfas"] But the ajax request on the is just showing a Request Payload with: Request Payloadview source {EvaluationQuestion:[]} EvaluationQuestion: [] Can any one guess why the sent data is empty?
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/39211807
has comment: http://stackoverflow.com/comment/39211919
has title: Angular Ajax request sending object
answer count: 3
has answer: http://stackoverflow.com/a/25182989
has answer: http://stackoverflow.com/a/25183664
possible better answer: http://stackoverflow.com/a/25183824
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39212112
has answer: http://stackoverflow.com/a/25183824
tagged with: ajax
has comment: http://stackoverflow.com/comment/39213591
accepted answer: http://stackoverflow.com/a/25183664
type: AnsweredQuestion

http://stackoverflow.com/a/25156850
type: Answer
has body: You can use bootstrap javascript. And this one is about tab. Here is a sample code: $('#myTab a').click(function (e) { e.preventDefault() $(this).tab('show') })
score: 0
answers question: http://stackoverflow.com/q/25156551

yahoo
type: Tag
tags question: http://stackoverflow.com/q/25077780
tag name: yahoo
tags question: http://stackoverflow.com/q/25140501

http://stackoverflow.com/comment/56579517
comment on: http://stackoverflow.com/q/25085918
type: QuestionComment
has text: Can you provide some more details about what permissions you were lacking?
score: 0
type: Comment

http://stackoverflow.com/comment/39122701
comment on: http://stackoverflow.com/q/25110856
score: 0
has text: Thanks for your help so far, but I can't find any documentation on that setSelectionElement method - can you point me at a write-up or (even better) a working example somewhere?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25185168
has title: How to pass a querystring using RegisterStartupScript?
type: AnsweredQuestion
score: 1
has body: I have this in my code behind: ScriptManager.RegisterStartupScript(this, typeof(string), Guid.NewGuid().ToString().Replace("-", ""), "window.setTimeout(\" $('#" + calendar.ID + "').fullCalendar({header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},aspectRatio: 2.2,editable: true,events: " + sJSON + ", eventClick: function(event) { OpenModal('Novo Compromisso','100%','500px','/agenda/form.aspx?compromissoid=event.id');}});\",100);", true); It gets some data and load the event property of the calendar. On the eventClick I want to access the event.id to open a modal window and edit the event. But the querystring is being set to 'event.id' literally. I checked to see if the event.id has a value at all. It has 'cause it appears on the alert() function as seen below. ScriptManager.RegisterStartupScript(this, typeof(string), Guid.NewGuid().ToString().Replace("-", ""), "window.setTimeout(\" $('#" + calendar.ID + "').fullCalendar({header: {left: 'prev,next today',center: 'title',right: 'month,agendaWeek,agendaDay'},aspectRatio: 2.2,editable: true,events: " + sJSON + ", eventClick: function(event) { alert(event.id); OpenModal('Novo Compromisso','100%','500px','/agenda/form.aspx?compromissoid=event.id');}});\",100);", true); So, how can I use event.id value as my querystring?
upvote count: 1
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/25185301
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25185301
answer count: 2
downvote count: 0
tagged with: asp.net
favorite count: 0
possible better answer: http://stackoverflow.com/a/25185306
has answer: http://stackoverflow.com/a/25185306
tagged with: registerstartupscript

http://stackoverflow.com/comment/39241521
has text: @florin.prisecariu: :-)They aren't that hard to draw, and any time I can help someone understand objects a bit better, it seems like a reasonable thing to do over my morning coffee. :-)
type: AnswerComment
comment on: http://stackoverflow.com/a/25198215
score: 0
type: Comment

http://stackoverflow.com/comment/39043541
has text: Server side DB or client side DB ??
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25091840
score: 0

http://stackoverflow.com/a/25119317
has comment: http://stackoverflow.com/comment/39094734
type: Answer
has body: onDrop is called on the container the item came from. In your function, evaluate to targetContainer parameter to see where the item was dropped and decide how to handle it.
score: 2
has comment: http://stackoverflow.com/comment/39094562
downvote count: 0
answers question: http://stackoverflow.com/q/25118672
has comment: http://stackoverflow.com/comment/39094468
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25118672
type: AcceptedAnswer

http://stackoverflow.com/a/25076249
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25076189
score: 1
downvote count: 0
has body: Try, $('.horse:visible .dog').append($('#cat')); The above code would append #cat into .dog which is a descendant of visible .horse If you want to add id to the particular element then do, $('.horse:visible .dog').attr('id','cat');

http://stackoverflow.com/a/25127784
score: 1
has body: That is because in console.log("outside, x is " + x) x is does not actually get set due to function scope. Try: console.log("outside, x is " + socket); Since x is return in your socket function.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25127615
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25127615
downvote count: 0

http://stackoverflow.com/comment/39367335
score: 0
comment on: http://stackoverflow.com/q/25113800
has text: so, you want to aggregate all the pages together?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25127416
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39109877
has title: Trigger event each time input values change
possible better answer: http://stackoverflow.com/a/25127470
favorite count: 0
answer count: 3
downvote count: 1
accepted answer: http://stackoverflow.com/a/25127507
upvote count: 0
has answer: http://stackoverflow.com/a/25127508
has answer: http://stackoverflow.com/a/25127507
has answer: http://stackoverflow.com/a/25127470
type: AnsweredQuestion
has body: I'm writing a form and each time the user changes an input field that has a class that starts with "js-input-", I want the value of the corresponding field on the confirmation page (where the user confirms all the values they inputted) to change to the new inputted value. For some reason, the change event is failing to trigger... Here's a very simplified test version. I can include more of the html if need be, but I'm pretty sure the issue is in the jQuery here since other change events are working on the same input fields. $(document).ready(function() { ... $("div[class^='js-input-']").change(testEvent); ... }) function testEvent() { $('.js-input-price').val(Math.random(); } &lt;input id="" class="propertyownership propAddress js-input-address" type="text" value="" name=""/&gt;
score: -1
type: Question
has comment: http://stackoverflow.com/comment/39109881

http://stackoverflow.com/q/25145852
has comment: http://stackoverflow.com/comment/39145279
score: 0
has body: No Sub Rows Parent Row 1 Hide This Hide This Also No Sub Rows Parent Row 2 Don't Hide This No Sub Rows Parent Row 3 Hide This I have tried a variety of JQuery methods to hide specific sub tables but none of these work. I need to hide specific sub tables when I hide the row directly above. Here is what I have tried. $('#tblMain').each(function () { //random logic code if(show == 1) { $(this).parent().children('.trSubTable').show(); } else { $(this).parent().children('.trSubTable').hide(); } });
has comment: http://stackoverflow.com/comment/39145124
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: html-table
tagged with: nested
has title: Hide specific nested tables in jquery
tagged with: jquery
has answer: http://stackoverflow.com/a/25147936
type: Question

http://stackoverflow.com/comment/39168803
type: Comment
comment on: http://stackoverflow.com/a/25101905
score: 0
has text: Your Welcome. Develope a great site.best wishes.
type: AnswerComment

trace
tag name: trace
type: Tag
tags question: http://stackoverflow.com/q/25083954

http://stackoverflow.com/q/25155935
type: Question
accepted answer: http://stackoverflow.com/a/25155994
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39162259
has comment: http://stackoverflow.com/comment/39164487
linked to: http://stackoverflow.com/q/14048873
upvote count: 3
has answer: http://stackoverflow.com/a/25155994
possible better answer: http://stackoverflow.com/a/25156024
tagged with: node.js
has title: How can I carry a socket connection through multiple web pages?
has answer: http://stackoverflow.com/a/25156024
type: AnsweredQuestion
score: 3
has body: I am using node.js and socket.io for some two way data handling. What I want is persistent connections when the client navigates through the site. I was using standard var socket; socket = io.connect("http://localhost:port"); socket.on('connect', function(data){ console.log("called connect"); console.log(user_id); socket.emit('init', user_id); }); This way I assign the user_id to that socket and can use that later to send data selectively to certain users. I was first inserting this in every web page. I notice that socket connect and disconnect is called when we move to new page and even on reloads. Is there a way to avoid this and do the init call only once? I tried looking at express.js but couldn't figure out any obvious solutions.
linked to: http://stackoverflow.com/q/12526265

http://stackoverflow.com/a/25084652
has comment: http://stackoverflow.com/comment/39029989
has comment: http://stackoverflow.com/comment/39029830
has comment: http://stackoverflow.com/comment/39029943
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25084305
has body: Why all this complicated code? Make it easier: Heading One Check
has comment: http://stackoverflow.com/comment/39029867

http://stackoverflow.com/comment/39145741
comment on: http://stackoverflow.com/q/25146550
score: 0
type: Comment
has text: Well, i include `js/bootstrap.min.js` in footer and remove the Google API from header and no change still made :( @jme11
type: QuestionComment

http://stackoverflow.com/q/25126331
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39107944
tagged with: javascript
linked to: http://stackoverflow.com/q/15754515
has body: I'm trying to pass html code to an angular directive as a parameter. Is this possible? Here's the directive in the html. Inside the directive, the &lt;br&gt;&lt;br&gt; comes out in plain text. &lt;mbs-are-you-sure body-text="'You are exporting to: ' + environmentsPretty + '.&lt;br&gt;&lt;br&gt; You will replace all books.'"&gt;&lt;/mbs-are-you-sure&gt; And here's the directive: .directive('mbsAreYouSure', [function() { return { restrict: 'E', scope: { bodyText: '=' }, templateUrl: 'directive-templates/are-you-sure.html' }; }]); And the template: &lt;div&gt;{{bodyText}}&lt;/div&gt;
accepted answer: http://stackoverflow.com/a/25129828
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Use HTML in Angular Directive parameter
favorite count: 0
tagged with: angularjs
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39110044
has answer: http://stackoverflow.com/a/25129828
upvote count: 1
answer count: 1

http://stackoverflow.com/q/25212616
has comment: http://stackoverflow.com/comment/39268402
type: Question
has comment: http://stackoverflow.com/comment/39268439
has comment: http://stackoverflow.com/comment/39268753
has comment: http://stackoverflow.com/comment/39268291
has comment: http://stackoverflow.com/comment/39268471
has comment: http://stackoverflow.com/comment/39268684
tagged with: javascript
has comment: http://stackoverflow.com/comment/39268559
has comment: http://stackoverflow.com/comment/39268270
score: 0
has comment: http://stackoverflow.com/comment/39268225
accepted answer: http://stackoverflow.com/a/25212753
has comment: http://stackoverflow.com/comment/39270143
has title: Whitespace in AJAX response
has comment: http://stackoverflow.com/comment/39268597
answer count: 1
has comment: http://stackoverflow.com/comment/39268323
tagged with: jquery
tagged with: ajax
has body: I'm getting white space in my console log from my response with AJAX. The responds I need to get is:"[1,4,6,12]" instead I'm getting: "[1,4,6,12] ". I've tried everything... Deleting every PHP close tag, using the trim function(in PHP and JS)... My PHP code(part not all): $errors = array(); if (empty($stringUsername)) { $errors[] = 0; $bolean = true; } if (strlen($stringUsername) &lt; 3 || strlen($stringUsername) &gt; 16) { $errors[] = 1; $bolean = true; } if (!ctype_alnum($stringUsername)) { $errors[] = 2; $bolean = true; } if (empty($stringPassword)) { $errors[] = 3; $bolean = true; } if (strlen($stringPassword) &lt; 6 || strlen($stringPassword) &gt; 16) { $errors[] = 4; $bolean = true; } if (empty($stringPassword2)) { $errors[] = 5; $bolean = true; } if ($stringPassword != $stringPassword2) { $errors[] = 6; $bolean = true; } if (empty($stringEmail)) { $errors[] = 7; $bolean = true; } if (!filter_var($stringEmail, FILTER_VALIDATE_EMAIL)) { $errors[] = 8; $bolean = true; } if ($intMatchu != 0) { $errors[] = 9; $bolean = true; } if ($intMatchu != 0) { $errors[] = 10; $bolean = true; } if (empty($stringTerms)) { $errors[] = 11; $bolean = true; } if ($stringTerms == 'avok') { $errors[] = 12; $bolean = true; } if ($bolean == false) { $errors[] = 100; } echo json_encode($errors); My JS/AJAX part(not all): if (username.val() != '' &amp;&amp; password.val() != '' &amp;&amp; password2.val() != '' &amp;&amp; email.val() != '' &amp;&amp; terms.val != '') { var UrlToPass = 'action=aanmelden&amp;username=' + username.val() + '&amp;password=' + password.val() + '&amp;password2=' + password2.val() + '&amp;email=' + email.val() + '&amp;av=' + terms.val(); $.ajax({ type: 'POST', data: UrlToPass, url: '/outgame/register.php', success: function (responseText) { if (responseText == 0) { $.notify('U hebt geen gebruikersnaam opgegeven!', 'error'); } else if (responseText == 1) { $.notify('Uw gebruikersnaam moet meer dan 3 en minder dan 16 karakters bevatten!', 'error'); } else if (resp…
tagged with: php
has comment: http://stackoverflow.com/comment/39268338
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39268360
has comment: http://stackoverflow.com/comment/39268384
has answer: http://stackoverflow.com/a/25212753

http://stackoverflow.com/comment/39191817
comment on: http://stackoverflow.com/a/25171408
score: 0
type: AnswerComment
has text: @Hladeo Instead of embedding those column selectors in your codes, you can do just `table.$('select').each(function(){}...);`.
type: Comment

http://stackoverflow.com/q/25091928
accepted answer: http://stackoverflow.com/a/25091986
has comment: http://stackoverflow.com/comment/39043604
score: -3
has comment: http://stackoverflow.com/comment/39043798
has comment: http://stackoverflow.com/comment/39043544
type: AnsweredQuestion
downvote count: 3
has comment: http://stackoverflow.com/comment/39043627
tagged with: forms
tagged with: scriptlet
type: Question
has body: You don't have to go through the complete code. Just look at the first table assigning and document.write() inside body tag. I created the complete page using document.write() inside one script. At the end of the code you can see there is submit button before form is closed. When I run the page and click the submit button it doesn't go to the servlet...What is wrong here ? <%@page import="s_pack.dbManager"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> Insert title here
upvote count: 0
has answer: http://stackoverflow.com/a/25091986
has comment: http://stackoverflow.com/comment/39043553
tagged with: jsp
tagged with: javascript
tagged with: servlets
has title: Why can't I reach my servlet from this form?
has comment: http://stackoverflow.com/comment/39043806
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25178574
has comment: http://stackoverflow.com/comment/39205141
has body: Update: From comments: I've updated the code above. I want the FOO in the global scope, i.e. window. For that you can just set window.FOO instead: window.FOO = window.FOO || {}; Here if window.FOO already exists its value will remain unchanged, otherwise window.FOO will be set to an empty object. Old answer: You need to declare the variable using var: var FOO = window.FOO || {}; This will set the FOO variable to window.FOO if that exists or an empty object if not. var FOO = window.FOO || {}; console.log(FOO); &gt; Object {} window.FOO = "Hello, world!"; var FOO = window.FOO || {}; console.log(FOO); &gt; "Hello, world!"
has comment: http://stackoverflow.com/comment/39204603
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25178540
accepted answer of: http://stackoverflow.com/q/25178540
has comment: http://stackoverflow.com/comment/39204058
has comment: http://stackoverflow.com/comment/39205201

http://stackoverflow.com/comment/39095266
score: 5
comment on: http://stackoverflow.com/q/25119810
has text: If you can use jQuery, its equivalent to `Function.bind()` is [$.proxy()](http://api.jquery.com/jQuery.proxy/).
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39187143
comment on: http://stackoverflow.com/a/25168427
type: AnswerComment
score: 0
type: Comment
has text: One problem is that the strings can't include any characters besides a - z or numbers. So i used sen.split(" ") to put each word into the array, then how would i go on to check if their are any bad chars in there?

http://stackoverflow.com/a/25228220
type: Answer
has comment: http://stackoverflow.com/comment/39300878
has comment: http://stackoverflow.com/comment/39300837
has comment: http://stackoverflow.com/comment/39300859
score: 2
has comment: http://stackoverflow.com/comment/39301512
has comment: http://stackoverflow.com/comment/39302176
has comment: http://stackoverflow.com/comment/39300562
has body: Get the matched group from index 2 (^|[^(\"])([a-z]+[0-9]+:[a-z]+[0-9]+) Here is demo Note: I think there is no need to check for both end If needed then add ($|[^(\"]) in the the end of the above regex pattern. Pattern explanation: ( group and capture to \1: ^ the beginning of the line/string | OR [^(\"] any character except: '(', '"' ) end of \1 ( group and capture to \2: [a-z]+ any character of: 'a' to 'z' (1 or more times) [0-9]+ any character of: '0' to '9' (1 or more times) : ':' [a-z]+ any character of: 'a' to 'z' (1 or more times) [0-9]+ any character of: '0' to '9' (1 or more times) ) end of \2 Sample code: var str = 'b1:b10 + sum(a1:a10, sum(b1:b21)) + (a1) + "d23:d44" '; var re = /(^|[^(\"])([a-z]+[0-9]+:[a-z]+[0-9]+)/gi; var found = str.match(re); alert(found);
has comment: http://stackoverflow.com/comment/39300695
has comment: http://stackoverflow.com/comment/39301677
has comment: http://stackoverflow.com/comment/39302850
has comment: http://stackoverflow.com/comment/39303261
downvote count: 0
has comment: http://stackoverflow.com/comment/39303101
answers question: http://stackoverflow.com/q/25228134
has comment: http://stackoverflow.com/comment/39301342
upvote count: 2

http://stackoverflow.com/comment/39209865
type: Comment
comment on: http://stackoverflow.com/a/25181641
has text: Thanks for the quick reply. Am not sure about the way i was handling the sorting. Is it the right way to do it ? please advice me if there is any better way. Thank you
score: 0
type: AnswerComment

http://stackoverflow.com/comment/41153991
type: AnswerComment
comment on: http://stackoverflow.com/a/25812749
score: 0
has text: By using if (this === window) i do not need the constructor.name property.
type: Comment

http://stackoverflow.com/comment/39274532
type: Comment
has text: but i want to post current height three times and stuff : foo only once
comment on: http://stackoverflow.com/a/25215993
score: 0
type: AnswerComment

ember.js
tags question: http://stackoverflow.com/q/25142479
tags question: http://stackoverflow.com/q/25075745
tags question: http://stackoverflow.com/q/25133284
tags question: http://stackoverflow.com/q/25106226
tags question: http://stackoverflow.com/q/25089173
tags question: http://stackoverflow.com/q/25107122
tags question: http://stackoverflow.com/q/25184294
tags question: http://stackoverflow.com/q/25163681
tags question: http://stackoverflow.com/q/25159313
tags question: http://stackoverflow.com/q/25152506
tags question: http://stackoverflow.com/q/25113919
type: Tag
tags question: http://stackoverflow.com/q/25135721
tag name: ember.js
tags question: http://stackoverflow.com/q/25208259
tags question: http://stackoverflow.com/q/25140631
tags question: http://stackoverflow.com/q/25107586
tags question: http://stackoverflow.com/q/25185596
tags question: http://stackoverflow.com/q/25164565
tags question: http://stackoverflow.com/q/25150817
tags question: http://stackoverflow.com/q/25122673
tags question: http://stackoverflow.com/q/25206095
tags question: http://stackoverflow.com/q/25202402
tags question: http://stackoverflow.com/q/25213719
tags question: http://stackoverflow.com/q/25132629
tags question: http://stackoverflow.com/q/25163423
tags question: http://stackoverflow.com/q/25222720
tags question: http://stackoverflow.com/q/25128054
tags question: http://stackoverflow.com/q/25126436
tags question: http://stackoverflow.com/q/25136735
tags question: http://stackoverflow.com/q/25222053
tags question: http://stackoverflow.com/q/25158658
tags question: http://stackoverflow.com/q/25148610
tags question: http://stackoverflow.com/q/25192496
tags question: http://stackoverflow.com/q/25087358
tags question: http://stackoverflow.com/q/25177854
tags question: http://stackoverflow.com/q/25180235
tags question: http://stackoverflow.com/q/25071169
tags question: http://stackoverflow.com/q/25149483
tags question: http://stackoverflow.com/q/25140409
tags question: http://stackoverflow.com/q/25208691
tags question: http://stackoverflow.com/q/25129487
tags question: http://stackoverflow.com/q/25129552
tags question: http://stackoverflow.com/q/25127993

http://stackoverflow.com/comment/39284615
type: Comment
type: QuestionComment
score: 0
has text: Your question should be much more specific about what you try to accomplish and show code that demonstrates what you have tried, and what error you got.
comment on: http://stackoverflow.com/q/25221238

http://stackoverflow.com/q/25183997
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25198326
tagged with: javascript
score: 0
type: UnansweredQuestion
tagged with: jsni
has title: Get javascript data to the gwt side
has body: I am using javascript variable which has json data like: I got the above string in my html like below: var info = [{"tenantKey":"Demo:farcoahuja@gmail.com","lastModifiedDate":1407410632468,"seqId":1,"lastModifiedBy":"farcoahuja@gmail.com","historyStr":null,"mDate":null,"mBy":null,"partyOrgKey":"5488762045857792","id":6245226045767680,"organizationName":"","fullName":"ram's","partyNameSplitList":["ram"],"currencyId":6262818231812096,"currency":null,"comments":null,"panNo":"","tinNo":"","serviceTaxNo":"","internalRole":"CUSTOMER","acctgAttrib":{"mainBranch":false,"balance":0.0,"openingBalance":0.0,"finalBalance":0.0},"glAcctOrgKey":"4837851162214400:6245226045767680","priceListRef":null,"priceList":null,"mapFirstName":null,"mapLastName":null}]; If you see my above json key-value("fullName":"ram's"), the value ram's has a special character(single quote). I have got this to the gwt side by using JSNI. private static native String getPartyListString() /*-{ return $wnd.info; }-*/ The my above approach is correct but because of special single quotation in the value, the jsni was not able to get it to the gwt side. How to get the above data to the gwt side?
tagged with: gwt
has answer: http://stackoverflow.com/a/25184478
tagged with: java

http://stackoverflow.com/comment/39060046
type: QuestionComment
comment on: http://stackoverflow.com/q/25100213
type: Comment
score: 0
has text: JSFiddle and Wireshark results added to question

http://stackoverflow.com/comment/39274595
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25215993
type: AnswerComment
has text: Lots of ways to do this... for example you could pass an extra field to postMessage signifying its "type": postMessage({'type': 'height', 'height': currentHeight'},...) or postMessage({'type': 'foo', 'foo': 'value'}, ...); Then just inspect event.data.type in receiveMessage and do the right thing.

http://stackoverflow.com/comment/39257788
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25207093
score: 1
has text: Your question is unclear.

http://stackoverflow.com/q/25157865
has body: I'm trying to wrap with a span parts of the nodes of a Kendo UI Editor that contains characters that exceed the character limit set. I'm trying to achieve what Twitter does when you type in your tweets; the excess characters are highlighted in red. How do I change the selectedRange of the Kendo UI Editor to select only those that exceed the character limit? Thanks!
type: Question
has answer: http://stackoverflow.com/a/25163644
tagged with: javascript
has title: How to set the selectedRange of Kendo UI Editor to highlight excess characters like Twitter?
score: 0
answer count: 1
tagged with: kendo-editor
tagged with: kendo-ui
type: UnansweredQuestion

http://stackoverflow.com/comment/39233184
comment on: http://stackoverflow.com/a/25153825
has text: Thanks a lot runTarm for your help and the plunker. Actually, I'd already thought of the flag solution (as described in the initial question). I was hoping that angularJs were offering some internal mechanism that would prevent $setViewValue from callbacking $watch. :(
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25099091
tagged with: google-apps-script
has comment: http://stackoverflow.com/comment/39057293
tagged with: javascript
score: 0
answer count: 1
has body: I have a problem with reverse engineering a php script to work with google spreadsheet. First I will show you the original php code and then show you my solution. At this point I have no indication as to what is wrong with my code. 1 Original php code. Source: bittrex.com/Home/Api $apikey='xxx'; $apisecret='xxx'; $nonce=time(); $uri='https://bittrex.com/api/v1.1/market/getopenorders?apikey='.$apikey.'&amp;nonce='.$nonce; $sign=hash_hmac('sha512',$uri,$apisecret); $ch = curl_init($uri); curl_setopt($ch, CURLOPT_HTTPHEADER, array('apisign:'.$sign)); $execResult = curl_exec($ch); $obj = json_decode($execResult); 2 Reverse engineered google appscript code (just pure Javascript) of 1. /* Generate Nonce */ function nonceGen() { var d = new Date(); var timeStamp = d.getTime(); return timeStamp; } /* Encode with standard HMAC-SHA512 */ function signKey(url, secret) { var signature = Utilities.base64Encode(Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_512, url, secret)); return signature; } function getBalances(apik, apis) { /* Set important variables */ var url = 'https://bittrex.com/api/v1.1/account/getbalances'; var inputapikey = '?apikey='; var inputnonce = '&amp;nonce='; var nonce = nonceGen(); /* Bring it all together */ var uri = url.concat(inputapikey).concat(apik).concat(inputnonce).concat(nonce); /* Sign the message */ var sign = signKey(uri,apis); /* Set apisign as header */ var headers = { 'apisign' : sign }; var options = { 'method' : 'get', 'headers' : headers }; /* Retrieve response and parse the json into the data variable */ var response = UrlFetchApp.fetch(uri, options); var data = JSON.parse(response.getContentText()); /* Output on screen */ Logger.log(data); } I can't seem to figure out what the problem is. There seems to be no output on the screen at all. Not even an error. Hopefully I can get some bugtesting suggestions.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39056667
tagged with: php
has comment: http://stackoverflow.com/comment/39056907
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25099442
has title: Reverse engineering PHP script to Google Appscript (Javascript)
type: Question

http://stackoverflow.com/q/25148334
has title: Keep row visible when confirm dialog returns false
has comment: http://stackoverflow.com/comment/39148746
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25148458
accepted answer: http://stackoverflow.com/a/25148458
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5198108
has comment: http://stackoverflow.com/comment/39148809
has comment: http://stackoverflow.com/comment/39149353
has comment: http://stackoverflow.com/comment/39148836
score: 0
tagged with: confirm
has body: Hi I have a table containing rows. When page loads I am hiding the rows with odd numbers (they contain details). When I click the row (even number) it display the next row (the row with details). please see the jsfiddle example. HTML: Name Title Details Faisal Applicaiton Developer Work in Aid this is Faisal Details Fabrizio Applicaiton Developer Work in Aid this is Fabrizio Kelly Applicaiton Developer Work in Aid this is Kelly Hillary Applicaiton Developer Work in Aid this is Hillary Krista Applicaiton Developer Work in Aid this is Krista Justin Applicaiton Developer Work in Aid this is Justin Eric Applicaiton Developer Work Aid this is Eric Faisal Applicaiton Developer Work inAid this is Faisal Details jquery: $("table tr:nth-child(odd)").css("display", "none"); var prevRowIndex; $("table tr:not(:first-child)").click(function (e) { if (prevRowIndex != undefined) { $(prevRowIndex).css("display", "none"); prevRowIndex = null; } var styles = { "border": "#000", "margin-bottom": "10px" }; prevRowIndex = $(this).next(); //$(this).css("z-index", "9999"); $(this).next().slideDown('slow'); }); $(".approve").click(function (e) { if (confirm("Are you sure you would like to approve this request?") == false) { e.preventDefault(); $(this).parents("tr").css("display", "block"); } }); $(".deny").click(function (e) { if (confirm("Are you sure you would like to deny this request?") == false) { $(this).parents("tr").css("display", "block"); e.preventDefault(); } }); $(".cancel").click(function (e) { if (confirm("Are you sure you would like to cancel this request?") == false) { $(this).parents("tr").css("display", "block"); e.preventDefault(); } }); When a button is click (which is inside the detail row), it first ask for confirmation. My issue is when I select "cancel" in the confirmation dialog box, it hides the details row. I hope I had explained it properly. Any help on this is appreciated. jsfiddle example
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39148779

http://stackoverflow.com/a/25171841
downvote count: 0
has comment: http://stackoverflow.com/comment/39218817
type: Answer
upvote count: 1
has body: for example like this: var xmlText = $('#xmlData').text(); var $xmlData = $.parseXML(xmlText) $('company', $xmlData).each(function(index, company) { console.log($('industry', company).text()) }); see fiddle here for detailed example UPDATE print results to table: var xmlText = $('#xmlData').text(); var $xmlData = $.parseXML(xmlText) $('company', $xmlData).each(function(index, company) { $('#companies').append( $(document.createElement('tr')) .append( $(document.createElement('td')) .text($(this).attr('name')) ) .append( $(document.createElement('td')) .text($('industry', this).text()) ) .append( $(document.createElement('td')) .text($('employee', this).text()) ) .append( $(document.createElement('td')) .text($('certification', this).text()) ) ); console.log($('industry', company).text()) }); Updated fiddle here
accepted answer of: http://stackoverflow.com/q/25169064
score: 1
has comment: http://stackoverflow.com/comment/39208922
answers question: http://stackoverflow.com/q/25169064
type: AcceptedAnswer

http://stackoverflow.com/q/25152902
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/39161043
has answer: http://stackoverflow.com/a/25152971
has body: I have 3 views in my MVC5 App. Say A,B,C and 3 javascript files A.js, B.js C.js When appropriate view is loaded, I want appropriate javascript files to get loaded. I do not want all files to get loaded at the start up. How do I achieve that?
has comment: http://stackoverflow.com/comment/39156887
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: razor
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/39156833
score: 1
upvote count: 1
has title: Loading seperate javascript for different views in MVC

http://stackoverflow.com/q/25086392
has answer: http://stackoverflow.com/a/25088330
tagged with: kendo-mobile
answer count: 1
downvote count: 0
has title: How to set the tree view node color for Kendo UI TreeView?
tagged with: jquery
favorite count: 0
tagged with: kendo-ui
has body: I want to set the tree view color based on the value defined in the datasource field, From this link, I think that what I am trying to do is possible, but I am not using MVVM, so in my case what I am missing below? any idea?? http://www.telerik.com/forums/mvvm---treeview-only-updates-on-datatextfield-change &lt;div id="treeview"&gt;&lt;/div&gt; $("#treeview").kendoTreeView({ template: "#= item.text # color:#: item.color #", dataSource: [ { text: "green", color: "green", items: [ { text: "yellow", color: "yellow" }, { text: "red", color: "red" } ]},{ text: "blue", color: "blue" } ] }); Fiddle link, http://jsfiddle.net/KendoDev/qZeK6/
has comment: http://stackoverflow.com/comment/39035458
accepted answer: http://stackoverflow.com/a/25088330
score: 1
upvote count: 1
type: Question
tagged with: kendo-treeview
type: AnsweredQuestion
tagged with: javascript

http://stackoverflow.com/comment/39208260
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25176878
has text: Could you show us your code using the OAuth.io Phonegap SDK? Also, do you have any errors showing up? You can use tools like Weinre (http://people.apache.org/~pmuellr/weinre-docs/latest/) to get a Google Chrome like console for Phonegap to get the errors.
type: Comment

http://stackoverflow.com/comment/43194709
comment on: http://stackoverflow.com/a/26726880
has text: dirtyfield contains every field that is either has a new valye or updated value. In case of a new object, all the fields are dirty. But you dont need to use dirtykey to check for new object. You can simply do if(request.object.existed()) check to identify if its a new object.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/25152041
has body: This happens because when you check with the == and === operators, Javascript performs a check by reference. This two objects, unless they are declared like holiday = arriveDate1, will then never be equal, because they don't share the same memory reference. Example: a = {foo: 'hello'}; b = {foo: 'hello'}; a == b; &gt; false You should perform the check using .toISOString or the unary operator + to convert the data objects in milliseconds, like this: // this if (arriveDate1.toISOString() == holiday.toISOString()) ... // or this if (+arriveDate1 == +holiday) ...
answers question: http://stackoverflow.com/q/25151955
type: Answer
accepted answer of: http://stackoverflow.com/q/25151955
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39008775
comment on: http://stackoverflow.com/q/25073456
type: Comment
type: QuestionComment
has text: comments are in fact part of the DOM, the nodeType is 8, and they can be accessed, but is that really what you're asking? Of course, regular DOM methods doesn't work on elements that are commented out, as that would defeat the entire purpose of comments !
score: 1

http://stackoverflow.com/comment/39116248
score: 0
type: Comment
has text: You read those options, but you didn't Went thru malsup BlockUI.. By just a few CSS tweaks, you can create a non-modal dialog box using it.
type: AnswerComment
comment on: http://stackoverflow.com/a/25112829

http://stackoverflow.com/comment/39042479
type: Comment
comment on: http://stackoverflow.com/a/25091310
has text: No i'm saying there's a countdown for each user, let's say 40 seconds, after 40 seconds the boolean is false for the current user typing preventing the user from adding anything else. At the same time, userB's boolean becomes true allowing him to begin typing. The users wouldn't have any control over it.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39275424
type: Comment
has text: OK please i'm waiting
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25216170

http://stackoverflow.com/comment/39134601
has text: `Object {title: "dgfgdfg", id: 0, isEditable: false, isOnline: false, isRecycled: false}`
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25140234

http://stackoverflow.com/a/25220225
has body: try using "function getTableContents(){}" instead.
downvote count: 0
answers question: http://stackoverflow.com/q/25220172
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39282386
score: 2
has comment: http://stackoverflow.com/comment/39282415

http://stackoverflow.com/a/25223997
has comment: http://stackoverflow.com/comment/39314660
has comment: http://stackoverflow.com/comment/39330047
has comment: http://stackoverflow.com/comment/39334416
has comment: http://stackoverflow.com/comment/39344776
score: 0
has comment: http://stackoverflow.com/comment/39289348
has comment: http://stackoverflow.com/comment/39314277
has comment: http://stackoverflow.com/comment/39289266
has comment: http://stackoverflow.com/comment/39334186
has comment: http://stackoverflow.com/comment/39289272
has comment: http://stackoverflow.com/comment/39343616
has comment: http://stackoverflow.com/comment/39331518
has comment: http://stackoverflow.com/comment/39314173
has body: I guess the problem is in incorrect method you're using to get body element. Should be like this: var body = document.getElementsByTagName('body')[0]; Note the plural form of Elements word. And I suggest you to use: var body = document.body; UPDATE1: Another thing should be corrected - you're adding scripts to html tag, but this won't work, since scripts are allowed only in body and head sections. So another thing to try: body.appendChild(newScript); But in fact there is no need of adding your scripts each time the button is clicked. Why don't you just load scripts when your site loads and on click you'd just call functions from that scripts? UPDATE2: Ok, given the requirement that we can't change the script, I'd suggest this a bit ugly solution (not sure if it'll work though): function SetChatSupply() { var divObject = document.getElementById('div_right'); var newContent = document.createElement('div'); newContent.setAttribute('id', 'chatwee_supply'); var newScript = document.createElement('script'); newScript.src = 'http://repository.chatwee.com/scripts/069673da978e699031ff2031b4664ff2.js'; newScript.type = 'text/javascript'; newScript.charset='UTF-8'; divObject.appendChild(newContent); divObject.appendChild(newScript); }; So the idea is to combine both of your methods (add div and add script) in one (function SetScriptSupply is not needed anymore), so each time the link is pressed, you overwrite the whole content of div_right, the script is reloaded and executed. You should do the same for finance chat.
has comment: http://stackoverflow.com/comment/39289465
type: Answer
has comment: http://stackoverflow.com/comment/39328202
has comment: http://stackoverflow.com/comment/39316965
has comment: http://stackoverflow.com/comment/39289219
answers question: http://stackoverflow.com/q/25223843

http://stackoverflow.com/q/25087636
type: UnansweredQuestion
has body: I have a confusing situation somebody probably already had. I am implementing login / authentication with angular.js. I've done everything like described in this link https://medium.com/opinionated-angularjs/techniques-for-authentication-in-angularjs-applications-7bbf0346acec Now I separated www.url.com/login.html and www.url.com/index.html#dashboard. Dashboard is the logged in area. If I am on the login page (www.url.com/login.html) and in url i enter www.url.com/index.html#dashboard the dashboard starts loading and then redirects me back to login.html. The problem is that I see the dashboard page for a few seconds and then I get redirected after seeing the dashboard loading. Using window.location in $rootScope.$on('$stateChangeStart', function (event, next) .. Is there any way to bypass / override this behaviour?
has comment: http://stackoverflow.com/comment/39037080
has answer: http://stackoverflow.com/a/25088833
tagged with: authentication
type: Question
has title: Angular.js - Change url from login page causes logged in area glitch
tagged with: javascript
tagged with: authorization
score: 0
tagged with: single-page-application
answer count: 1
tagged with: angularjs

http://stackoverflow.com/comment/39119086
type: Comment
score: 1
has text: Why would that matter, the original page would remain same on server side.Besides people often modify webpage JS sources using firebug etc for testing purposes. If your server app is robust enough it should not any make difference.
comment on: http://stackoverflow.com/q/25132598
type: QuestionComment

http://stackoverflow.com/q/25147507
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/25147564
type: Question
has body: I define a table of editable text fields in HAML like this: %table %tbody %tr %td -hints.each do |hint| =form_for(level_source_hint, :remote =&gt; true) do |f1| =text_field_tag 'message' + hint.id.to_s, level_source_hint.hint, class: 'input-xxlarge' %td{:id =&gt; 'sibling' + hint.id.to_s} ... Note that there is not a submit button. If someone edits the text field and presses return, an update request is sent, which works. When the user submits the form, I would like to do something in javascript to the sibling node (in the second %td). I've tried adding an :onchange attribute to the form_for tag, but it doesn't show up in the generated html. While I might be able to bind functions to each of the different forms, doing so would be ugly because I would need to create a different function for each row (the number of which is not known until runtime), and each function would have to hardcode which row it came from (e.g., its hint.id). Do I really need to create and bind one function for each form, or is there a more elegant solution? I am using Rails 4.0.3 with jquery-rails 3.1.10 and jquery-ui-rails 4.2.0.
tagged with: javascript
has answer: http://stackoverflow.com/a/25147564
score: 0
tagged with: haml
answer count: 1
has title: How to run javascript code in Rails when form submitted via text field?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: forms

http://stackoverflow.com/q/25219979
has answer: http://stackoverflow.com/a/25220055
has body: I have the following toggle function filter() where I display the childrow of a table when the &lt;tr&gt; parent is being clicked. In this function I've also included a key shortcut, so whenever ALT+A is pressed all the childrows are displayed. In addition I have another script, mouseover(), where the background color of the parent tr is changed to #2C4367 hover. So here's my question: How can I toggle the background-color of a tr parent whenever I expand (click on) it and back to normal when it is closed. This function should also work on all tr parents when the key shortcut is pressed, so the background color of all parent tr's is changed when the shortcut is being pressed. I hope I made myself clear. Otherwise please say so and I will try to elaborate. Toggle filter() script: $(document).ready(function mouseover(){ $(".parent").hover(function(){ $(this).css("background", "#2C4367"); $(this).css("color", "#FFFFFF"); }, function(){ $(this).css("background", "#FFFFFF"); $(this).css("color", "#000000"); }); }); Change bgcolor mouseover() script: $(document).ready(function filter() { $('table.detail').each(function() { var $table = $(this); $table.find('.parent').click(function() { $(this).nextUntil('.parent').toggle(); // must use jQuery 1.4 for nextUntil() method }); /// Below is toggle on image var $childRows = $table.find('tbody tr').not('.parent').hide(); $("img.pushme").toggle(function funcVis() { $childRows.show(); }, function() { $childRows.hide(); }); shortcut.add("Alt+A",function(){ funcVis() }); /// Shortcut functions shortcut.add("Alt+N",function(){ expandform() }); /// Shortcut functions }); });
possible better answer: http://stackoverflow.com/a/25220055
tagged with: javascript
tagged with: jquery
tagged with: show-hide
has answer: http://stackoverflow.com/a/25240006
type: AnsweredQuestion
tagged with: css
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25240006
has title: Change bgcolor on toggled tr and on key shortcut

http://stackoverflow.com/a/25088987
type: Answer
has body: The error message "$ not defined" indicates that jQuery is missing. You need to add a script tag that imports jQuery. Add it in the head tag before all other script tags. If you don't have a version on your server, you can use one hosted by Google: If everything else is correct, this change should fix your problem.
score: 0
accepted answer of: http://stackoverflow.com/q/25088277
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25088277
has comment: http://stackoverflow.com/comment/39038947

http://stackoverflow.com/q/25212900
has answer: http://stackoverflow.com/a/25217818
has title: Sorting table rows using AngularJS
has comment: http://stackoverflow.com/comment/39268847
tagged with: angularjs
has body: I'm just getting started with AngularJS and I'm trying to sort my table so that when a tableheader is clicked the rows are sorted per that table header. Here is my plnkr link: http://plnkr.co/edit/mbTq5865KKNzlvpJJy1l Here is my relevant code: Controller code: $scope.setRepoSortOrder = function(order) { if ($scope.repoSortOrder === order) { if ($scope.repoSortOrder.charAt(0) === '+') { order = order.replace('+', '-'); } else { order = order.replace('-', '+'); } } $scope.repoSortOrder = order; }; Table: Name Stars Language {{repo.name}} {{repo.language}} So when the name th is clicked the rows should be sorted by the names - same with stargazers_count and language. If a th is clicked again it should be sorted in the opposite order (if I click name first it's sorted by names in asc order - if I click it again it's sorted in desc order). Finally: name and language should initially sort in asc order while stargazers_count should sort in desc order initially. I've done this myself but I don't know if I'm doing it the best way possible. Since I'm not used to the "angular style" I would like to hear how people familiar with AngularJS would handle this. Please check out the plnkr link to see if you could improve it. Any replies are appreciated!
linked to: http://stackoverflow.com/q/16842630
accepted answer: http://stackoverflow.com/a/25217818
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39269651
type: Question
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25210360
type: Answer
accepted answer of: http://stackoverflow.com/q/25210271
has comment: http://stackoverflow.com/comment/39263717
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39264053
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25210271
has body: Might you have the pattern and the test string reversed in the second test? var keyword = "late-model"; var regex = new RegExp(keyword, "gi"); if(regex.test(myURL)) { jQuery("#pass").append("RegExp.test() passed!"); } http://jsfiddle.net/a2s6vqgs/1/

http://stackoverflow.com/comment/39106956
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25125901
has text: It has an ID, so why not just `$('#nameGroup').addClass("has-error");` ?
score: 0

http://stackoverflow.com/a/25112361
has comment: http://stackoverflow.com/comment/39081803
answers question: http://stackoverflow.com/q/25112200
has comment: http://stackoverflow.com/comment/39083359
score: 0
has body: After exposing the port in your dockerfile you also have to tell Docker how to map from your host system to your container. Try changing your Docker run command to something like this: docker run -p 127.0.0.1:49158:8080 -d jimjeffers/hello-world Then try: curl'ing: curl -i 127.0.0.1:49158
has comment: http://stackoverflow.com/comment/39081869
type: Answer
has comment: http://stackoverflow.com/comment/39082499

http://stackoverflow.com/comment/39287521
score: 0
comment on: http://stackoverflow.com/a/25222922
has text: Whats wrong with `indexOf`? And why concatenating string when you can use the dom? http://jsfiddle.net/some/jfdm2yry/
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39092884
has text: You can use your custom functionality for toggle if you want I can create JS for this
comment on: http://stackoverflow.com/q/25118252
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/comment/39185709
score: 0
has text: Do you mean it adds a line return?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25167832

http://stackoverflow.com/q/25172500
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25172619
has title: Trouble passing entire two dimensional array as parameters in JavaScript/jQuery
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25172616
has answer: http://stackoverflow.com/a/25172616
tagged with: apply
has body: I am trying to generate divs around each of the elements of a two dimensional array using the methods below. So far the code only outputs the last 3 elements in the array (the 3 elements of third nested array). I am passing the array elements as parameters using .apply. How could I modify this to output each element of the array catArray in order? And why would it only pass the last 3 as it is? Any advice would be appreciated, I am trying to understand this better. I have spent hours on this, hopefully someone can help. Here is a codepen: http://codepen.io/anon/pen/kzEdK function cats(catName, catFur, catEyes) { $("#row").html('&lt;div&gt;' + catName + '&lt;/div&gt;' + '&lt;div&gt;' + catFur + '&lt;/div&gt;' + '&lt;div&gt;' + catEyes + '&lt;/div&gt;'); } var catArray = [ ["fluffy", "soft", "green"], ["mittens", "coarse", "fire"], ["wiskers", "none", "grey"] ]; function catGenerator() { for (var i = 0; i &lt; catArray.length; i++) { var blah = catArray[i]; cats.apply(this, blah); } } catGenerator();
has answer: http://stackoverflow.com/a/25172619
type: Question
answer count: 2
tagged with: arrays

http://stackoverflow.com/comment/39088593
type: QuestionComment
comment on: http://stackoverflow.com/q/25116176
score: 0
has text: well, this does not work. I know how post data via jsonp but I do not know how to handle the data with php and send them to the URL.
type: Comment

http://stackoverflow.com/q/25180398
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: grails
favorite count: 0
has body: Building a grails application using dc &amp; cross-filter js libraries here, but facing an extremely weird issue in the visualization somehow. My visualization is of 5 bar charts, which are interconnected to each other using dc and cross-filter js libraries. So, there are simple metrics, calculated metrics (%) and lastly calculated metrics (without %). For these three types, there are three different types of if-else in each part of code (for 5 bar charts) But, the problem lies in the last if-else, here the cross-filter goes wrong and we get negative values after a couple of selections and all the bar charts are lifted off the x-axis. This is extremely weird and I don't understand what is going wrong here. (See image below for reference) We have the same code snippet in the second if-else and the third if-else, but the third if-else screws up the functionality of cross-filter. Can someone please explain what is going wrong here? Code : var devValue = facts.dimension(function (d) {return d.c;}); var a = ($('metric').value); // Basic metrics if(a == "Product views"||a == "Visits"||a == "Units") { var devValueGroupSum = devValue.group().reduceSum(function(d) { return +d.g;}); barChart4.width(600) .height(250) .margins({top: 10, right: 100, bottom: 20, left: 80}) .dimension(devValue) .yAxisLabel($('metric').value) .group(devValueGroupSum) .transitionDuration(800) .centerBar(true) .gap(60) .x(d3.scale.ordinal().domain(["DESKTOP/LAPTOP", "SMARTPHONES", "TABLETS","OTHERS"])) .brushOn(false) .title(function(d) { return d.key + ": " + d3.round(d.value,2); }) .elasticY(true) .barPadding(0.5) .xUnits(dc.units.ordinal); }//end of if // Calculated metrics (%) else if(a == "Conversion Rate"||a=="Bounce Rate") { var devValueGroupSum = devValue.group().reduce( function (p, v) { p.sumIndex1 += v.g p.sumIndex2 += v.h if (p.sumIndex2 === 0) p.avgIndex = 0; else p.avgIndex = (p.sumIndex1 / p.sumIndex2) * 100 ; return p; }, function (p, v) { p.sumIndex1 -= v.g; p.sumIndex2 -= v.g; retur…
has answer: http://stackoverflow.com/a/25184578
type: UnansweredQuestion
downvote count: 0
score: 1
tagged with: dc.js
has title: Dc cross-filter not working
type: Question
tagged with: crossfilter

http://stackoverflow.com/a/25227295
score: 1
has body: You can do it, like this: member = response["mem" + x]; In JavaScript, you can use either dot notation with a literal (obj.foo), or bracketed notation with a string (obj["foo"]). In the latter case, the string can be the result of any expression. But I'd probably send back the data as an array rather than as an object: $row = mysqli_fetch_array($result); $mem1 = $row["mem1"]; $mem2 = $row["mem2"]; $mem3 = $row["mem3"]; $mem4 = $row["mem4"]; $result2 = json_encode(array($mem1,$mem2,$mem3,$mem4)); echo $result2; Then you could just index into it as response[x] where x is 0 to 3.
upvote count: 1
answers question: http://stackoverflow.com/q/25227284
type: Answer
downvote count: 0

http://stackoverflow.com/q/25213050
favorite count: 0
has body: I'm trying to load my class o1 only on #post that does not already have a class o1. http://jsfiddle.net/tx6gey3n/2/ $("#post").css('background-color', 'red'); function addOverlays() { var theDiv=' '; jQuery(this).not( document.getElementsByClass( "o1" ) ).append(theDiv); } addOverlays();
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25213667
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
has title: I'm trying to load my class o1 only on #post that does not already have a class o1. jquery and javascript
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25213667

http://stackoverflow.com/comment/138605908
type: Comment
score: 0
has text: Man, ty very much, I tryed to do that for hours until I found your solution
type: AnswerComment
comment on: http://stackoverflow.com/a/69864501

http://stackoverflow.com/comment/39300945
type: Comment
comment on: http://stackoverflow.com/a/25230145
type: AnswerComment
has text: @Sudhir, thank you for the reply. I will give it a try and let you know how it worked out... Thanks...
score: 0

http://stackoverflow.com/q/25122453
score: 2
type: AnsweredQuestion
tagged with: mysql
has answer: http://stackoverflow.com/a/25123289
has comment: http://stackoverflow.com/comment/39100434
has body: I have a PHP script that returns an object with 4 records: $obj = array( 'id'=>$id, 'idCliente'=>$idCliente, 'arquivo'=>$arquivo, 'titulo'=>$titulo, 'descricao'=>$descricao, 'data' => $datacadastro ); I need to show the records one by one in a HTML. I'm new to jQuery and I'm trying to write this code for 3 days, so I decided to ask. ID: IDCliente: Arquivo: Titulo: Descricao: Data: ID: IDCliente: Arquivo: Titulo: Descricao: Data: ID: IDCliente: Arquivo: Titulo: Descricao: Data: ID: IDCliente: Arquivo: Titulo: Descricao: Data: How to proceed? I have it: $.ajax ({ type: "POST", dataType : "json", cache: false, url: "<?php bloginfo('template_url'); ?>/scripts/php_functions.php", data: {idClienteDocumentos: idClienteDocumentos, ajax: "true"}, success: function(result){ I have this code but it's not working. var campos = ['arquivo', 'idCliente', 'titulo', 'descricao', 'arquivo', 'data']; var tabela = $(' '); resultado.forEach(function (linha) { var linhaDiv = $(' '); linha.forEach(function (campo, index) { $(' ').addClass(campos[index]).text(campo).appendTo(linhaDiv); }); linhaDiv.appendTo(tabela); });
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39100521
has comment: http://stackoverflow.com/comment/39101072
has comment: http://stackoverflow.com/comment/39101634
accepted answer: http://stackoverflow.com/a/25123289
has comment: http://stackoverflow.com/comment/39100298
has comment: http://stackoverflow.com/comment/39100215
downvote count: 0
has comment: http://stackoverflow.com/comment/39100348
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39100293
has comment: http://stackoverflow.com/comment/39101476
has title: How to execute this array (jQuery Ajax)?
possible better answer: http://stackoverflow.com/a/25123330
tagged with: php
has answer: http://stackoverflow.com/a/25123330

http://stackoverflow.com/comment/39085019
has text: @Cirvis I'm afraid that's really bad practice. What if you have an element on five different pages which use the same piece of JavaScript? You'd end up having to use 5 copied JavaScript snippets and if you ever needed to change one you'd have to change it 5 different times. With an event listener you'd only have the one JavaScript snippet and it'd be so much easier to maintain.
comment on: http://stackoverflow.com/a/25114176
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39224762
type: Comment
has text: This is assuming that the problem is not deleting the past cookie quick enough (which would seem to make sense given the time delay of navigating elsewhere resolving the issue)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25189522

http://stackoverflow.com/comment/39169573
comment on: http://stackoverflow.com/a/25159658
score: 0
type: Comment
has text: To take this to the next step. If the user clicks on no I do not consent after they filled out say 2 questions, How would I reset all values when the user clicks on "no I do not consent"?
type: AnswerComment

http://stackoverflow.com/q/25079706
favorite count: 0
linked to: http://stackoverflow.com/q/11171828
upvote count: 2
tagged with: css
has answer: http://stackoverflow.com/a/25079852
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17273719
downvote count: 3
has comment: http://stackoverflow.com/comment/65344308
has comment: http://stackoverflow.com/comment/39020055
type: Question
answer count: 2
has title: Want to scroll a whole page in one mouse wheel in html or with help of jQuery
tagged with: javascript
tagged with: jquery
score: -1
accepted answer: http://stackoverflow.com/a/25079852
has comment: http://stackoverflow.com/comment/39020419
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25079822
has body: I want to scroll a page to 2000 offset in one move of mouse wheel, like the apple does http://www.apple.com/iphone-5s/ For more information, I'm using a skrollr plugin. All I want is to scroll a whole page to new section. This Site resembles same as mine. Use this as a reference, I want to scroll to "O Estúdio" in one scroll.
has answer: http://stackoverflow.com/a/25079822

http://stackoverflow.com/q/25176397
accepted answer: http://stackoverflow.com/a/25176482
answer count: 1
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39200355
type: AnsweredQuestion
has title: Find value in result from ajax call
has answer: http://stackoverflow.com/a/25176482
has body: i've action which return tuple of bool and string. I want to get the first value from result (which is true or false),what is the best way to do that ? This is the action public Tuple&lt;bool, string&gt; Check this is the ajax call which return result $.post(target, function (result) { ... in the result I got this message and I want to get the value of true or false,what is the best way to do that ? This is the message which is coming in result (the result value check via debug ) result= "(False, Failed to remove)" I try to find the first char by position[2] but Im not sure that this is the right way to do that...
type: Question
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/39068108
has text: Thats the CSS I got when I downloaded the blue theme from the tablesorter website, but that sorted it!! Thank you so much for your help!!
type: AnswerComment
comment on: http://stackoverflow.com/a/25105275
score: 0
type: Comment

http://stackoverflow.com/comment/39260629
score: 0
type: Comment
type: QuestionComment
has text: I'm sorry, not quite sure what you mean here? All I want to do is update the dropdown button's text with the option that is selected from the dropdown
comment on: http://stackoverflow.com/q/25208608

http://stackoverflow.com/q/25094397
has comment: http://stackoverflow.com/comment/39048069
favorite count: 0
has body: I have site where in one window can klick in many anchors, always when user click on anchor = show div with Iframe and show data (palyer - golf csore card), but the parent window was refresh, then when user open 4-5 (score card) and close is history lenght long, because everytime was parent windows refresh, and it's not so good, I wanna click - read data in iframe then clocse div and when click on BACK BUTTON go on previous page please help JavaScript: function fullWindowPopUp(AX, cis_turnaj, os_cis,pocet_kol, priezvisko, meno) { var Nheight = screen.height;; var Nwidth = screen.width; var NovaSirka = (Nwidth/2)-400; var NovaVyska = 155; if(pocet_kol=="" || pocet_kol==0) { document.getElementById("frameKarta").src='components/com_pgs/scorekarta.php?cis_turnaj='+cis_turnaj+'&os_cis='+os_cis+'&neex=1&priezvisko='+priezvisko+'&meno='+meno+' '; } else { document.getElementById("frameKarta").src='components/com_pgs/scorekarta.php?cis_turnaj='+cis_turnaj+'&os_cis='+os_cis+'&priezvisko='+priezvisko+'&meno='+meno+' '; } var divShow = document.getElementById(AX).style.display="block"; document.getElementById(AX).style.width=Nwidth+"px"; document.getElementById(AX).style.height=Nheight+"px"; document.getElementById("scorePopUp").style.left=NovaSirka+'px'; document.getElementById("scorePopUp").style.top=NovaVyska+'px'; if(pocet_kol==1) { document.getElementById("frameKarta").style.height="298px"; } if(pocet_kol==2) {document.getElementById("frameKarta").style.height="357px"; } if(pocet_kol==3) { document.getElementById("frameKarta").style.height="417px"; } if(pocet_kol=="" || pocet_kol==0) { document.getElementById("frameKarta").style.height="295px"; } } function fullWindowPopUpClose (AX) { divShow = document.getElementById(AX).style.display="none"; document.getElementById("frameKarta").src='components/com_pgs/blank.php';} HTML:
linked to: http://stackoverflow.com/q/3269899
has comment: http://stackoverflow.com/comment/39051378
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
answer count: 0
tagged with: iframe
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
score: 0
has title: show iframe in popup DIV without refresh parent window

http://stackoverflow.com/q/25122089
accepted answer: http://stackoverflow.com/a/25122404
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25122609
tagged with: jquery
has answer: http://stackoverflow.com/a/25122609
has comment: http://stackoverflow.com/comment/39099698
tagged with: http://stackoverflow.com/tag/html
has body: I have some webpages which I want to appear only through internal redirects, such that even if someone just types in the url they wouldn't go through. To see them you would need to go through the page that redirects to the 'secure page'.
tagged with: php
has comment: http://stackoverflow.com/comment/39099562
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25122404
has comment: http://stackoverflow.com/comment/39099519
type: Question
tagged with: javascript
has title: Make Page available only thorough redirect and not by direct url

http://stackoverflow.com/a/25246006
upvote count: 4
has comment: http://stackoverflow.com/comment/39437080
has body: i have managed to grow and shrink font according to the text entered into the text area Link to fiddle and the javascript modified as below var textArea = $('.area'); var maxTextSize = '75'; var keyupHandler = function (e) { console.log('keyup'); console.log(textArea[0].clientHeight); console.log(textArea[0].scrollHeight); console.log($("#ta").css('font-size')); while (textArea[0].clientHeight = textArea[0].scrollHeight &amp;&amp; $("#ta").css('font-size') &lt; maxTextSize) { console.log('font increase'); textArea.css('font-size', '+=1'); } while (textArea[0].clientHeight &lt; textArea[0].scrollHeight) { console.log('increase'); textArea.css('font-size', '-=1'); } } textArea.on('keydown', keyupHandler); Edit : tested in firefox 25.01 as well
type: Answer
answers question: http://stackoverflow.com/q/25204285
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/39372656

http://stackoverflow.com/q/25079972
has answer: http://stackoverflow.com/a/25080424
has comment: http://stackoverflow.com/comment/39020539
has comment: http://stackoverflow.com/comment/39020496
has comment: http://stackoverflow.com/comment/39020590
has body: Hello i am quite struggling with a problem. The structure is like :- After insertion of new child Thus I always want to keep my child with class "childToBeKeptLast" as last child no matter how many insertion take place in the parent div.How to achieve this by css or jquery ?? Any help will be appreciated ... Thank you ...
has answer: http://stackoverflow.com/a/25080016
tagged with: css
possible better answer: http://stackoverflow.com/a/25080424
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25080016
has comment: http://stackoverflow.com/comment/39020517
type: Question
has title: Keep a div as last child of its parent even after any new div is appended to its parent
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25080073
answer count: 3
has comment: http://stackoverflow.com/comment/39022562

http://stackoverflow.com/q/25098484
has title: jQuery Navigation Toggle
tagged with: javascript
answer count: 2
tagged with: jquery
has body: Hi We're creating a site offering support to specific causes and need a little help with jQuery when we open a navigation the div opens and when i go to open another navigation the previous one opens and the new one opens so we end up with two panels being open and the animation going again here is our code below, is their a better way to do this also... //File Information - File Name/tser.min.js - File Distributor/Thomas Clark Counselling LTD $(function() { //Notification Animations $(".notify-slide").slideDown(1000); //Mega Menu $(".dropdown-toggle").click(function() { $( this ).toggleClass( "toggle-active" ); }); $('#dropdown-shop').on('click',function(){ $('.dropdown-mega-shop').slideToggle(); }); $('#dropdown-help').on('click',function(){ $('.dropdown-mega-help').slideToggle(); }); }); &amp; the HTML for the header file is &lt;header&gt; &lt;?php include 'cookie-control.php'; ?&gt; &lt;div class="tc-nav"&gt; &lt;div class="tc-etn-bar container"&gt; &lt;div class="tc-bar-row"&gt; &lt;a href="&lt;?php echo $url; ?&gt;" title="&lt;?php echo 'Return to ', $title, ' Home'; ?&gt;"&gt;&lt;div class="tc-logo-main"&gt;&lt;?php echo $title; ?&gt;&lt;/div&gt;&lt;/a&gt; &lt;ul class="tc-main-nav"&gt; &lt;li&gt;&lt;a href="&lt;?php echo $url; ?&gt;"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="&lt;?php echo $url; ?&gt;" id="dropdown-shop" onClick="return false" class="dropdown-toggle"&gt;Schedule an Appointment&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="&lt;?php echo $url; ?&gt;" id="dropdown-shop" onClick="return false" class="dropdown-toggle"&gt;Meet the Team&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="&lt;?php echo $url; ?&gt;" id="dropdown-help" onClick="return false" class="dropdown-toggle"&gt;Help &amp; Support&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!-- Dropdown Menus --&gt; &lt;?php include 'mega-navigation.php'; ?&gt; &lt;!-- Alerts --&gt; &lt;div class="notify-slide alert warning-alert no-margin"&gt; &lt;div class="containe…
has answer: http://stackoverflow.com/a/25099126
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25098732
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25098732
has comment: http://stackoverflow.com/comment/39055569
score: 0
accepted answer: http://stackoverflow.com/a/25099126
type: Question
has comment: http://stackoverflow.com/comment/39055718

http://stackoverflow.com/q/25088896
tagged with: math
tagged with: javascript
has title: Movement relative to a plane
score: 0
has comment: http://stackoverflow.com/comment/39054131
has comment: http://stackoverflow.com/comment/39046035
has body: I have an issue with my current camera code. In my app, I can rotate the model that is being viewed, but also need to be able to "walk" the model. This means that the user can change the relative orientation of the model, but walking and rotating still needs to be done relative to the plane of the model. For instance, imagine looking at the model head on, like a building, such that you see the side of the building. If the user presses "W" in this case, they will move closer to the building. Now, they could choose to rotate the model's pitch such that they are now looking at the roof of the model (or the user could choose to go up high then look down at the ground). In this case, hitting "W" needs to maintain the existing altitude, and move forward "up" towards the top of the screen. In general, the motion needs to feel as though you are walking relative to the plane of the model, even if the plane as been rotated relative to your point of view. The same problem exists with looking right and left. Suppose you are again looking at the side of the building, and hit the arrow keys to look right or left. The rotation at this point is in the same plane as the model. But if the user rotates the pitch of the model to look at the roof, then they look right, it rotates about the camera's position instead, and looks like the model rotated away, rather than just spinning around. Imagine just standing on the ground looking down. Rotation of the camera would look like the world is spinning, but that's not what I get. I get the model rotating away, as though you rotate your eye to look towards the sky. Here is my update function mat4.identity(this.eyeMatrix); mat4.identity(this.orbitMatrix); mat4.identity(this.mvMatrix); mat4.fromRotationTranslation(eyeMatrix, this.eyeRotation, [0, 0, 0]); mat4.fromRotationTranslation(orbitMatrix, this.orbitRotation, [0, 0, 0]); mat4.translate(this.mvMatrix, this.mvMatrix, this.orbit); mat4.multiply(this.mvMatrix, this.mvMatrix, this.orbitMatrix);…
has comment: http://stackoverflow.com/comment/39054005
type: UnansweredQuestion
answer count: 0
tagged with: webgl
type: Question
tagged with: graphics

http://stackoverflow.com/a/25158346
downvote count: 1
has comment: http://stackoverflow.com/comment/39166402
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/25158265
type: Answer
has body: You could use, if ('confirm' in window &amp;&amp; typeof window.confirm === 'function' ) { /* Do your stuff here*/ } This is what you expecting?

http://stackoverflow.com/q/25152700
score: 15
favorite count: 0
possible better answer: http://stackoverflow.com/a/25153121
answer count: 3
has body: Ok, so I try to read a PDF file like this: reader.readAsArrayBuffer(file); and then try to send it to the server using $http like this: $http.put(url, data, {headers: {'Content-Type': 'application/pdf'}}); So, just read &amp; send the binary to the server in raw form. According to some resources I found, passing an ArrayBuffer to XHR should work, but passing it as data to $http just results in a request body like this: {} and Content-Length=2 Reading the file readAsBinaryString() results in a corrupted file (and is apparently deprecated for that very reason) The use case seems so trivial to me, am I missing something? Chrome 36, Angular 1.2.20
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25156892
has answer: http://stackoverflow.com/a/48558724
linked to: http://stackoverflow.com/q/6994712
has answer: http://stackoverflow.com/a/25153121
type: AnsweredQuestion
has title: AngularJS: PUT binary data from ArrayBuffer to the server
has answer: http://stackoverflow.com/a/25156892
type: Question
upvote count: 15
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39141570
type: AnswerComment
score: 0
type: Comment
has text: I had the pseudo idea, too while walking home. I will try and let you know if it works.
comment on: http://stackoverflow.com/a/25143675

http://stackoverflow.com/q/25137305
accepted answer: http://stackoverflow.com/a/25137455
possible better answer: http://stackoverflow.com/a/25137582
has answer: http://stackoverflow.com/a/25137582
has comment: http://stackoverflow.com/comment/39127802
favorite count: 0
has body: my template code &lt;ul&gt; &lt;li ng-repeat="x in names"&gt; {{ x.name + ', ' + x.country }} &lt;/li&gt; &lt;/ul&gt; and my js app.controller('TestCtrl', ['$scope','MYService', function($scope, MYService) { $scope.names = [ {name:'Jani',country:'Norway'}, {name:'Hege',country:'Sweden'}, {name:'Kai',country:'Denmark'} ]; }]); but my view shown result like this.. {,} {,} {,} why can't not access the value?
tagged with: angularjs
downvote count: 2
type: AnsweredQuestion
has title: angularJS, i can't see the value of controller data
has comment: http://stackoverflow.com/comment/39128312
has answer: http://stackoverflow.com/a/25137455
type: Question
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39128457
answer count: 2

http://stackoverflow.com/comment/39287363
type: Comment
has text: No I don't want to change json ..can we use these plugins.https://github.com/danhunsaker/angular-dynamic-forms
comment on: http://stackoverflow.com/q/25217933
score: 0
type: QuestionComment

show
tags question: http://stackoverflow.com/q/25109374
type: Tag
tags question: http://stackoverflow.com/q/25125992
tags question: http://stackoverflow.com/q/25142449
tag name: show
tags question: http://stackoverflow.com/q/25127360

http://stackoverflow.com/q/25207932
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39267803
has body: In a modal dialog form I'm working on using Knockout.js, the "Submit" button triggers a method which should hide the dialog and then set the value of a variable. self.updateSubTask = function(subTask) { ... $('#subTaskDialog').modal('hide'); self.selectedSubTask(null); }; When this function is called, the hide process begins - the dialog itself is removed - but is stopped before completion, and the grey background persists indefinitely. After some investigation, it is most likely that this is because the subsequent call to set the value of self.selectedSubTask is disrupting the hide "animation". Unfortunately, the modal call must be made before the change to selectedSubTask due to the way the dialog is set up. I've tried the following: _.defer(function() { self.selectedSubTask(null); }) $('#subTaskDialog').queue(function() { self.selectedSubTask(null); }); Unfortunately, neither of these methods work, and the behaviour is the same. I figure that a reasonable course of action would be to listen for when the dialog is hidden, and include the selectedSubTask call in that event handler. I'm having difficulty finding a solution to achieve this, however. Any suggestions on how to do this, or any other methods to achieve my ultimate aim, would be greatly appreciated. Cheers!
linked to: http://stackoverflow.com/q/22056147
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39299039
has answer: http://stackoverflow.com/a/25208040
accepted answer: http://stackoverflow.com/a/25208040
type: AnsweredQuestion
has title: Event to wait for dialog to disappear
linked to: http://stackoverflow.com/q/11519660
tagged with: knockout.js
type: Question

http://stackoverflow.com/q/25131133
has comment: http://stackoverflow.com/comment/39117401
type: AnsweredQuestion
score: 3
has body: I am trimming all textboxes and textareas on submit. It does not work for all view pages. I have taken simple html inputs + kendo DropDownList + kendo AutoComplete in my form. Below is my submit method which doesn't work, when there are Kendo UI control on my form. $('input[type="submit"]').click(function () { $('input[type=text], textarea').each(function () { if($(this).val()!=''){ $(this).val($.trim($(this).val())); //Exception in chrome: paused on exception typeerror. Msg: undefined in not function. } }); }); I don't know what's wrong. I found this issue specific to chrome browser.
has answer: http://stackoverflow.com/a/25151900
upvote count: 3
has comment: http://stackoverflow.com/comment/39117624
has comment: http://stackoverflow.com/comment/39118062
type: Question
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/39117614
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25151900
has comment: http://stackoverflow.com/comment/39116426
possible better answer: http://stackoverflow.com/a/25131232
answer count: 3
has answer: http://stackoverflow.com/a/25131232
has comment: http://stackoverflow.com/comment/39116555
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: kendo-ui
has title: Trim textboxes and texareas on submit prevent form to submit
has answer: http://stackoverflow.com/a/25131938
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39117513

http://stackoverflow.com/comment/39126067
type: AnswerComment
comment on: http://stackoverflow.com/a/25136302
type: Comment
has text: That first point on the data requests is really good. Thank you, Quentin. I will look into some further reading that people are suggesting but this does seem like quite a deal breaker.
score: 0

http://stackoverflow.com/q/25132598
has comment: http://stackoverflow.com/comment/39119161
favorite count: 0
has comment: http://stackoverflow.com/comment/39119043
type: UnansweredQuestion
has body: Is it possible to detect if the user alters the javascript send to the client? What i want is: This should not fire the function: User opens the debug window by a mistake -> Nothing happens. This should fire the function: User opens the debug window -> The user makes changes to the Javascript -> Fire "You cheated" function. Is this possible? If it is, how reliable is it? Why do i need this? I'm making a clicking game with leaderboards. Since it's a clicking game, i can't just send everything to the server as soon as the user clicks the elements. An average person can "burst click" the mouse about 15-20 times/second for about 1 minutes straight. This would instantly overload the server. I have been doing something like this in the past: Every 10 seconds run this pseudo function: $.ajax({ url: 'updateScore', data: {'score' : game.Score, 'time' : 'currentTime'}, }) At the updateScore i do this: Get the current score and last-edited-time from DB $differenceScore = game.Score - DB.score; $differenceTime = $diff = strtotime(game.Time) - strtotime(DB.last-edited-time) $averageClickingSpeed = 17.5 if( ( $differenceScore / $averageClickingSpeed) < $differenceTime){ // Do DB stuff } else { // The user cheated, or had an avg clicking speed of more than 17.5 }
has comment: http://stackoverflow.com/comment/39119184
answer count: 0
has title: Detect if the user edits the Javascript
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39119010
type: Question
has comment: http://stackoverflow.com/comment/39119114
tagged with: javascript
has comment: http://stackoverflow.com/comment/39119037
has comment: http://stackoverflow.com/comment/39119113
has comment: http://stackoverflow.com/comment/39119178
has comment: http://stackoverflow.com/comment/39119086
has comment: http://stackoverflow.com/comment/39119065
downvote count: 0

http://stackoverflow.com/comment/39158965
score: 0
has text: I'm not clear what your asking
type: QuestionComment
comment on: http://stackoverflow.com/q/25154055
type: Comment

http://stackoverflow.com/q/25193409
type: Question
has answer: http://stackoverflow.com/a/25223307
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39234209
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25223307
tagged with: firefox-addon
tagged with: firefox-addon-sdk
has comment: http://stackoverflow.com/comment/39257912
upvote count: 1
type: AnsweredQuestion
score: 1
has body: my problem is that i need to know when AJAX is done on the page. I need to know this in my contentScriptFile that i load through pageMod. My add on needs to run every time that the page has been modified: so basically when it loads and every time there is an AJAX call. i tried this: $(document).ajaxComplete(function() { alert("AJAX call completed"); }); but it does not work. is there a way to do this? edit: my page mod code from main.js: pageMod.PageMod({ include: "*", contentScriptFile: [self.data.url("jquery-1.9.1.min.js"), self.data.url("script.js")], onAttach: function(worker){ var apiKey = require("sdk/simple-prefs").prefs.apiKey; var ignoreList = require("sdk/simple-prefs").prefs.ignoreList; worker.port.emit("prefSet", [ignoreList, apiKey]); } });
has title: Firefox add-on pageMod, catch ajax done in contentScriptFile

http://stackoverflow.com/comment/39276365
score: 3
comment on: http://stackoverflow.com/q/25216868
type: Comment
type: QuestionComment
has text: And `barcodeName.value` will fail as `var barcodName=$(id).closest('tr').find('.name').attr('value');` will return a value not an object with a value property.

http://stackoverflow.com/q/25093101
possible better answer: http://stackoverflow.com/a/25093389
has body: I just brushing up on AngularJS and I came across angular.isDefined and angular.isUndefined, why would you use these? Why not just do if (!obj) or if (obj === undefined) I get why you might not want not want to do !var because you'll get other falsey obj as well as undefined. But why bother creating a method to take care of this?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25093445
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39045610
has comment: http://stackoverflow.com/comment/39045633
has answer: http://stackoverflow.com/a/25093389
has title: Why does Angular have isDefined and isUndefined functions?
linked to: http://stackoverflow.com/q/3390396
favorite count: 0
has comment: http://stackoverflow.com/comment/39045716
score: 2
tagged with: angularjs
has answer: http://stackoverflow.com/a/25093445
upvote count: 2

http://stackoverflow.com/comment/39185848
score: 1
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25111108
has text: The accepted answer is incorrect. The code which supposedly won't run executes just fine in jsBin (http://jsbin.com/hawuhoga/1/edit?js,console). Its assertion that prototypes are copied upon object construction is totally incorrect.

http://stackoverflow.com/q/25191766
favorite count: 0
has comment: http://stackoverflow.com/comment/39254552
upvote count: 1
type: AnsweredQuestion
has title: ENYOJS: Set focus on default element on page render
has body: Moonstone Spotlight. How do I set focus to an element (button etc) after render ? I've tried nameOfElement.focus() and that does not seem to work. rendered : function(){ this.inherited(arguments); var buttonreference = this.$.iconbackbuttonmaster; buttonreference.focus(); } Here is a >>>> fiddle
score: 1
possible better answer: http://stackoverflow.com/a/25194296
has answer: http://stackoverflow.com/a/25191808
type: Question
has comment: http://stackoverflow.com/comment/39273569
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25212275
has answer: http://stackoverflow.com/a/25256939
accepted answer: http://stackoverflow.com/a/25256939
tagged with: enyo
has answer: http://stackoverflow.com/a/25194296
answer count: 4

http://stackoverflow.com/comment/39250767
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25203642
has text: okay awesome that makes sense, so basically since returning a classname can return multiple elements they get stored as an array? Therefore you need to select at what index you want to get?

http://stackoverflow.com/a/25113351
upvote count: 2
type: Answer
has body: Writing toggleContent(this.content) immediately executes your toggleContent function and if it is not returning a function then it breaks the click binding. So you need to set your registerTClick to a function reference or something which returns a function reference. In your case you can use the bind method to create a new function from your toggleContent which receives the this.content when it gets called: this.registerTClick = toggleContent.bind(this, this.content); Demo JSFiddle.
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25113192

http://stackoverflow.com/comment/39181658
score: 0
comment on: http://stackoverflow.com/q/25165573
type: Comment
type: QuestionComment
has text: Could you tell us the character encoding of the string? `echo mb_detect_encoding($positions)`

http://stackoverflow.com/a/25121004
has body: You don't need to iterate each property to make it observable better way is to use knockout.mapping.js pluggin. So code will be like:- self.itemList = ko.mapping.fromJS(list); //list that will come from server(ajax request) Then just use checked binding to keep track selected checkboxes. Fiddle Demo
has comment: http://stackoverflow.com/comment/39120034
has comment: http://stackoverflow.com/comment/39119757
has comment: http://stackoverflow.com/comment/39119288
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/25119927
type: Answer
answers question: http://stackoverflow.com/q/25119927

http://stackoverflow.com/comment/39105206
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25124886
has text: Unless I am not understanding how/when to remove the watch! :/

http://stackoverflow.com/comment/39420795
has text: All you need for it to work is mongo running. Morgan logger does not indicate that anything went wrong. By "it seems to work" I mean that the delete route gets hit and the record in the database gets removed. I get the expected response { message: "Successfully deleted" }. Method override works like expected but it is not really a solution to the problem which really seems to be with chrome and not express.
type: Comment
comment on: http://stackoverflow.com/q/25229130
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39053862
type: QuestionComment
has text: just for testing, it works fine so far.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25097473

http://stackoverflow.com/comment/39130809
has text: just try below answer it should work..
type: Comment
comment on: http://stackoverflow.com/q/25138425
score: 0
type: QuestionComment

http://stackoverflow.com/a/25107280
downvote count: 0
score: 1
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25107234
has body: When the callback function is called, this will not be the object, but the $.getJSON function. You can bind the value of this to the callback, so it will be the object instead $.getJSON(url, this.onLoaded.bind(this)); FIDDLE
answers question: http://stackoverflow.com/q/25107234
type: AcceptedAnswer

http://stackoverflow.com/q/25091047
score: 3
has comment: http://stackoverflow.com/comment/39042679
has comment: http://stackoverflow.com/comment/39041888
type: Question
answer count: 2
has body: So basically, I don't want userB to write on a text field, while userA is writing on it. More specific: I want to know how I can evade that userB starts writing in a text field while userA is writing on it, so let's say that we could add a delay between userA and userB. userA get's to write for a certain amount of time, and when that time's up, userB is able to type on the text field, and userA isn't. And so on.. I'd appreciate all your help!
has comment: http://stackoverflow.com/comment/39041973
has answer: http://stackoverflow.com/a/25091092
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39042296
has comment: http://stackoverflow.com/comment/39042793
upvote count: 3
has answer: http://stackoverflow.com/a/25091310
has comment: http://stackoverflow.com/comment/39049627
favorite count: 0
has comment: http://stackoverflow.com/comment/39042009
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39041866
has comment: http://stackoverflow.com/comment/39042828
has title: How do I prevent another user interacting while other user is providing input?
has comment: http://stackoverflow.com/comment/39042738

http://stackoverflow.com/comment/39143566
type: Comment
type: QuestionComment
has text: See: [CSS Vendor Prefixes](http://davidwalsh.name/vendor-prefixes) for the general answer.
comment on: http://stackoverflow.com/q/25145711
score: 0

http://stackoverflow.com/a/25217787
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39278089
has comment: http://stackoverflow.com/comment/39278000
has body: The most likely reason is that the load event has already fired. With an img, you can check whether its load event has been fired by checking its complete property. This will reliably call img_loaded for the related images, for instance: var imgs = $("figure img"); var img; for(var i = 0, l = imgs.length ; i &lt; l ; ++i) { img = imgs[i]; img.addEventListener("load", img_loaded, false); if (img.complete) { img_loaded.call(img); img.removeEventListener("load", img_loaded, false); } } You may be wondering why, in the above, first I attach the event handler, then I check whether img.complete is checked, and if so I remove the event handler and call it. That's to prevent missed called. There's only one main JavaScript thread, but the browser is not single-threaded. If we checked complete first, then added the handler on the next line, it would be perfectly valid for the browser, between those two lines, to see that it has finished loading the image, look for handlers for the load event, not see any, and set complete&nbsp;&mdash; and we wouldn't get a callback at all. It's really unlikely, but it can happen. For the same reason, the above may call img_loaded twice in very rare situations for the same image. So you want to handle the possibility it's already been called, in the function.
accepted answer of: http://stackoverflow.com/q/25217764
upvote count: 3
answers question: http://stackoverflow.com/q/25217764
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39278211
type: Answer
has comment: http://stackoverflow.com/comment/39278052

asp.net-mvc
tags question: http://stackoverflow.com/q/25107601
tags question: http://stackoverflow.com/q/25075747
tags question: http://stackoverflow.com/q/25153756
tags question: http://stackoverflow.com/q/25150396
tags question: http://stackoverflow.com/q/25178890
tags question: http://stackoverflow.com/q/25185490
tags question: http://stackoverflow.com/q/25128770
tags question: http://stackoverflow.com/q/25140755
tags question: http://stackoverflow.com/q/25115346
tags question: http://stackoverflow.com/q/25176397
tags question: http://stackoverflow.com/q/25119281
tags question: http://stackoverflow.com/q/25120056
tags question: http://stackoverflow.com/q/25138425
tags question: http://stackoverflow.com/q/25161280
tags question: http://stackoverflow.com/q/25227311
tags question: http://stackoverflow.com/q/25229436
tags question: http://stackoverflow.com/q/25171052
tags question: http://stackoverflow.com/q/25213904
tags question: http://stackoverflow.com/q/25139665
tags question: http://stackoverflow.com/q/25174964
tags question: http://stackoverflow.com/q/25131133
tags question: http://stackoverflow.com/q/25154055
tags question: http://stackoverflow.com/q/25196823
tags question: http://stackoverflow.com/q/25142325
tags question: http://stackoverflow.com/q/25212591
tags question: http://stackoverflow.com/q/25191036
tags question: http://stackoverflow.com/q/25155306
tags question: http://stackoverflow.com/q/25172343
tags question: http://stackoverflow.com/q/25165834
tags question: http://stackoverflow.com/q/25192022
tags question: http://stackoverflow.com/q/25178166
tag name: asp.net-mvc
tags question: http://stackoverflow.com/q/25111896
tags question: http://stackoverflow.com/q/25159432
tags question: http://stackoverflow.com/q/25187671
tags question: http://stackoverflow.com/q/25081161
tags question: http://stackoverflow.com/q/25190146
tags question: http://stackoverflow.com/q/25089190
tags question: http://stackoverflow.com/q/25079366
tags question: http://stackoverflow.com/q/25138102
tags question: http://stackoverflow.com/q/25141470
tags question: http://stackoverflow.com/q/25145471
tags question: http://stackoverflow.com/q/25152902
tags question: http://stackoverflow.com/q/25113947
tags question: http://stackoverflow.com/q/25183907
tags question: http://stackoverflow.com/q/25084393
tags question: http://stackoverflow.com/q/25152417
tags question: http://stackoverflow.com/q/25191778
tags question: http://stackoverflow.com/q/25197153
tags question: http://stackoverflow.com/q/25221335
tags question: http://stackoverflow.com/q/25157691
tags question: http://stackoverflow.com/q/25225161
tags question: http://stackoverflow.com/q/25183850
tags question: http://stackoverflow.com/q/25104139
tags question: http://stackoverflow.com/q/25088876
tags question: http://stackoverflow.com/q/25118799
type: Tag
tags question: http://stackoverflow.com/q/25094492
tags question: http://stackoverflow.com/q/25207313
tags question: http://stackoverflow.com/q/25123817
tags question: http://stackoverflow.com/q/25177990
tags question: http://stackoverflow.com/q/25194119
tags question: http://stackoverflow.com/q/25214348
tags question: http://stackoverflow.com/q/25090865

http://stackoverflow.com/comment/39098947
has text: Have you ever read what I said?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25110592
score: 0

http://stackoverflow.com/comment/39254721
type: Comment
has text: The solution should be general or it's not useful yeah
type: AnswerComment
comment on: http://stackoverflow.com/a/25205375
score: 0

http://stackoverflow.com/a/25229966
score: 3
has body: There's a big difference between adding properties to Parser.prototype and adding properties to primaryFunction. When you add to Parser.prototype, you're adding properties to a non-function object that is used as the underlying prototype of any object (instance) created via the new Parser expression. But if you add properties to primaryFunction, you're adding those properties to the function object of primaryFunction, directly. The result is that properties added to Parser.prototype become, in effect, methods of instances created via new Parser. Within calls to those "methods," provided they're made normally (instance.init() and similar), this will refer to the instance. But properties added to primaryFunction are methods of the function primaryFunction, not instances created with it. If you call them in the normal way (instance.primaryFunction["*"]()), within the call this is primaryFunction (the function object), not instance. If that's really want you want, then you simply assign them after the fact (you can't do it within the object initializer): Parser.prototype.primaryFunction["*"] = function() { /* ... */ }; But there are relatively few use cases for doing that, not least because if you're using Parser as a constructor function (e.g., with new Parser), you probably want to do things with the instance created, and you won't have access to it in primaryFunction["*"] unless you do some funny stuff. The funny stuff, FWIW, looks like this&nbsp;&mdash; but I'm not recommending it (nor recommending against it), just being complete: /* ...inside the `Parser` function... */ this.primaryFunction["*"] = this.primaryFunction["*"].bind(this); That creates a new function that, when called, will call primaryFunction but setting this to the instance created by new Parser, and saves the resulting function as an "own" property on the instance being created. From your comment below: So my use case is just a parsing object that performs different actions based on what characters…
has comment: http://stackoverflow.com/comment/39300624
downvote count: 0
answers question: http://stackoverflow.com/q/25229861
has comment: http://stackoverflow.com/comment/39301269
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39300845
has comment: http://stackoverflow.com/comment/39301126
has comment: http://stackoverflow.com/comment/39300596
upvote count: 3
has comment: http://stackoverflow.com/comment/39300582
has comment: http://stackoverflow.com/comment/39300543
has comment: http://stackoverflow.com/comment/39301061
type: Answer
accepted answer of: http://stackoverflow.com/q/25229861

http://stackoverflow.com/q/25165387
tagged with: safari
tagged with: bing-maps
type: Question
has body: So i am having an issue in which the bing maps are not rendered completely on Safari 7. They are loaded fine on Chrome and IE. Example - copy and paste the link into Safari 7 on a Mac : http://www.levi.com/GB/en_GB/findAStore As You can see only half the map renders the other half is gray, i get no errors in the console, the only warning i get is: "Invalid CSS property declaration at:* style.css" Is anyone else running into this issue? is there a fix for it?
tagged with: javascript
has answer: http://stackoverflow.com/a/25181101
has answer: http://stackoverflow.com/a/33674591
answer count: 3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Bing Maps Issue on Safari 7
linked to: http://stackoverflow.com/q/26693298
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/26691797

http://stackoverflow.com/comment/39169425
comment on: http://stackoverflow.com/q/25160058
score: 2
type: QuestionComment
type: Comment
has text: You cannot add ASP.NET web controls like that on the client side.

http://stackoverflow.com/q/25081204
type: UnansweredQuestion
tagged with: ibm-mobilefirst
downvote count: 0
tagged with: iframe
tagged with: authentication
type: Question
linked to: http://stackoverflow.com/q/7647042
score: 1
has answer: http://stackoverflow.com/a/33406476
upvote count: 1
has body: Here's the scenario: Worklight studio 6.2 with a Worklight Server and Webseal authentication realm. I'm developing an hybrid app that requires a login (already set up and working) then push to an iframe with server-side content in it (a forum). I followed ibm worklight tutorials for the authentication handler that works just fine. The problem is: after my authentication page is presented and the user input his/her credentials the login will success but in the iframe a new login page (the web page) is presented. So basically I need to push these credentials to the iframe to avoid the redundancy. Authentication Handler: var REALM_HTTPHEADER = 'HeaderAuthRealm'; var LOGIN_FORM_TAM = 'pkmslogin.form'; function showLoginScreen() { $.mobile.changePage("#authPage"); } function showMainScreen() { $.mobile.changePage("#forum"); } var websealRealmChallengeHandler = WL.Client.createChallengeHandler(REALM_HTTPHEADER); var lastRequestURL; websealRealmChallengeHandler.isCustomResponse = function(response) { //A normal login form has been returned. var findLoginForm = response.responseText.search("pkmslogin.form"); if (findLoginForm >= 0) { lastRequestURL = response.request.url; return true; } //Need to also check for errors and handle as appropriate //This response is a worklight server response, handle it normally return false; }; websealRealmChallengeHandler.handleChallenge = function(response) { showLoginScreen(); }; websealRealmChallengeHandler.handleFailure = function(response) { console.log("Error during WebSEAL authentication."); }; websealRealmChallengeHandler.submitLoginFormCallback = function(response) { var isCustom = websealRealmChallengeHandler.isCustomResponse(response); if (isCustom) { websealRealmChallengeHandler.handleChallenge(response); } else { //hide the login screen, we are logged in showMainScreen(); websealRealmChallengeHandler.submitSuccess(); } }; $("#loginButton").click(function(){ var reqURL = "/../../../" + LOGIN_FORM_TAM; var options = {method: "POST…
answer count: 1
tagged with: javascript
has title: Worklight passing login credentials to iframed server-side content
favorite count: 0
tagged with: worklight-security

http://stackoverflow.com/comment/39270151
type: AnswerComment
comment on: http://stackoverflow.com/a/25213563
has text: @hardichidian: Awesome, thanks for schooling me in Easing 101. To add to this, I found a motherload of functions someone stashed away at easings.net. Here they are: https://github.com/ai/easings.net/blob/master/vendor/jquery.easing.js
score: 0
type: Comment

http://stackoverflow.com/q/25086848
upvote count: 0
has body: is there any possibility to access to elements of random website like for example "google.com". If you right click on it you can inspect elements, and I would like to use them in my script. You know how to do it? P.S when I was working with c# or c++(Qt) there were few methods that allows me to access, and they had the same syntax like in javascript. I just want to mention that when I use document.getElementById("xxx"), I think the method is looking for id's in my html file not in external.
answer count: 1
has comment: http://stackoverflow.com/comment/39034178
tagged with: javascript
favorite count: 0
tagged with: element
type: UnansweredQuestion
downvote count: 3
score: -3
has answer: http://stackoverflow.com/a/25086904
has comment: http://stackoverflow.com/comment/39034202
has title: [javascript]Access to elements of random website
type: Question

http://stackoverflow.com/a/25125896
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25125762
answers question: http://stackoverflow.com/q/25125762
has comment: http://stackoverflow.com/comment/39107252
type: AcceptedAnswer
upvote count: 2
type: Answer
has body: http://jsfiddle.net/isherwood/Z6N65/2/ $('#myTable a').click(function () { $(this).closest('tr').find('td').eq(1).text($(this).text()); }); http://api.jquery.com/click http://api.jquery.com/closest http://api.jquery.com/find http://api.jquery.com/eq http://api.jquery.com/text UPDATE: If you need to be more specific about which anchors get the click function, do this: http://jsfiddle.net/isherwood/Z6N65/4/ $('#myTable td').eq(3).find('a').click(function () { $(this).closest('tr').find('td').eq(1).text($(this).text()); }); It will only apply the click function to anchors in column 4.

http://stackoverflow.com/a/25141763
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/25140501
accepted answer of: http://stackoverflow.com/q/25140501
type: AcceptedAnswer
has body: I'd suggest not to use the jQuery plugin, but rather use the underlaying data directly. Simpleweather uses a yahoo API to retrieve the weather information. In order to get the weather information in a easy to use JSON format, you can use yahoo's Query language 1. Get the location ID For example if I wanted to get the weather information in "Stockholm, Sweden" I could query for SELECT woeid FROM geo.places where text="Stockholm, Sweden" LIMIT 1 which would return "woeid": "906057" [Execute YQL] 2. Get the weather info Now it's time to use the location ID we retrieved in the previous step. SELECT item.condition.temp FROM weather.forecast WHERE woeid = 906057 This will return "temp": "81" [Execute YQL] Automating it In order to programaticaly receive the temperature in node, I'd suggest using the request module. You can copy the API endopint from the query builder page. In this example it would be https://query.yahooapis.com/v1/public/yql?q=SELECT%20item.condition.temp%20FROM%20weather.forecast%20WHERE%20woeid%20%3D%20906057&amp;format=json I guess you could easily go from here, but I'll incldue a simple node example for the sake of completeness: var request = require('request'); var url = 'https://query.yahooapis.com/v1/public/yql?q=SELECT%20item.condition.temp%20FROM%20weather.forecast%20WHERE%20woeid%20%3D%20906057&amp;format=json'; request(url, function (err, resp, body) { if (err || resp.statusCode != 200) return console.log('Could not get weather information'); var json = JSON.parse(body); console.log('Temperature in Stockholm:', json.query.results.channel.item.condition.temp); });
has comment: http://stackoverflow.com/comment/39135835
type: Answer
has comment: http://stackoverflow.com/comment/39135917
score: 2

http://stackoverflow.com/q/25115931
type: Question
tagged with: algorithm
has comment: http://stackoverflow.com/comment/39090733
has answer: http://stackoverflow.com/a/25128418
score: 0
answer count: 1
tagged with: javascript
has title: Getting the closest point in a direction in JavaScript
has comment: http://stackoverflow.com/comment/39090110
has body: Lets say I have a 2D coordinate system with lots of Rects on it. Take this as an example representation. I now want to get the nearest next element in a given direction. Lets use this image as an example: S defines the element at which I currently am. If I press up I should now be at the closest element in upwards direction which is A. My current approach was something like this: Distance = abs((S.x-A.x)+(S.y-A.y); Angle = abs(atan2((A.y - S.y), (A.x - S.x)) * 180 / Math.PI); Score = Distance + abs(DirectionAngle-Angle) Then I choose the candidate based on the lowest score. Now there are multiple problems: Iteration happens for ALL elements, not only those upwards. The elements are not considered if they're in the opposite direction but the elements to the left and right are still in the calculation. If A for some reason extends 3 more pieces to the left it won't work anymore and B is selected. So what I need is a solution to only iterate over elements in the direction AND a smart solution to only select the closest element and then stop and return the element. Btw. the elements are actually divs so canvas is not an option.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39092908
has comment: http://stackoverflow.com/comment/39095764
has comment: http://stackoverflow.com/comment/39088397

http://stackoverflow.com/comment/39158425
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25153798
type: Comment
has text: did you see something in console? any bug report?

http://stackoverflow.com/comment/39118863
has text: You might prefer to simply use other markup than P. P stands for paragraph. Paragraphs usually have more than 2-3 words.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25132487
score: 3

cookies
tags question: http://stackoverflow.com/q/25154515
tags question: http://stackoverflow.com/q/25189681
tags question: http://stackoverflow.com/q/25118869
tags question: http://stackoverflow.com/q/25143596
tags question: http://stackoverflow.com/q/25206418
type: Tag
tags question: http://stackoverflow.com/q/25112057
tags question: http://stackoverflow.com/q/25194526
tags question: http://stackoverflow.com/q/25122189
tags question: http://stackoverflow.com/q/25102637
tags question: http://stackoverflow.com/q/25128005
tags question: http://stackoverflow.com/q/25164093
tags question: http://stackoverflow.com/q/25211095
tags question: http://stackoverflow.com/q/25095353
tags question: http://stackoverflow.com/q/25211271
tags question: http://stackoverflow.com/q/25216223
tags question: http://stackoverflow.com/q/25105941
tags question: http://stackoverflow.com/q/25087540
tags question: http://stackoverflow.com/q/25119217
tags question: http://stackoverflow.com/q/25184303
tags question: http://stackoverflow.com/q/25199386
tags question: http://stackoverflow.com/q/25120541
tag name: cookies
tags question: http://stackoverflow.com/q/25185540
tags question: http://stackoverflow.com/q/25188416
tags question: http://stackoverflow.com/q/25168402
tags question: http://stackoverflow.com/q/25218347
tags question: http://stackoverflow.com/q/25124505

http://stackoverflow.com/comment/39260165
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25207491
has text: Without the rest of your code, it's hard to give better answers.
score: 0

http://stackoverflow.com/q/25223246
accepted answer: http://stackoverflow.com/a/25459323
tagged with: calendar
type: Question
tagged with: javascript
answer count: 1
has body: I m trying to integrate ui-calendar(https://github.com/angular-ui/ui-calendar) into an angular app and getting errors.I generated the structure of the app with yeoman and then tried integrating ui-calendar into the app but i get following errors Loading "imagemin.js" tasks...ERROR >> Error: Cannot find module 'imagemin-gifsicle' Running "newer:jshint" (newer) task Running "newer:jshint:all" (newer) task Running "jshint:all" (jshint) task app/scripts/calendar.js line 16 col 7 Missing "use strict" statement. line 45 col 18 Strings must use singlequote. line 141 col 22 Did you mean to return a conditional instead of an assignment? line 172 col 5 Missing "use strict" statement. line 12 col 5 'Appointment1App' is defined but never used. line 254 col 60 'oldTokens' is defined but never used. line 254 col 49 'newTokens' is defined but never used. line 262 col 48 'oldO' is defined but never used. line 262 col 43 'newO' is defined but never used. ✖ 9 problems Warning: Task "jshint:all" failed. Use --force to continue. Aborted due to warnings. Here is the code in my controller.js file var Appointment1App = angular.module('ui.calendar', []) .constant('uiCalendarConfig', {}) .controller('uiCalendarCtrl', ['$scope', '$timeout', function($scope, $timeout){ var sourceSerialId = 1, eventSerialId = 1, sources = $scope.eventSources, extraEventSignature = $scope.calendarWatchEvent ? $scope.calendarWatchEvent : angular.noop, wrapFunctionWithScopeApply = function(functionToWrap){ var wrapper; if (functionToWrap){ wrapper = function(){ // This happens outside of angular context so we need to wrap it in a timeout which has an implied apply. // In this way the function will be safely executed on the next digest. var args = arguments; var _this = this; $timeout(function(){ functionToWrap.apply(_this, args); }); }; } return wrapper; }; this.eventsFingerprint = function(e) { if (!e.__uiCalId) { e.__uiCalId = eventSerialId++; } // This extracts all the information we need from the event. http:…
has answer: http://stackoverflow.com/a/25459323
tagged with: yeoman-generator-angular
tagged with: angularjs
tagged with: yeoman
type: AnsweredQuestion
has title: Problems with integrating ui-calendar into angular app
score: 0

http://stackoverflow.com/a/25079750
has body: Rhail's solution continually check for a hash change. Here is a variation which only looks for the hash on a bad hashes array on the initial load var bad_hashes = ['#bad1','#bad2']; if (bad_hashes.indexOf(hash) != -1){ alert('bad hash!'); }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25079293

http://stackoverflow.com/comment/39112308
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25128308
type: Comment
has text: Alnitak comment was pretty informing: "_ES5 specifically says that an object is an unordered set of key/value pairs_" and aduch answer also: "_object keys are sorted in lexicographic order OR not, ecma5 does not force to do either way._", so no, it's not possible.

http://stackoverflow.com/q/25198290
has answer: http://stackoverflow.com/a/25199195
tagged with: asp.net
favorite count: 0
tagged with: wcf
has answer: http://stackoverflow.com/a/25198642
type: UnansweredQuestion
has body: I'm creating a host application (C#) for a ASP.NET application. What I'd like to accomplish is having the ASP application getting events from the C# application. With this data I need to call a server side function with the HTTP Context/session from the ASP client side. It's possible to just refresh the page with a querystring. I currently have two approaches: 1) C# WCF with net.tcp to ASP Issue: Session (HTTP context) is NULL when directly contacting the server side layer. I can update static variables and so on, but I'm not able to tell the client side to refresh/navigate with a querystring (so I can get the context at next page_load). 2) C# WebBrowser.Document.InvokeScript(myJavascript()) Issue: I'm not able to reach static variables (they're for some reason NULL) when I reach the server side on the ASP application. I've tried using Session["MyVariable"] = "test"; in a page_load, invoke the javascript function and check the session variable, but this is NULL. Any help or pointings to the right direction would be very helpful. If needed I'll attach some code examples. Thanks! Edit 1: From my WebBrowser all I can see is the Default.aspx page, so when creating javascript function from issue #2, I need to create this in this file. If not I'm not able to invoke it.
upvote count: 1
has title: Communication from a C# application to an ASP.NET application
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/25198877
score: 1
answer count: 3
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39295852
type: AnswerComment
score: 0
type: Comment
has text: It is just for your case, because you want to use javascript from external file. And I want to let you know it is not basically javascript file. It is just a .jsp file whose matter is to be added after parsing it by container. So browser cannot get the expected result if you call this file directly.
comment on: http://stackoverflow.com/a/25182632

http://stackoverflow.com/q/25137825
score: 0
has answer: http://stackoverflow.com/a/25273411
has title: In ng-grid gridOptions.$gridScope.columns is changed twice on hide/show columns
has comment: http://stackoverflow.com/comment/39288665
has comment: http://stackoverflow.com/comment/39131866
tagged with: angularjs
has body: Question 1: Why $scope.$watch('gridOptions.$gridScope.columns', function(newv, oldv) { console.log('Changed'); } is called twice when I hide/show a column manually (using showColumnMenu:true in code), but it is called only one time when I reorder/sort columns manually (using enableColumnReordering:true in code)? I observed that if I use: // column number 0 $scope.$watch('gridOptions.$gridScope.columns[0]', function(newv, oldv) { console.log('Changed'); } and I show/hide a column that is not 0 (E.g.: hide column 5) the function is called (not twice). So, I believe that on hide/show the whole ng-grid is changed, then only that column is changed. How can I see which are the events for every situation ? Question 2: How can I stop the second call or the first call of the function ? I tried to debug the following pieces of code from AngularJS: if ((watchers = current.$$watchers)) { // process our watches length = watchers.length; ... watch.fn(value, ((last === initWatchVal) ? value : last), current); ... // in the case user pass string, we need to compile it, do we really need this ? if (!isFunction(listener)) { var listenFn = compileToFn(listener || noop, 'listener'); watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);}; } and I could observe that watchers[4] and watchers[5] have the same "exp" (gridOptions.$gridScope.columns) and watchers[5] has my function as fn while watchers[4] has a function that calls listenFn(scope). I also tried to use $gridScope.renderedColumns, but there was the same problem.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25273411
tagged with: watch
linked to: http://stackoverflow.com/q/23419722
type: Question
answer count: 1
tagged with: javascript
tagged with: show-hide
tagged with: ng-grid

http://stackoverflow.com/comment/39081218
type: QuestionComment
has text: you can use like this in javascript. document.write(document.URL);
comment on: http://stackoverflow.com/q/25112272
score: 0
type: Comment

http://stackoverflow.com/comment/39124651
type: Comment
type: QuestionComment
score: 0
has text: Did you try with socket.io file upload module ? Maybe the problem is with this package ... I use socket.io 0.9. Please, see the post update. I've added the full client - server code. I've not added the HTML part. It's just a modal window opened by a click on an image you want to change. `<a title="Icon Actions" class="icon_actions" data-toggle="modal" href="#icon_action_modal" data-icon="<%= icon %>">`. TY for your help
comment on: http://stackoverflow.com/q/25083564

http://stackoverflow.com/comment/39269755
comment on: http://stackoverflow.com/a/25213459
type: AnswerComment
type: Comment
has text: The OP specified plain Javascript, not jQuery.
score: 4

http://stackoverflow.com/comment/39149585
has text: Can you see anything in your developer tools, an error in the console, or a network call that fails in the network profiler tab? Perhaps you can put a `debugger;` call before `r.$save` to see what happens when you step over it?
comment on: http://stackoverflow.com/q/25148604
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39190936
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25170400
type: AnswerComment
has text: could you please see my edited question; I edited it now ; mentioned my desired out put; could you please help me with that please; appreciate your help in advance

http://stackoverflow.com/comment/39200732
score: 0
type: AnswerComment
type: Comment
has text: The newest, so I guess that'd be 11 :) Not sure what nesting HTML tags mean, but I'm only touching the css, that's the only job, haven't gotten the HTML my self, besides F12 :)
comment on: http://stackoverflow.com/a/25176144

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

http://stackoverflow.com/q/25132028
tagged with: node.js
score: 1
has body: Is there a way to use node module "request" multiple times in one route and have the results display on the same rendered ejs template page? Goal: I want to display eBook information from the iTunes Store using their Search API. Right now I can get an ebook's price in one territory, but I would like to display prices for the same ebook in multiple countries. To get each different price, I need to use a different URL, either a default ending, "&amp;country=gb", "&amp;country=fr" etc. I can get prices for each of the 5 countries I am interested in, but I can't get them all on the same page. How can I construct my route and prepare my variables so that I can display information from all of these countries when I render one page? I am using node, express and ejs, and I am making the http request using the "request" node module. Here are the basics of the form I'm using, where I enter the ISBN in the searchTerm field. (there's more, but it's bulky.) &lt;form action="/search"&gt; &lt;select name="searchTerm"&gt; Code that is working now for getting info on the book in one territory: app.get('/search', function(req, res){ var searchRequest = req.query.searchTerm; var searchURL = "http://itunes.apple.com/lookup?isbn=" + searchRequest; request(searchURL, function(error, response, body){ if (!error &amp;&amp; response.statusCode == 200) { var data = JSON.parse(body); console.log(data.results[0]); var iTunesResults = data.results[0]; res.render("test", { iTunesResults: iTunesResults, searchRequest: searchRequest }); } }); }); If I make a few changes in this code I can get information on the same ebook in a different country with just a few changes. Below is the code for great britain, and it works on its own, I just want to get results from both of these searches displaying at once, and I'm not sure where to begin. app.get('/search', function(req, res){ var searchRequest = req.query.searchTerm; var gbSearchURL = "http://itunes.apple.com/lookup?isbn=" + searchRequest + "&amp;co…
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39145479
downvote count: 0
tagged with: javascript
tagged with: express
tagged with: ejs
answer count: 1
favorite count: 0
type: UnansweredQuestion
has title: Can I use npm request multiple times in one route and have the results display on the same page?
tagged with: request
has answer: http://stackoverflow.com/a/25148654

http://stackoverflow.com/a/25229508
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25228975
has body: I think the problem may be in use of setOnLoadCallBack. It should not be inside a success callback of AJAX call. It is basically a request to load chart library and upon completion doing something. I would suggest something along these lines &lt;script type="text/javascript"&gt; var data2 = 4; google.load('visualization', '1.0', { 'packages' : [ 'corechart' ]}); function getData() { var firstname = $('#firstname').val(); $.ajax({ type : "POST", url : "profile.html", data : "firstname=" + firstname, success : function(response) { alert(response); data2 = parseInt(response); drawChart(data2); } }); } function drawChart(data2) { var data = google.visualization .arrayToDataTable([ [ 'Stories', 'Number' ], [ 'Tested', data2 ], [ 'Untested', 10 ] ]); var options = { title : 'Backlog Items : Test Coverage', 'width' : 300, 'height' : 260, legend : 'bottom' }; var chart = new google.visualization.PieChart(document .getElementById('storyChart')); chart.draw(data, options); window.setTimeout(getData, 10000); } google.setOnLoadCallback(drawChart(data2)); &lt;/script&gt; It is just a sample where chart is loaded when chart library is loaded and then after ten seconds getData is called to retrieve data and update chart. Obviously you could want some other way to trigger update of the chart then timeout (I don't know you use case, maybe on button click?)
has comment: http://stackoverflow.com/comment/39299956

http://stackoverflow.com/a/25098277
has comment: http://stackoverflow.com/comment/39058981
has comment: http://stackoverflow.com/comment/39059600
accepted answer of: http://stackoverflow.com/q/25097520
has comment: http://stackoverflow.com/comment/39063461
has body: I assume you are using mongoose. Try updated.markModified('attendees'); before updated.save call. Regarding pushing the currentUser, do something equivalent to event.attendees.push({__v: 0 _id: "53dd72fb5a24aa781a3cbde8" email: "test@test.com" name: "Test User" provider: "local" role: "user"}) i.e just push the relevant fields.
answers question: http://stackoverflow.com/q/25097520
type: Answer
has comment: http://stackoverflow.com/comment/39060828
score: 1
has comment: http://stackoverflow.com/comment/39063534
has comment: http://stackoverflow.com/comment/39059731
upvote count: 1
has comment: http://stackoverflow.com/comment/39059121
has comment: http://stackoverflow.com/comment/39063436
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39063009

http://stackoverflow.com/comment/39264394
score: 0
type: AnswerComment
type: Comment
has text: The script is registered and queued before it is called. The is a shortcode which fires the php code and the PHP code above is from the function registered with add_shortcode. It is getting called properly.
comment on: http://stackoverflow.com/a/25210175

http://stackoverflow.com/q/25104400
has answer: http://stackoverflow.com/a/25104446
tagged with: angularjs
has body: We are using AngularJS to do like/unlike behavior for our app. Code for HTML: Like Code for the controller: myApp.controller("newsFeedCtrl", function ($scope, $http) { console.log("inside newsFeedCtrl"); $scope.post() = function() { console.log("posting"); } $scope.likePost = function(postId) { console.log("liking post"); } }); The problem is, when we click on like, it also calls post() function, that should not be happening. Are we missing anything here?
accepted answer: http://stackoverflow.com/a/25104603
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39066474
downvote count: 1
has comment: http://stackoverflow.com/comment/39066303
type: Question
tagged with: java
score: -1
has title: Why using anchor's ng-click is also calling a post()?
has answer: http://stackoverflow.com/a/25104603
answer count: 2
upvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39066355
favorite count: 0
possible better answer: http://stackoverflow.com/a/25104446

http://stackoverflow.com/comment/39116410
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25131063
has text: Oh. It's a match.join not a replace. sorry.
score: 0

http://stackoverflow.com/comment/39289814
comment on: http://stackoverflow.com/q/25224367
score: 0
has text: *"...when changing the selection it just adds on to the end..."* That's what you've **told** it to do. `str += data.id;` (or `str += checkedValue;`) **adds to** `str`, it doesn't *replace* its value. To replace the value in `str`, use `=`, not `+=`.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25225836
has body: I'm starting to try converting some of my AppleScripts into JavaScript in OS X Yosemite, but I don't understand how I'm supposed to access enums from applications. For example - the status of Adium. In AppleScript: tell application "Adium" if status type of global status is offline then log "offline" end if end tell In JavaScript I do not know how to access the "offline" enum: if(Application('Adium').globalStatus.statusType == ?????) { console.log("offline"); } I've tried simple things like "offline" without success. All these are errors: Application('Adium').StatusType("offline"); // error Application('Adium').StatusType.offline; // undefined Application('Adium').StatusType.make({name:"offline"}); // error Anyone gotten something like this working?
has title: OSX Yosemite - JavaScript for Automation Accessing Enums
answer count: 1
tagged with: javascript-automation
tagged with: macos
upvote count: 5
has answer: http://stackoverflow.com/a/25246186
accepted answer: http://stackoverflow.com/a/25246186
tagged with: applescript
type: AnsweredQuestion
downvote count: 0
favorite count: 0
tagged with: osx-yosemite-beta
type: Question
score: 5
tagged with: javascript

http://stackoverflow.com/comment/39209219
comment on: http://stackoverflow.com/a/25179876
has text: Sorry bro, I'm not getting you properly
type: AnswerComment
score: 0
type: Comment

desire2learn
tags question: http://stackoverflow.com/q/25147138
tag name: desire2learn
type: Tag

http://stackoverflow.com/comment/39190168
type: QuestionComment
has text: It is almost certainly a security exception. But have you tried the approach here: http://stackoverflow.com/questions/9616426/javascript-print-iframe-contents-only
comment on: http://stackoverflow.com/q/25170285
score: 0
type: Comment

http://stackoverflow.com/comment/39166832
type: QuestionComment
comment on: http://stackoverflow.com/q/25157936
score: 1
has text: You can use `$("input[required]")` to get all the input elements that contain a `required` attribute
type: Comment

http://stackoverflow.com/comment/39316844
comment on: http://stackoverflow.com/a/25160607
score: 0
type: AnswerComment
type: Comment
has text: Eg with jQuery: $(window).resize(function(){ $(div).css('width',function(){return $(this).width()-$(window).width()/100 }) });

http://stackoverflow.com/comment/39111445
score: 1
has text: ...Glad to help. Opacity is a blending operation while drawing a solid rectangle is a replacing operation. Blending requires multiple reads and calculations per pixel===slower. Replacing is simply setting a pixel color===faster.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25090578

http://stackoverflow.com/q/25224869
tagged with: scrollbar
type: Question
answer count: 1
tagged with: javascript
has body: I have a div with with the following css: .long-table-container { overflow-x: auto; } Instead of attaching scrollbars to .long-table-container, I would like to instead use the browser's scrollbars to do the job. Is this possible? The reason I need to do this is because I have a long table in .long-table-container and the only way to scroll left and right is by scrolling all the way to the bottom of the page and then moving horizontal scroller of .long-table-container which is a pain for any user. Fiddle: http://jsfiddle.net/ox5qzp1x/
has answer: http://stackoverflow.com/a/25228122
has title: How to move a div's scrollers to the browser?
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39290979
has comment: http://stackoverflow.com/comment/39292749
tagged with: css
has comment: http://stackoverflow.com/comment/39290771
linked to: http://stackoverflow.com/q/24812919

http://stackoverflow.com/q/25090299
has comment: http://stackoverflow.com/comment/39040881
answer count: 1
tagged with: javascript
score: 0
tagged with: asynchronous
tagged with: node.js
type: AnsweredQuestion
has body: I am attempting to dynamically load a series of anonymous functions and execute them, passing the results of the previous to the next. Here is an example function: module.exports = function (data) { // do something with data return (data); } When the functions are loaded (they all sit in separate files) they are returned as an object: { bar: [Function], foo: [Function] } I would like to execute these functions using async.waterfall. This takes an array of functions, not an object of functions, so I convert as follows: var arr =[]; for( var i in self.plugins ) { if (self.plugins.hasOwnProperty(i)){ arr.push(self.plugins[i]); } } This gives: [ [Function], [Function] ] How can I now execute each function using each async.waterfall passing the result of the previous function to the next? SOLUTION Thanks to the comments from @piergiaj I am now using next() in the functions. The final step was to make sure that a predefined function was put first in the array that could pass the incoming data: var arr =[]; arr.push(function (next) { next(null, incomingData); }); for( var i in self.plugins ) { if (self.plugins.hasOwnProperty(i)){ arr.push(self.plugins[i]); } } async.waterfall(arr,done);
tagged with: waterfall
has answer: http://stackoverflow.com/a/25090583
accepted answer: http://stackoverflow.com/a/25090583
type: Question
has title: Node.js async module waterfall - dynamically load and execute functions

http://stackoverflow.com/a/25100323
type: Answer
has body: Create an event observer for the controller_action_layout_generate_blocks_after event, and then in your observer method use the Magento core/layout object to get reference to the content block (or before_body_end, or any of the text/list containers), and then append a new block (created with createBlock) to this block. If you're unclear on the Magento terminology above, google searches and specific, targeted questions here and on the Magento Stack Exchange will get you where you need to be. Good luck!
score: 2
upvote count: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25099945

http://stackoverflow.com/comment/39205292
type: QuestionComment
has text: Can you post the code you're using?
score: 0
comment on: http://stackoverflow.com/q/25179078
type: Comment

http://stackoverflow.com/q/25224670
answer count: 1
has title: Browserify compiling to full system paths (using watchify & gulp)
downvote count: 0
tagged with: gulp
favorite count: 0
tagged with: watchify
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: system-paths
type: Question
has answer: http://stackoverflow.com/a/26112885
has body: I am coming from AMD and seem to already be doing something wrong. I have made a setup like this: client/js/index.js (entry point) client/js/test.js I want it to build to: build/app.js index.js requires in test.js like this: var test = require('./test'); My gulp watchify task looks like this: var gulp = require('gulp'); var gutil = require('gulp-util'); var browserify = require('browserify'); var source = require('vinyl-source-stream'); var watchify = require('watchify'); // https://github.com/gulpjs/gulp/blob/master/docs/recipes/fast-browserify-builds-with-watchify.md gulp.task('watch', function () { var bundler = watchify(browserify('./client/js/index.js', watchify.args)); bundler.on('update', rebundle); function rebundle () { return bundler.bundle() // Log errors if they happen. .on('error', function(e) { gutil.log('Browserify Error', e.message); }) .pipe(source('app.js')) .pipe(gulp.dest('./build')); } return rebundle(); }); The compiled code looks wrong though, for test.js I see absolute local paths that surely are either broken or redundant for anyone consuming the code? P.S. I am running the task with no args (just gulp watch) (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&amp;&amp;require;if(!u&amp;&amp;a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&amp;&amp;require;for(var o=0;o&lt;r.length;o++)s(r[o]);return s})({"./client/js/index.js":[function(require,module,exports){ var test = require('./test'); var ab = function(a, b2) { return a + b2; }; module.exports = ab; },{"./test":"/Users/dtobias/Sites/browserify-test/client/js/test.js"}],"/Users/dtobias/Sites/browserify-test/client/js/test.js":[function(require,module,exports){ var helloworld = function () { console.log('hello world'); }…
tagged with: javascript
accepted answer: http://stackoverflow.com/a/26112885
tagged with: browserify

http://stackoverflow.com/a/51234506
has body: you can use this code : $("#programid").val(["number:2", "number:3"]).trigger("change"); where 2 in "number:2" and 3 in "number:3" are id field in object array
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25187926
downvote count: 0

google-chrome-devtools
tags question: http://stackoverflow.com/q/25089958
tags question: http://stackoverflow.com/q/25145416
tags question: http://stackoverflow.com/q/25214874
tags question: http://stackoverflow.com/q/25167390
tags question: http://stackoverflow.com/q/25128330
tags question: http://stackoverflow.com/q/25213732
type: Tag
tags question: http://stackoverflow.com/q/25130876
tag name: google-chrome-devtools
tags question: http://stackoverflow.com/q/25141483

http://stackoverflow.com/a/25129598
answers question: http://stackoverflow.com/q/25127290
has body: You can use a "timeofday" data type for a 24-hour chart. The "timeofday" data type takes an array of 4 values: [hours, minutes, seconds, milliseconds], so 6:31:18 PM would be input as [18, 31, 18, 0]. var data = google.visualization.arrayToDataTable([ ['Time of day', 'Sales', 'Expenses'], [[3, 30, 15, 0], 1000, 400], [[7, 21, 56, 0], 1170, 460], [[12, 49, 17, 0], 660, 1120], [[19, 41, 47, 0], 1030, 540] ]); see an example here: http://jsfiddle.net/asgallant/mC9Q4/
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25127290
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39191885
comment on: http://stackoverflow.com/q/25171584
has text: Hm, I'm not quite sure how jsfiddle works... maybe not...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39124655
type: AnswerComment
comment on: http://stackoverflow.com/a/25135447
type: Comment
has text: thanks again. I tried exactly that before I asked, but did a typo for the call "this.hello(}" ... I guess this means I need a short break. :-) have a good day!
score: 0

http://stackoverflow.com/a/25133707
has body: Make sure you are having following files linked to your project bootstrap.min.js and then add this script to your page! $('a.close').on('click', function() { $(this).parent().hide(); });
type: Answer
answers question: http://stackoverflow.com/q/25133593
score: 0

http://stackoverflow.com/a/29160712
type: Answer
has body: I also faced same kind of issue while migrating from IE 7 to higher version. what i observe was the level of hierarchy and abstraction has been changed now . So in your case you can try that : document.all["div2"][0].innerHTML.XMLDocument.transformNode(xslData.documentElement) I hope that will work.
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25140476
downvote count: 0

http://stackoverflow.com/q/25190508
has title: Color of the bar behind the candlestick
tagged with: google-visualization
downvote count: 0
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25192151
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/42259942
has answer: http://stackoverflow.com/a/42259942
favorite count: 0
type: Question
answer count: 2
tagged with: css
has answer: http://stackoverflow.com/a/25192151
has body: How can I change the bar BEHIND the candlestick in Google Charts Api? candlestick:{fallingColor:{fill:"red", strokeWidth:0.5,stroke:'black'}, risingColor:{fill:"yellowgreen",strokeWidth:0.5,stroke:'black'}}} stroke option changes the color of the box, but not the stick behind. I get this weird color combination of black box with green or red and a blue stic. Cannot find it in the docs
upvote count: 3

http://stackoverflow.com/q/25073587
tagged with: back-button
linked to: http://stackoverflow.com/q/2063742
accepted answer: http://stackoverflow.com/a/25150762
type: AnsweredQuestion
has title: Preventing reloading Ajax data when back-button is clicked in both Chrome and IE
has comment: http://stackoverflow.com/comment/39011499
linked to: http://stackoverflow.com/q/22150960
has comment: http://stackoverflow.com/comment/39032306
type: Question
answer count: 2
has body: I am currently working on a website in which the home page displays the most recent 10 blog entries. When I scroll down, and when I reach almost the end of the last item on screen, another 10 blog entries are automatically loaded, and so on (this is the infinite scrolling feature). If a user clicks on any blog entry, then he/she is taken to another page to display the details about that blog entry. When the user clicks the back button, he/she is taken to the home page that has the entries displayed. Please note, the home page loads the data using Ajax. Assume the following scenario: A user goes to the site, and entries 1 to 10 are loaded (via Ajax). The user scrolls down, and the next 10 entires, specifically entries 11 to 20 are loaded (via Ajax as well). Note that the page now has entires 1 to 20 displayed. The user scrolls further down, and now entries 21 through 30 are loaded, for a total of 1 through 30 blog entries being displayed on the page. The user clicks on entry 25, and the page for entry 25 is displayed. The user clicks the back button, and all items, 1 through 30 are displayed. Now, if the users uses FireFox, Opera, or Safari, and when that user performs step 5 (i.e, clicks the back button to go back to the home page) then the blog entries are just displayed on screen, and without being re-loaded. However using IE and on Chrome, when the user clicks on the back button, the page is reloaded, and only items 1 through 10 are displayed. I do not like the IE and Chrome behaviour. The user should see items 1 though 30. How can I ensure all browsers behave like FireFox? Thanks. Update Here is the code I am using First, hers is my html And here is my jQuery /** * * This file uses a bunch of programming concepts, but the most important one is ensuring ajax calls run as a critical section * ... (this means if ajax is already called, then another instance of JavaScript cannot get into the critical section) * * .. For more details, please read: http://stackoverflo…
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39033318
upvote count: 8
tagged with: infinite-scroll
has comment: http://stackoverflow.com/comment/39009014
has answer: http://stackoverflow.com/a/25086413
linked to: http://stackoverflow.com/q/158319
score: 8
favorite count: 0
has comment: http://stackoverflow.com/comment/39032237
has answer: http://stackoverflow.com/a/25150762
possible better answer: http://stackoverflow.com/a/25086413

http://stackoverflow.com/q/25091777
score: 2
upvote count: 3
has title: Can not get content with special character URL in javascript?
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25091828
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/25091830
has answer: http://stackoverflow.com/a/25091826
favorite count: 0
type: UnansweredQuestion
has body: I'm using javascript to get html content from url. I'm follow code in below : function getContentHTML(theUrl) { $.ajax({ url: theUrl, crossDomain: true, success: function (data) { $("#divcontent").html(data); } }); } If URL is in English(ex : bbc.com,voa.com....),It will be ok,but if url have contain special character, I can not get content.How can I slove?U can test in my URL. URL : https://tw.news.yahoo.com/%E7%A9%BA%E9%9B%A3%E8%BB%8D%E6%96%B9%E5%A4%A7%E6%94%B9%E5%8F%A3-%E7%A2%BA%E5%AF%A6%E6%9C%89%E4%BB%8B%E5%85%A5%E8%88%AA%E7%AE%A1-120050818.html

http://stackoverflow.com/q/25115411
favorite count: 0
upvote count: 4
tagged with: topojson
tagged with: http://stackoverflow.com/tag/svg
has body: The demo I'm working on is based on World tour, which uses canvas instead of SVG, so I cannot attach mouse event to country path to find what country was clicked. Is there any way to find which feature contains lat/long I get from mouse coordinates? var canvas = d3.select("canvas") .on("mousemove", function() { var p = d3.mouse(canvas.node()); console.log(projection.invert(p)); // which country contains these coordinates? }); var countries; queue() .defer(d3.json, 'world-110m.json.txt') .defer(d3.tsv, 'world-country-names.tsv') .await(function ready(error, world, names) { countries = topojson.feature(world, world.objects.countries).features; });
tagged with: d3.js
type: UnansweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/29960403
has comment: http://stackoverflow.com/comment/46134858
type: Question
tagged with: canvas
has title: Find topojson feature by latitude longitude
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39597504
score: 4

http://stackoverflow.com/comment/39158172
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25153559
type: Comment
has text: Thank you for the correction. I was wondering how I could fix the weird indents... xD

http://stackoverflow.com/q/25156741
has comment: http://stackoverflow.com/comment/39163875
type: Question
has title: Match the row height of parent and child table cells
has comment: http://stackoverflow.com/comment/39163804
tagged with: javascript
tagged with: html-table
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39166587
has answer: http://stackoverflow.com/a/25183848
has comment: http://stackoverflow.com/comment/39164067
has comment: http://stackoverflow.com/comment/39165508
tagged with: jquery
has body: I have a child table inside the table. There is rowspan used to to insert a new table. Now my question is when the content of the main table cell increases, the child row of respective cell also should get extended. Here is the table structure Col 1 Col 2 Sub col 1 Sub col 2 Sub col 1 Sub col 2 Col 4 Col 1 Col 2 When the content of this cell increases I want the 2nd (respective) row of child table also to extend accordingly. Col 1 Col 2 Col 4 FIDDLE
favorite count: 0
has comment: http://stackoverflow.com/comment/39164274
has comment: http://stackoverflow.com/comment/39163932
tagged with: css
downvote count: 0
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39165209

http://stackoverflow.com/comment/39213117
type: Comment
has text: is there a function in Jquery similar to outerHTML ?
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25183183

http://stackoverflow.com/a/25112342
upvote count: 2
has body: Please try with this code handler = Gmaps.build('Google'); handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){ markers_json = &lt;%=raw @json.to_json %&gt;; Gmaps.markers = _.map(markers_json, function(marker_json){ marker = handler.addMarker(marker_json); _.extend(marker, marker_json); return marker; }); handler.bounds.extendWith(Gmaps.markers); handler.fitMapToBounds(); }); for manage event try with this code handler.clusterer.clear(); $.each(Gmaps.markers, function(i, marker) { if(filters.length &lt; 1){ marker.show(); handler.clusterer.addMarker(marker) }else if(filters.indexOf(marker.type) &gt; -1){ handler.clusterer.addMarker(marker); marker.show(); }else{ marker.hide(); handler.clusterer.removeMarker(marker); } });
accepted answer of: http://stackoverflow.com/q/25076537
answers question: http://stackoverflow.com/q/25076537
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2

http://stackoverflow.com/comment/39242058
comment on: http://stackoverflow.com/q/25198594
score: 0
type: Comment
type: QuestionComment
has text: What is unclear there? There are several lines, separated by ` `. When you clicked at one of these lines, number of ` ` before this line should be alerted.

http://stackoverflow.com/q/25228648
upvote count: 3
has answer: http://stackoverflow.com/a/25294808
tagged with: c#
tagged with: local
tagged with: network-programming
tagged with: javascript
has comment: http://stackoverflow.com/comment/39421890
has comment: http://stackoverflow.com/comment/39325537
accepted answer: http://stackoverflow.com/a/25294808
type: AnsweredQuestion
score: 3
tagged with: websocket
downvote count: 0
has answer: http://stackoverflow.com/a/25302512
favorite count: 0
has title: websocket can´t reach local network client service
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25302512
has body: Having some trouble with websocket-connection within the local network. Scenario: For my laptop (Win7) I've written a service which opens a websocket-server to port 2014. Because websockets aren't enabled by default for windows 7 I'm using the supersocket library ( http://www.supersocket.net/ ). For the Client I've written a android app with sencha touch and Phonegap. To enable websocket- support for android devices with version lower 4.4 I've integrated the phonegap websocket- pugin. The reason is to open a websocket-connection between the android device and the laptop to control the laptop by the android app. Both devices are members of the same local network. The problem: After installing both applications (windows service and android app) I've tried to connect my android device with the service from the laptop. First step is to open the connection on the client: var connection = new WebSocket('ws://192.168.178.21:2014'); But in the event-logs of my windows service there is no successful connection logged. After that I opened the browser of my laptop and tested the same code - successful. Client and Server could communicate with each other. So I've tested the websocket-support on my android device: changed the websocket-url to var connection = new WebSocket('ws://echo.websocket.org'); and could connect to the server -> Android websockets are okay. Third step was to disable my firewall and check the connection with Wireshark: Screenshot:http://www.directupload.net/file/d/3710/y9t79npy_png.htm 192.168.178.21 -> Laptop IP 192.168.178.23 -> Android device IP So it seems that the packets reach my laptop but not the service. Additional tried to use the secure wss:// protocol - no victory. Don't have any ideas anymore. Would be a pleasure to get some help :)

http://stackoverflow.com/q/25202827
answer count: 3
has comment: http://stackoverflow.com/comment/39249182
tagged with: split
has body: User inputs a web address that I want to get only the tail from, as I do know what site he inputs. So first I want to remove the "main" URL and get what ever is at the end, so my action is: Original link: http://example.com/something var n=e.split("http://example.com/");e=n[1]; And I will get "something" The problem is that site can also be secured, thus having https not http. Therefore the split wont work. How do I define a split function, that would work like this: split("http://example.com/ || https://example.com/") I do not want to split by looking at "//" or anything of that sort, I want an exact address.
has answer: http://stackoverflow.com/a/25203427
possible better answer: http://stackoverflow.com/a/25203020
linked to: http://stackoverflow.com/q/11401897
has answer: http://stackoverflow.com/a/25203020
tagged with: javascript
has answer: http://stackoverflow.com/a/25205221
tagged with: logical-operators
has comment: http://stackoverflow.com/comment/39249325
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25203427
has comment: http://stackoverflow.com/comment/39249239
type: Question
has comment: http://stackoverflow.com/comment/39249204
has title: JS split OR Logical Operator
has comment: http://stackoverflow.com/comment/39249299
score: 0

http://stackoverflow.com/a/25179247
accepted answer of: http://stackoverflow.com/q/25179158
score: 4
has body: A good approach will be is to change your markup like click data click data click data and #mytable tr.highlight{ background-color: yellow; } then $('#mytable button').click(function(){ $('#mytable tr.highlight').removeClass('highlight'); $(this).closest('tr').addClass('highlight'); someFucntion(); }) Demo: Fiddle
has comment: http://stackoverflow.com/comment/39205248
type: Answer
answers question: http://stackoverflow.com/q/25179158
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25130977
answers question: http://stackoverflow.com/q/25129298
score: 0
has comment: http://stackoverflow.com/comment/39134987
has body: Not sure there's a clear solution at all. It sounds like you're trying to store a "secret" in a browser? There will aways be a way to view it, even if you try to obfuscate it.
type: Answer
has comment: http://stackoverflow.com/comment/39129421
has comment: http://stackoverflow.com/comment/39127269
has comment: http://stackoverflow.com/comment/39133063
has comment: http://stackoverflow.com/comment/39132950

http://stackoverflow.com/q/25211408
answer count: 0
type: Question
tagged with: firefox
has comment: http://stackoverflow.com/comment/39266914
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39266253
tagged with: angularjs
has title: AngularJS directive's element sometimes not defined in Firefox
type: UnansweredQuestion
has body: I keep getting this weird error, which only seem to happen on Firefox: I have an element tag, say &lt;directive-element&gt;&lt;/directive-element&gt; and the following directive for it: app.directive('directiveElement', function() { return { restrict: 'E', template: '&lt;input type="text" /&gt;', link: function(scope, element, attrs) { element.on('focus', function() { // Do something with element // for instance, call element.scrollLeft(); }); } } }) Every once in a while, Firefox throws me an error, saying scrollLeft() cannot be called on a null. I tried console logging the element itself, and it is an Angular element, but of length 0. I don't understand how this can be an issue since the input, and all the binding are injected ONCE angular finds the directive &lt;directive-element /&gt;. So if I can see the input, that means Angular produced it. So why wouldn't the element be available? What can be the cause of this? This seems pretty random. All I have to do is refresh the page I am on over and over and eventually this happens (i.e. I don't do ANYTHING else other than refreshing, and sometimes I can this error). And this is again only on Firefox.
has comment: http://stackoverflow.com/comment/39266600
has comment: http://stackoverflow.com/comment/39266260
has comment: http://stackoverflow.com/comment/47409295

http://stackoverflow.com/comment/39258976
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25200353
has text: **Uncaught ReferenceError: LatLng is not defined** and **Uncaught InvalidValueError: unknown property LatLng**. Just compare this line `'LatLng': LatLng` with my code...

http://stackoverflow.com/q/25124886
tagged with: javascript
has comment: http://stackoverflow.com/comment/39105234
type: Question
has comment: http://stackoverflow.com/comment/39114299
has comment: http://stackoverflow.com/comment/39107015
has comment: http://stackoverflow.com/comment/39105004
has comment: http://stackoverflow.com/comment/39106454
has body: I'm trying to keep a data model in sync with the url: When my url updates, and $stateParams changes, selectedNode is found $scope.$watch('$stateParams', function (params) { // some logic $scope.selectedNode = foundNode }); When selectedNode changes, the url updates $scope.$watch('selectedNode', function(node) { // some logic to find params $state.go('nodeState', params); }); Only problem is, when $stateParams changes, selectedNode changed, which fires the $watcher, thus changing $stateParams again, And the same is true for when selectedNode changes (causes $stateParams to change, causing selectedNode to change thus again) The end goal seems pretty simple, to keep my data model selectedNode in sync with the url (both ways).
downvote count: 0
has comment: http://stackoverflow.com/comment/39105444
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39117815
has comment: http://stackoverflow.com/comment/39105206
answer count: 0
has comment: http://stackoverflow.com/comment/39105187
type: UnansweredQuestion
score: 1
has title: AngularJS Prevent $watch from firing when syncing data model with URL
upvote count: 1
has comment: http://stackoverflow.com/comment/39105420
has comment: http://stackoverflow.com/comment/39107151
tagged with: angular-ui-router

http://stackoverflow.com/a/25134388
type: Answer
upvote count: 2
downvote count: 1
answers question: http://stackoverflow.com/q/25134224
has comment: http://stackoverflow.com/comment/39122347
has body: Check out the jquery docs, they're super awesome. Something like this could give you the gist, though. var keyTO, seconds = 5; $( "#i" ).on({ keypress: function(e) { if(keyTO) { clearTimeout(keyTO); keyTO = null; } keyTO = setTimeout(someFn, seconds*1000); }, keyup: function(e) { clearTimeout(keyTO); keyTO = null; } }); function someFn() { // only called after full timeout alert('Sweet.'); }
score: 1

http://stackoverflow.com/comment/39224426
type: Comment
comment on: http://stackoverflow.com/a/25189330
has text: Yes you can. that depends whether we get the selector for them.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25142325
has answer: http://stackoverflow.com/a/25160747
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/25142498
has answer: http://stackoverflow.com/a/25142498
type: Question
has body: What I want is to protect my developer key while making an Ajax call to a cross-domain. Before I would just go straight to the url and plug in my key. Like this $.ajax({ url: "https://na.api.pvp.net/api/lol/na/v2.3/team/TEAM-ID?api_key=mykey", type: "GET", data: {}, success: function (json) { console.log(json); console.log(json[teamID].name); console.log(json[teamID].fullId); console.log(json[teamID].roster.ownerId); console.log(json[teamID].tag); }, error: function (error) {} }); This would give me the following Object, which I could easily parse out. However, as mentioned, any person could easily grab my key during this process. So I decided to move this action to my Controller (yes I know there shouldn't be business logic here, but it is more secure and this is a quick process). So what I am doing now is running my Javascript, which calls the Controller for a Json return. Javascript $.ajax({ url: "/Competitive/teamLookUp", type: "POST", data: "ID=" + teamID, success: function (json) { console.log(json); }, error: function(error) { } }); And my Controller takes that in and attempts to return the JSON. [HttpPost] public ActionResult teamLookUp(string ID) { HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("https://na.api.pvp.net/api/lol/na/v2.3/team/" + ID + "?api_key=myKey"); myReq.ContentType = "application/json"; var response = (HttpWebResponse)myReq.GetResponse(); string text; using (var sr = new StreamReader(response.GetResponseStream())) { text = sr.ReadToEnd(); } return Json(new { json = text }); } However during this processs I return a string that is not a JSON object, thus cannot be parsed by my script. It returns the entire json as one long string. At this point I tried to add the following to my Controller. var json2 = JsonConvert.DeserializeObject(text); return Json(new { json = json2 }); But all that returned was some empty Object. I have been trial and error'ing, searching, and guessing for the past 4 hours. I have no idea what to try anymore.…
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
score: 6
has comment: http://stackoverflow.com/comment/39137089
has comment: http://stackoverflow.com/comment/39137381
accepted answer: http://stackoverflow.com/a/25160747
linked to: http://stackoverflow.com/q/20437279
downvote count: 0
has comment: http://stackoverflow.com/comment/39137077
has title: Getting JSON Object from MVC Controller
favorite count: 0
tagged with: ajax
answer count: 5
has comment: http://stackoverflow.com/comment/39136969
has answer: http://stackoverflow.com/a/39112643
upvote count: 6
has comment: http://stackoverflow.com/comment/39136962
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25142562
has answer: http://stackoverflow.com/a/25142711

http://stackoverflow.com/comment/39136883
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25142335
has text: Invalid regex + why recommend a third party tool to somebody who is using a language that, 99% of the time, has a DOM API at the ready?

http://stackoverflow.com/comment/39104607
type: Comment
comment on: http://stackoverflow.com/q/25124693
type: QuestionComment
has text: check what are you getting in answer, try to print out answer string before the if statment to see what is it
score: 0

http://stackoverflow.com/a/25215005
type: Answer
has comment: http://stackoverflow.com/comment/39272951
answers question: http://stackoverflow.com/q/25214916
score: 2
has comment: http://stackoverflow.com/comment/39287619
upvote count: 2
has body: When you validation is a success (window.err_exist != false) the script returns true. Thus you are returning true for a click event not a submit. This could be fixed by doing what jeltine says &lt;form onsubmit="validate()"&gt; or it could be fixed by replacing the &lt;input class="buttons" type="submit" name="submit" onclick="return validate()" value="Submit" /&gt; with &lt;input class="buttons" type="button" name="submit" onclick="validate()" value="Submit" /&gt; Then changing the validate function to call form.submit(); on no errors. EXAMPLE: //must add id to get element by id &lt;form name="enrollment" id="enrollment" method="post" action="submit.php"&gt; function validate() { // Something is not returning true here so that the form is not being submitted if ( !window.err_exist ) { // call submit on form var myform = document.getElementById("enrollment"); myform.submit(); } // There are errors alert("Errors exist in the form!"); return false; } The advantage to doing it this way is that you have more control over changing form parameters such as action or method if needed. If these will not be needed then just change to onsubmit="".
downvote count: 0

http://stackoverflow.com/q/25217435
has title: How to concatenate array with apostrophy and comma in JavaScript
type: Question
tagged with: concatenation
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/25217461
score: 0
accepted answer: http://stackoverflow.com/a/25217461
type: AnsweredQuestion
has body: I cannot figure out the best approach to my problem. I wish to concatenate a list of numbers into an array, and affix '', to it. For example: '1234','5678','... I managed to get it to work with commas by doing: var radio_comma = document.getElementById("optionsRadios1").value; if (document.getElementById("optionsRadios1").checked) { sku_output = txtArray.join(radio_comma); } I can't figure out how to ammend it with 'number', I did attempt this with sku_output = radio_singlequote.concat(x, radio_singlequote, radio_comma); however it will output '123,123,123,123,123'

http://stackoverflow.com/q/25182009
has comment: http://stackoverflow.com/comment/39210139
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3732258
accepted answer: http://stackoverflow.com/a/25182135
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
duplicate of: http://stackoverflow.com/q/3732258
score: 0
possible better answer: http://stackoverflow.com/a/25182113
answer count: 3
has comment: http://stackoverflow.com/comment/39210022
has answer: http://stackoverflow.com/a/25182113
has body: Hello i use this piece of code to convert json file to an object. My problem is that i can't use the variable respons in any other function. Anybody knows how to solve this problem? var response; function AJAX_JSON_Req( url ) { var AJAX_req = new XMLHttpRequest(); AJAX_req.open( "GET", url, true ); AJAX_req.setRequestHeader("Content-type", "application/json"); AJAX_req.onreadystatechange = function() { if( AJAX_req.readyState == 4 &amp;&amp; AJAX_req.status == 200 ) { response = JSON.parse( AJAX_req.responseText ); } } AJAX_req.send(); }
has comment: http://stackoverflow.com/comment/39210104
has answer: http://stackoverflow.com/a/25182135
has title: Global variable not recognized in other functions
linked to: http://stackoverflow.com/q/14220321
has answer: http://stackoverflow.com/a/25182123
has comment: http://stackoverflow.com/comment/39210144
duplicate of: http://stackoverflow.com/q/14220321

http://stackoverflow.com/comment/39284323
type: QuestionComment
comment on: http://stackoverflow.com/q/25220998
score: 0
has text: try installing gulp locally also
type: Comment

http://stackoverflow.com/comment/39083480
type: Comment
has text: The closing double quote of selector is missing
type: AnswerComment
comment on: http://stackoverflow.com/a/25113576
score: 0

http://stackoverflow.com/q/25135098
has comment: http://stackoverflow.com/comment/39123739
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39123676
tagged with: datetime
has comment: http://stackoverflow.com/comment/39123961
accepted answer: http://stackoverflow.com/a/25135375
tagged with: php
tagged with: timeago
type: Question
has title: php timezone messing with javascript time
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39124019
has comment: http://stackoverflow.com/comment/39124137
has answer: http://stackoverflow.com/a/25135375
has body: I'm using the TimeAgo plugin to update the time of posts automatically. It makes time like 05-08-2014 15:02:39 to 5 minutes ago. The problem is, the javascript uses client's clock for time. I'm from Bangladesh, Asia. But in php the default timezone varies from server to server. I'm outputting the format 05-08-2014 15:02:39 in PHP to convert it into something like 5 mintues ago using the TimeAgo plugin. Because server's timezone is different, instead of showing less than a minute ago on a recent post, it shows nn hours ago. If the server is american, it shows 11 hours ago, if it's indian, the time shows 30 minutes ago. How do I fix it?
answer count: 1

http://stackoverflow.com/comment/39056913
has text: Do you have a solution? If not could you unaccept the answer so maybe someone with the right knowledge will come along and enlighten us?
comment on: http://stackoverflow.com/a/25098860
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39027085
score: 0
has text: and when i use the firebug i saw that the returned json have the correct combination of "Tag"+ "Name", but the auto complete result contained only tag
type: AnswerComment
comment on: http://stackoverflow.com/a/25079840
type: Comment

http://stackoverflow.com/a/25139329
has comment: http://stackoverflow.com/comment/39722031
has comment: http://stackoverflow.com/comment/39161875
accepted answer of: http://stackoverflow.com/q/25132255
score: 83
upvote count: 83
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39156899
downvote count: 0
has comment: http://stackoverflow.com/comment/39135577
has body: See this ball? Its colour is red. Call it ball1. See this ball? Its colour is red. Call it ball2. Is ball1 the same object as ball2? No, they are distinct objects that happen to have identical properties. See this ball? Its colour is red. Call it ball1. Let's call ball1, ball2. Is ball1 the same object as ball2? Yes. They are the same ball.
type: Answer
has comment: http://stackoverflow.com/comment/39156667
answers question: http://stackoverflow.com/q/25132255

http://stackoverflow.com/comment/39107283
has text: Ohhhhhhhh. I see how the `.parent()` is affecting the `fieldset` instead of the `div`... Would've never guessed that. Also, never knew about the `.each()` function, thank you.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25125997
type: Comment

http://stackoverflow.com/a/25198268
type: Answer
has body: check this: http://jsfiddle.net/romanian/6no49uwt/ response = [{ 'Name': 'Name1', 'Color': 'Color2' }, { 'Name': 'Name2', 'Color': 'Color2' }] console.log(response); firstCar = response[0]; console.log(firstCar); for display of console.log(), you will need firebug or some dev tool
has comment: http://stackoverflow.com/comment/39241210
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39240960
answers question: http://stackoverflow.com/q/25198119
has comment: http://stackoverflow.com/comment/39241063
downvote count: 0

http://stackoverflow.com/comment/99409631
has text: Is this true when there are other tags with `async` on them?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25085793

http://stackoverflow.com/a/25269661
answers question: http://stackoverflow.com/q/25227987
has comment: http://stackoverflow.com/comment/71816975
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25227987
has body: I was just looking at some documentation and found this: Documentation forForm It states: Creates and returns a FormTriggerBuilder tied to the given form. Also: var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); ScriptApp.newTrigger('myFunction') .forForm(form) .onFormSubmit() .create(); onFormSubmit That code seems to be tied to a specific form.
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/71840472

http://stackoverflow.com/a/25127388
downvote count: 0
has body: From the docs on linear.ticks([count]), which that value is eventually passed to: The specified count is only a hint; the scale may return more or fewer values depending on the input domain. d3 doesn't supply a way to specify an exact tick count, save for specifying the ticks yourself. You can generate the ticks yourself, and set them with axis.tickValues([values]).
answers question: http://stackoverflow.com/q/25126737
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/a/25128710
has comment: http://stackoverflow.com/comment/39112453
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has body: You can do: document.getElementById("yourButtonId").onmousedown = function(event) { //fires when mouse down on button } Or use an event listener: (https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener) document.getElementById("yourButtonId").addEventListener("mousedown", function(event) { //fires on mouse down }, false); For touch events use ontouchstart document.getElementById("yourButtonId").ontouchstart = function(event) { //fires when touched }
score: 2
accepted answer of: http://stackoverflow.com/q/25128673
answers question: http://stackoverflow.com/q/25128673

http://stackoverflow.com/q/25096125
has comment: http://stackoverflow.com/comment/39051165
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25098061
has comment: http://stackoverflow.com/comment/39051663
tagged with: forms
upvote count: 1
has comment: http://stackoverflow.com/comment/39051048
possible better answer: http://stackoverflow.com/a/25096288
has comment: http://stackoverflow.com/comment/39051476
downvote count: 1
has answer: http://stackoverflow.com/a/25096649
type: Question
has answer: http://stackoverflow.com/a/25096288
tagged with: session
has comment: http://stackoverflow.com/comment/39051222
linked to: http://stackoverflow.com/q/24982476
tagged with: javascript
has comment: http://stackoverflow.com/comment/39051071
accepted answer: http://stackoverflow.com/a/25098061
tagged with: post
has answer: http://stackoverflow.com/a/25096395
has comment: http://stackoverflow.com/comment/39051167
score: 0
has comment: http://stackoverflow.com/comment/39051543
has answer: http://stackoverflow.com/a/25096629
has comment: http://stackoverflow.com/comment/39051304
has comment: http://stackoverflow.com/comment/39051327
has comment: http://stackoverflow.com/comment/39051391
has body: I have a a problem when posting some info from a form to a delete function, I am probably going to kick my self for this but I can't find the answer. admin/index.php lib/admin_functions.php lib/delete_user.php As above, I have 3 files. The function it's self is below: // Display users function get_all_users() { global $con; $sql = "SELECT * FROM users ORDER BY id ASC"; $result = mysqli_query($con, $sql); echo " User ID Username Email Address Zendesk User Id Zendesk View ID Firstname Surname Nickname Active Admin Display Stats? Remove User "; while($row = mysqli_fetch_array($result)) { // Displaying all user details echo " " .$row['id']. " " .$row['user_name']. " " .$row['email_address']. " " .$row['zendesk_user_id']." " .$row['zendesk_view_id']. " " .$row['user_firstname']. " " .$row['user_surname']. " " .$row['user_nickname']. " " .$row['is_active']. " " .$row['is_admin']. " " .$row['display_stats']. // Form for deleting a user " "; } echo " Delete Selected User(s) "; echo " "; } The above function belongs in admin_functions.php, it displays all my users with an extra column with a tick box for deletion, and at the bottom a form with the delete button. I then have the delete_user code <?php session_start(); if( ! $_SESSION['loggedIn'] && ! $_SESSION['isAdmin']) { // If not admin or logged in, die die(); } require_once(dirname(__FILE__).'/admin_functions.php'); require_once(dirname(__FILE__).'/../config.php'); // DELETE USER $user_id = mysql_real_escape_string( $_POST['user_id'] ); // Insert the customer, including the password hash $sql = "DELETE FROM users where id = '{$user_id}' limit 1"; if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); } print "User Deleted"; mysqli_close($con); ?> And finally on the index file, I have something that calls the function. <?php get_all_users(); ?> The problem I have is that the code all displays as expected, but after the warning message nothing happens. Nothing appears to get posted to delete_user.php, I see n…
favorite count: 0
has title: Form action not posting, via php/html
has comment: http://stackoverflow.com/comment/39051138
answer count: 5
has comment: http://stackoverflow.com/comment/39051500
tagged with: php

http://stackoverflow.com/comment/39280964
has text: What did your colleague say?
comment on: http://stackoverflow.com/q/25219438
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39127293
type: Comment
type: QuestionComment
has text: use $.noConflict(); to jQuery.noConflict();
comment on: http://stackoverflow.com/q/25137198
score: 0

css
tags question: http://stackoverflow.com/q/25145334
tags question: http://stackoverflow.com/q/25119868
tags question: http://stackoverflow.com/q/25191651
tags question: http://stackoverflow.com/q/25227750
tags question: http://stackoverflow.com/q/25177376
tags question: http://stackoverflow.com/q/25214225
tags question: http://stackoverflow.com/q/25182274
tags question: http://stackoverflow.com/q/25095539
tags question: http://stackoverflow.com/q/25184755
tags question: http://stackoverflow.com/q/25222909
tags question: http://stackoverflow.com/q/25220601
tags question: http://stackoverflow.com/q/25107198
tags question: http://stackoverflow.com/q/25090334
tags question: http://stackoverflow.com/q/25129841
tags question: http://stackoverflow.com/q/25155494
tags question: http://stackoverflow.com/q/25212523
tags question: http://stackoverflow.com/q/25125967
tags question: http://stackoverflow.com/q/25203118
tags question: http://stackoverflow.com/q/25129636
tags question: http://stackoverflow.com/q/25152702
tags question: http://stackoverflow.com/q/25202598
tags question: http://stackoverflow.com/q/25221872
tags question: http://stackoverflow.com/q/25103313
tags question: http://stackoverflow.com/q/25171658
tags question: http://stackoverflow.com/q/25142449
tags question: http://stackoverflow.com/q/25154414
tags question: http://stackoverflow.com/q/25123390
tags question: http://stackoverflow.com/q/25130894
tags question: http://stackoverflow.com/q/25208280
tags question: http://stackoverflow.com/q/25186044
tags question: http://stackoverflow.com/q/25214744
tags question: http://stackoverflow.com/q/25121645
tags question: http://stackoverflow.com/q/25099777
tags question: http://stackoverflow.com/q/25198903
tags question: http://stackoverflow.com/q/25079697
tags question: http://stackoverflow.com/q/25218308
tags question: http://stackoverflow.com/q/25197456
tags question: http://stackoverflow.com/q/25077561
tags question: http://stackoverflow.com/q/25121240
tags question: http://stackoverflow.com/q/25165271
tags question: http://stackoverflow.com/q/25170592
tags question: http://stackoverflow.com/q/25210457
tags question: http://stackoverflow.com/q/25205232
tags question: http://stackoverflow.com/q/25118772
tags question: http://stackoverflow.com/q/25183418
tags question: http://stackoverflow.com/q/25175166
tags question: http://stackoverflow.com/q/25145711
tags question: http://stackoverflow.com/q/25119356
tags question: http://stackoverflow.com/q/25163848
tags question: http://stackoverflow.com/q/25149415
tags question: http://stackoverflow.com/q/25109554
tags question: http://stackoverflow.com/q/25226505
tags question: http://stackoverflow.com/q/25213964
tags question: http://stackoverflow.com/q/25071489
tags question: http://stackoverflow.com/q/25136508
tags question: http://stackoverflow.com/q/25217659
tags question: http://stackoverflow.com/q/25139049
tags question: http://stackoverflow.com/q/25189936
tags question: http://stackoverflow.com/q/25145333
tags question: http://stackoverflow.com/q/25166945
tags question: http://stackoverflow.com/q/25136500
tags question: http://stackoverflow.com/q/25119232
tags question: http://stackoverflow.com/q/25106453
tags question: http://stackoverflow.com/q/25092391
tags question: http://stackoverflow.com/q/25218044
tags question: http://stackoverflow.com/q/25195813
tags question: http://stackoverflow.com/q/25187259
tags question: http://stackoverflow.com/q/25140994
tags question: http://stackoverflow.com/q/25143866
tags question: http://stackoverflow.com/q/25101980
tags question: http://stackoverflow.com/q/25216695
tags question: http://stackoverflow.com/q/25211111
tags question: http://stackoverflow.com/q/25206242
tags question: http://stackoverflow.com/q/25166150
tags question: http://stackoverflow.com/q/25105773
tags question: http://stackoverflow.com/q/25146429
tags question: http://stackoverflow.com/q/25171011
tags question: http://stackoverflow.com/q/25198225
tags question: http://stackoverflow.com/q/25208124
tags question: http://stackoverflow.com/q/25201257

http://stackoverflow.com/q/25148354
has comment: http://stackoverflow.com/comment/39148943
has title: Static function Javascript
has answer: http://stackoverflow.com/a/25148936
accepted answer: http://stackoverflow.com/a/25148936
tagged with: javascript
has comment: http://stackoverflow.com/comment/39149607
has comment: http://stackoverflow.com/comment/39150368
has comment: http://stackoverflow.com/comment/39149302
has comment: http://stackoverflow.com/comment/39148814
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/39149423
has answer: http://stackoverflow.com/a/25148395
has comment: http://stackoverflow.com/comment/39149628
favorite count: 0
tagged with: static
possible better answer: http://stackoverflow.com/a/25148395
has comment: http://stackoverflow.com/comment/39149477
type: AnsweredQuestion
upvote count: 0
linked to: http://stackoverflow.com/q/7694501
has comment: http://stackoverflow.com/comment/39148840
has comment: http://stackoverflow.com/comment/39148750
type: Question
has answer: http://stackoverflow.com/a/25148390
has comment: http://stackoverflow.com/comment/39148917
has body: I want to have a prototype and call a static function. Here is my code: function Client() { this.username = "username", this.password = "Password", this.printUsername = function() { this.username=$("#Username").val() console.log(this.username); }; }; Here is me calling it: Submit Here is the error in the console: Uncaught TypeError: Object function Client() { this.username = "username", this.password = "Password", this.printUsername = function() { this.username=$("#Username").val() console.log(this.username); }; } has no method 'printUsername' What is wrong with my code? This still creates the error: function Client() { this.username = "username", this.password = "Password", this.setUsername = function() { this.username=$("#Username").val() console.log(this.username); }; }; Client.prototype.printUsername = function() { this.username = $("#Username").val(); console.log(this.username); }
score: -2
has comment: http://stackoverflow.com/comment/39149352

http://stackoverflow.com/comment/39100920
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25122750
has text: Thanks, good point. I wasn't sure if he knew he could include from a different server(!)
type: AnswerComment

http://stackoverflow.com/comment/39284758
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25221461
has text: With ES6 don't forget that the `Rect` function itself inherits from the `Shape` function as well, i.e. `Object.setPrototypeOf(Rect, Shape)`
score: 0

http://stackoverflow.com/comment/39161357
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25138238
has text: Hmm, I tried to sniff packets using Wireshark, but it seems these seems to be protected by SSL.. Domino HTTP is set to work with UTF-8 standard. I set manual UTF-8 encoding on my xsp and library as well.

http://stackoverflow.com/comment/39020648
type: AnswerComment
type: Comment
has text: Thank you so much for assisting, you have solved the problem for me. I have 2 more questions. 1. How would I make the code below shorter? I don't think this is an efficient way. $('.a').click(function() { alert('0'); }); $('.e').click(function() { alert('1'); }); $('.i').click(function() { alert('2'); }); $('.o').click(function() { alert('3'); }); $('.u').click(function() { alert('4'); }); 2. How can I improve on my Javascript? I really need to improve on this and fast. Books? Thanks for your help
comment on: http://stackoverflow.com/a/25077578
score: 0

http://stackoverflow.com/q/25224929
upvote count: 6
type: AnsweredQuestion
tagged with: wordpress
type: Question
has answer: http://stackoverflow.com/a/25225020
tagged with: javascript
has title: Can not find js.map file?
answer count: 1
downvote count: 0
has body: I have a wordpress install and am working on building out a custom theme. But for some reason I keep getting a console 404 error saying that the [path to file]/waves.min.js.map is not found. I do not have a waves.js.map file nor do I kno what a .js.map file is. The effect is still working and I am not having any issues related to the file. Can anyone tell me what would cause a .js.map or what it is or even how to make one?
favorite count: 0
accepted answer: http://stackoverflow.com/a/25225020
has comment: http://stackoverflow.com/comment/39290887
score: 6

http://stackoverflow.com/comment/43112677
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25150922
score: 0
has text: @AlexAube so jquery.turbolinks actually replaces turbolinks?

http://stackoverflow.com/a/25175718
type: Answer
has body: Most asynchronous loaders would load the scripts in head. There is practically no advantage in trying to load anything in the bottom at this point now that the DOM has already been parsed. So whether you add require.js in the head or bottom it should not matter. About the error you are getting:- Are you using something like resolve: resolveController('/app/controllers/customersController.js') and included routeResolver.js
has comment: http://stackoverflow.com/comment/39199119
has comment: http://stackoverflow.com/comment/39237772
has comment: http://stackoverflow.com/comment/39237861
answers question: http://stackoverflow.com/q/25175545
score: 0

http://stackoverflow.com/comment/52741667
type: AnswerComment
has text: This is what I ended up using (sorry for the late reply).
comment on: http://stackoverflow.com/a/25205127
type: Comment
score: 0

knockout.js
tags question: http://stackoverflow.com/q/25080183
tags question: http://stackoverflow.com/q/25213377
tags question: http://stackoverflow.com/q/25185490
tags question: http://stackoverflow.com/q/25163283
tags question: http://stackoverflow.com/q/25165760
tags question: http://stackoverflow.com/q/25158404
tags question: http://stackoverflow.com/q/25179347
tags question: http://stackoverflow.com/q/25138398
tags question: http://stackoverflow.com/q/25160029
tags question: http://stackoverflow.com/q/25112671
tags question: http://stackoverflow.com/q/25106621
tags question: http://stackoverflow.com/q/25165423
tags question: http://stackoverflow.com/q/25141960
tags question: http://stackoverflow.com/q/25155691
tags question: http://stackoverflow.com/q/25187745
tags question: http://stackoverflow.com/q/25204608
tags question: http://stackoverflow.com/q/25200943
tags question: http://stackoverflow.com/q/25210421
tags question: http://stackoverflow.com/q/25227770
tag name: knockout.js
tags question: http://stackoverflow.com/q/25108696
tags question: http://stackoverflow.com/q/25172734
tags question: http://stackoverflow.com/q/25159512
tags question: http://stackoverflow.com/q/25143082
tags question: http://stackoverflow.com/q/25080047
tags question: http://stackoverflow.com/q/25129191
tags question: http://stackoverflow.com/q/25207313
tags question: http://stackoverflow.com/q/25113192
tags question: http://stackoverflow.com/q/25116043
tags question: http://stackoverflow.com/q/25205679
tags question: http://stackoverflow.com/q/25167703
tags question: http://stackoverflow.com/q/25093701
tags question: http://stackoverflow.com/q/25091730
tags question: http://stackoverflow.com/q/25142830
tags question: http://stackoverflow.com/q/25164013
tags question: http://stackoverflow.com/q/25114545
tags question: http://stackoverflow.com/q/25135446
tags question: http://stackoverflow.com/q/25153872
tags question: http://stackoverflow.com/q/25194537
tags question: http://stackoverflow.com/q/25225161
tags question: http://stackoverflow.com/q/25070757
tags question: http://stackoverflow.com/q/25207932
type: Tag
tags question: http://stackoverflow.com/q/25122335
tags question: http://stackoverflow.com/q/25091597
tags question: http://stackoverflow.com/q/25115942
tags question: http://stackoverflow.com/q/25222217
tags question: http://stackoverflow.com/q/25132450
tags question: http://stackoverflow.com/q/25119927
tags question: http://stackoverflow.com/q/25149043
tags question: http://stackoverflow.com/q/25207544
tags question: http://stackoverflow.com/q/25171052
tags question: http://stackoverflow.com/q/25107601
tags question: http://stackoverflow.com/q/25155319
tags question: http://stackoverflow.com/q/25197919
tags question: http://stackoverflow.com/q/25100762

http://stackoverflow.com/q/25123931
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25124660
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39103305
has comment: http://stackoverflow.com/comment/39104850
score: 1
upvote count: 1
has title: Call div inside a function
type: Question
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25124660
has comment: http://stackoverflow.com/comment/39103495
has body: I'm trying to create a popup similar to an iOS alert view, with jQuery mobile 1.4.3. I need my warning messages to be triggered from javascript events, like a confirmation message with a OK button showing the ajax response call to the web service. My first problem is passing data thru a popup widget, with much searching I fount it impossible. I found a peace of code that is almost what I need: $('#index').live('pagebeforeshow',function(e,data){ $("#test-button").bind('click',function(event, ui){ $('&lt;div&gt;').simpledialog2({ mode: 'button', headerText: 'Dialog', buttonPrompt: 'Please, don\'t ruin my blue world', buttons : {'close': {click: function() {}}}, width: '120px' }) }); }); The problem is that I need this function to be called not from a button click but by a function: Something like this: //POPUP CODE // 1 == warning green // 2 == warning yellow // 3 == warning red function customAlert(message, typeOfWarning){ if(typeOfWarning == "1"){ var auxStr = "green"; }; if(typeOfWarning == "2"){ var auxStr = "yellow"; }; if(typeOfWarning == "3"){ var auxStr = "red"; }; $('&lt;div&gt;').simpledialog2({ mode: 'button', headerText: 'Dialog', buttonPrompt: 'Please, don\'t ruin my blue world', buttons : {'close': {click: function() {}}}, width: '120px' }) }; I'm new to JavaScript and jQuery Mobile, need help, can't make it work. Thanks in Advance.
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/39143399
comment on: http://stackoverflow.com/q/25145638
score: 0
type: QuestionComment
has text: Yes, Noah, but in Wikipedia it will show all correct.. I pass the parameter (it's in russian) so it supposed to show it correct in the browser address bar..
type: Comment

http://stackoverflow.com/q/25120131
has comment: http://stackoverflow.com/comment/39095877
has comment: http://stackoverflow.com/comment/39095954
type: Question
tagged with: c#
tagged with: jquery-ui
score: -2
has comment: http://stackoverflow.com/comment/39096017
tagged with: javascript
has comment: http://stackoverflow.com/comment/39095924
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/39096634
has title: Event handler that isn't working
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/25120673
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39097454
has answer: http://stackoverflow.com/a/25120673
has body: I've created a date picker text box using JQueryUI (see the HTML code here: http://codepen.io/anon/pen/zmJdk) which uses an ASP.NET TextBox. I created the onTextChanged event handler like this: &lt;asp:TextBox OnTextChanged="EventHandler" ID="datepicker" runat="server" &gt;&lt;/asp:TextBox&gt; Using Visual Studio 2012 I double clicked the element in design view to create the event handler in my .cs file and proceeded to place a JavaScript alert inside it to check that it works. The .cs event handler looks like this: protected void EventHandler(object sender, EventArgs e) { ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('ok');", true); } Here's the problem: When I use the date picker and the date changes I don't get my JavaScript alert. I assume this means there is something wrong with the event handler but I'm not sure what. Can anyone help?

http://stackoverflow.com/q/25097140
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: angularjs-directive
possible better answer: http://stackoverflow.com/a/25097235
downvote count: 0
has title: angular js directive attribute and controller scope
tagged with: javascript
has answer: http://stackoverflow.com/a/25097292
has answer: http://stackoverflow.com/a/25097235
answer count: 2
favorite count: 0
has body: I would like to have a directive which creates a div as title and a ul list under it. I want the title to be set from attribute and a the list by a controller. Here is a fiddle of my code HTML: JavaScript: angular.module('myModule', []). controller('ListController', ['$scope', function ($scope) { $scope.items = [{ caption: 'Item 1' }, { caption: 'Item 2' }, { caption: 'Item 3' }]; }]).directive('myList', [function () { return { restrict: 'E', template: ' ' + ' {{caption}} ' + ' ' + ' {{item.caption}} ' + ' ' + ' ', scope: { caption: '@caption' }, link: function (scope, element) { element.find('li').on('click', function (evt) { alert($(this).html()); }); } } }]) How can I solve this issue?
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25097292

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

http://stackoverflow.com/comment/89637173
comment on: http://stackoverflow.com/a/41762378
type: AnswerComment
type: Comment
has text: Why the extra underscores at the start of variable names?
score: 2

http://stackoverflow.com/comment/39267402
type: Comment
has text: Thx. I've to wait 6 minutes before I can check your answer right... will do it later :) thx. again
comment on: http://stackoverflow.com/a/25212226
score: 0
type: AnswerComment

http://stackoverflow.com/q/25177205
tagged with: ckeditor
tagged with: jquery
tagged with: asp.net
linked to: http://stackoverflow.com/q/15867346
has body: I have a ckeditor object and i want to insert text current position. So i try to get ckeditor object but page returns error. My ckeditor version is 3.6.4 ASPX: &lt;%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %&gt; &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt; &lt;ContentTemplate&gt; &lt;CKEditor:CKEditorControl Width="100%" BasePath="~/Controls/Base/ckeditor" CssClass="AutoCompColumnList" ID="txtMessageBody" Height="500px" runat="server" &lt;/CKEditor:CKEditorControl&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; I tried this: CKEDITOR.instances.txtMessageBody.insertText('some text here'); Error: CKEDITOR is not defined!
score: 0
has comment: http://stackoverflow.com/comment/39201990
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25177855
has title: CKEDITOR get instance doesnt working
type: Question
has comment: http://stackoverflow.com/comment/39202095
has comment: http://stackoverflow.com/comment/39202413
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25149616
type: Question
has comment: http://stackoverflow.com/comment/39152361
tagged with: javascript
has title: What is this "/\,$/"?
score: 0
answer count: 5
has answer: http://stackoverflow.com/a/25149766
has answer: http://stackoverflow.com/a/25149749
has comment: http://stackoverflow.com/comment/39151049
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25149637
has answer: http://stackoverflow.com/a/25149643
has answer: http://stackoverflow.com/a/25149633
has body: Tried to search for /\,$/ online, but coudnt find anything. I have: coords = coords.replace(/\,$/, ""); Im guessing it returns coords string index number. What I have to search online for this, so I can learn more?

http://stackoverflow.com/comment/39032836
score: 0
type: Comment
has text: You're missing parenthisis; `'foo'.valueOf; // function valueOf() { [native code] }`, also `'foo'.valueOf() === 'foo'`
type: AnswerComment
comment on: http://stackoverflow.com/a/25086089

http://stackoverflow.com/a/25148928
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39149739
downvote count: 0
has body: JavaScript is dynamically typed, so there is no way to ensure that product.stock is really a number by the time it gets to the template. Any code written in the future using the template (possibly written by someone else) could pass any value for product, so stock could be of any type. Best to always escape, except in the rare case when you expect the value to actually be HTML, in which case you cannot escape, so that future changes to the code are less likely to break the template.
answers question: http://stackoverflow.com/q/25148782

http://stackoverflow.com/comment/39183845
score: 0
type: Comment
type: QuestionComment
has text: does it have to be a `textarea`, or could it be a `div` with `contenteditable`?
comment on: http://stackoverflow.com/q/25166945

http://stackoverflow.com/q/25089199
has title: Using select form with JSON to make content appear
type: Question
has body: I am trying to make a selection form, where depending on the select field chosen, I want different information to appear. Here is the way I'd like to represent it: Option 1 Option 2 option.name option.info Then, in JSON, I'd like the store the following content. I am using this as the handler just to test it out: The output of the alert is empty.
has comment: http://stackoverflow.com/comment/39038656
has comment: http://stackoverflow.com/comment/39039007
tagged with: javascript
has comment: http://stackoverflow.com/comment/39039026
linked to: http://stackoverflow.com/q/11922383
score: 0
duplicate of: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/39039092
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39039106
has comment: http://stackoverflow.com/comment/39038666
tagged with: http://stackoverflow.com/tag/json
tagged with: forms

http://stackoverflow.com/comment/39131444
type: QuestionComment
comment on: http://stackoverflow.com/q/25139133
score: 0
has text: I was looking at that. However, I still want the content from the toggle to move down not up. I just want it to move so that it fits the viewport.
type: Comment

http://stackoverflow.com/comment/39203523
comment on: http://stackoverflow.com/q/25178308
type: Comment
type: QuestionComment
has text: Are you able to not use regex to parse the HTML? If so, I'd go with a parsing library. What language are you implementing this template engine in?
score: 0

http://stackoverflow.com/comment/39175592
type: Comment
comment on: http://stackoverflow.com/q/25159313
type: QuestionComment
has text: Will you show your json response when you hydrate your product?
score: 0

http://stackoverflow.com/comment/39097126
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25112125
has text: What was more interesting is that as the number I used approached 2^31, I found that more of the tests fell closer to the first iteration's duration. So as it approached 2^31, the first 2 (of 5) iterations ran much quicker. Choosing an even closer number to 2^31 made the first 4 (of the 5) iterations run quicker. --- I also found that changing the number of iterations (from 5 to 3) caused that inflection number to go up (away from 2^31).

http://stackoverflow.com/comment/39057854
has text: there really isn't a need to test anything. it just works with the shiv. but if you _needed_ to for some reason, something like `document.createElement('my-awesome-element').nodeName === "MY-AWESOME-ELEMENT"` would technically do it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25097501
type: Comment

http://stackoverflow.com/q/25189632
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39225232
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39225007
type: Question
score: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39226241
has comment: http://stackoverflow.com/comment/39225172
tagged with: serialization
answer count: 0
has title: Is there a way to serialize an arbitrary javascript object in such a way that it can be restored to be exactly as it was at a later time?
has body: Among many objects, I need to serialize an instance of a paper.js Point. JSON serialization isn't enough, because it omits all functions, getters/setters, and fails completely on objects with circular references, all of which I need. I can't write custom serialization for every object that I want to serialize, because there are too many, and they all contain too many properties. Is there a way that I can serialize this object, and deserialize it later such that the deserialized copy behaves the same way?

http://stackoverflow.com/q/25169936
has comment: http://stackoverflow.com/comment/39189209
has comment: http://stackoverflow.com/comment/39191856
has comment: http://stackoverflow.com/comment/39188953
type: Question
has title: Where to place JQuery Script in CakePHP to have it run after page loads (as opposed to in a header)
has comment: http://stackoverflow.com/comment/39189840
tagged with: cakephp
has answer: http://stackoverflow.com/a/25172009
tagged with: javascript
has comment: http://stackoverflow.com/comment/39189063
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: Just started working on a CakePHP framework, am not very familiar with this particular architecture. I have installed Qtip tooltips after Jquery. I know that they are installed correctly, because I can trigger the correct behavior I want by running the following script in the console: $("li.standardsList").qtip() Seemingly, if I could only make this one script run inside Cake, all my problems would be solved. Within the ctp (view) file, at the bottom of all the other header links, I have the following: echo $this -&gt; Html -&gt; script('tagging-tool/applied-qtip.js'); And within the applied-qtip.js is the following: $(document).ready(function(){ $("li.standardsList").qtip(); }); Yet, I can't get that to work; I tried adding in an alert inside the applied-qtip.js, and that did fire off successfuly. After that, I tried putting the: echo $this -&gt; Html -&gt; script('tagging-tool/applied-qtip.js'); at the end of the file, and then it appeared to just not run at all. Any ideas of where to go from here?
tagged with: php
has comment: http://stackoverflow.com/comment/39189106
has comment: http://stackoverflow.com/comment/39191320
tagged with: qtip
has comment: http://stackoverflow.com/comment/39189727
has comment: http://stackoverflow.com/comment/39191876

http://stackoverflow.com/q/25129845
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39114726
has answer: http://stackoverflow.com/a/34851185
has answer: http://stackoverflow.com/a/25148985
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25182764
has comment: http://stackoverflow.com/comment/39117122
possible better answer: http://stackoverflow.com/a/34851185
favorite count: 0
score: 4
tagged with: angularjs
type: Question
has comment: http://stackoverflow.com/comment/39143543
has comment: http://stackoverflow.com/comment/39132412
accepted answer: http://stackoverflow.com/a/25182764
has comment: http://stackoverflow.com/comment/39146832
has title: jquery-steps into a angularjs directive
has answer: http://stackoverflow.com/a/31015239
answer count: 5
has comment: http://stackoverflow.com/comment/39117177
upvote count: 4
tagged with: jquery-steps
has comment: http://stackoverflow.com/comment/39115674
has body: I am working on my first angularjs directive. I was hoping to wrap jquery-steps (https://github.com/rstaib/jquery-steps) into a directive. My issue comes when I try to bind inputs or expression inside the content of the steps to controller models they don't bind. An example code of what I have is below. angular.module('foobar',[]) .controller 'UserCtrl', ($scope) -> $scope.user = name:'John Doe' .directive 'wizardForm', () -> return { restrict: 'A', link: (scope, ele) -> ele.steps({}) } The html looks as follows Step 1 Name: {{user.name}} Step 2 Advanced Info etc The output for the content in step 1 is Name: {{user.name}} I am still a beginner with angular so I cannot seem to understand why there is no scope or model attached to the content area. Any tips or leads to get me on the right track would be very helpful! EDIT: I added a plnkr to show what I have tried. http://plnkr.co/edit/y60yZI0oBjW99bBgS7Xd
downvote count: 0
has answer: http://stackoverflow.com/a/29224531

cross-browser
tags question: http://stackoverflow.com/q/25102601
tags question: http://stackoverflow.com/q/25147447
tags question: http://stackoverflow.com/q/25183953
type: Tag
tags question: http://stackoverflow.com/q/25123313
tags question: http://stackoverflow.com/q/25173434
tags question: http://stackoverflow.com/q/25162918
tags question: http://stackoverflow.com/q/25094699
tags question: http://stackoverflow.com/q/25196001
tag name: cross-browser
tags question: http://stackoverflow.com/q/25146429

http://stackoverflow.com/comment/39085871
type: Comment
type: QuestionComment
has text: @V31 Seems that I can't get it right, do you have some spare time for some sample code?
comment on: http://stackoverflow.com/q/25114453
score: 0

http://stackoverflow.com/a/25223732
has comment: http://stackoverflow.com/comment/39383260
has comment: http://stackoverflow.com/comment/39307951
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25189278
has body: Your problem seems to be having an ng-include in your directives template. ng-include is itself a directive and its creating a new scope. Your resizer directives link function however is executed as soon as the HTML is rendered, so the ng-include-d template is already there, but its content is not yet loaded (its even a seperate HTTP/GET request if the template was not loaded before). I'm sure there are more fixes, but one would be to use the onload parameter of the ng-include tag: // ... your directive ... link: function (scope, element, attrs) { function updateSizes(event) { console.log (element.find('.b').outerHeight()); } scope.ngOnload = updateSizes; } So now into your html template: &lt;div resizer&gt; &lt;div class="a"&gt;&lt;/div&gt; &lt;div class="b"&gt; &lt;div ng-include="'sometemplate.html'" onload="ngOnload()"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; This did the trick for me and the div.b elements outerHeight was not 0 anymore in the console log. I see, that you've played around with $timeout to wait for the browser. If my solution does not work for you, there must be something weird loaded in those div, probably more details needed for a solution. However a debugger statement with chrome debugger in the updateSizes function could help a lot.
type: Answer
upvote count: 1

http://stackoverflow.com/comment/135195508
comment on: http://stackoverflow.com/a/32784450
score: 0
type: AnswerComment
type: Comment
has text: this works very well, but if you're using a Google vector map and that map has been rotated (modified heading), is there any way to take that into account? otherwise the returned lat-lng values will be incorrect.

http://stackoverflow.com/comment/39216221
score: 3
has text: Like this? http://jsfiddle.net/Alfie/FPCRb/1631/
comment on: http://stackoverflow.com/q/25185083
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/95632718
score: 0
type: Comment
has text: @Gamby because floating point numbers are hard.
type: AnswerComment
comment on: http://stackoverflow.com/a/25147951

http://stackoverflow.com/a/25076799
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: Most of the browser cannot handle anything after unload process is done. You should use beforeunload event instead. $(window).bind('beforeunload', function() { alert("exiting"); window.location = 'http://www.google.com'; return false; });
downvote count: 0
answers question: http://stackoverflow.com/q/25076571
accepted answer of: http://stackoverflow.com/q/25076571

authentication
tags question: http://stackoverflow.com/q/25189352
tags question: http://stackoverflow.com/q/25081204
tag name: authentication
tags question: http://stackoverflow.com/q/25228898
type: Tag
tags question: http://stackoverflow.com/q/25132618
tags question: http://stackoverflow.com/q/25151338
tags question: http://stackoverflow.com/q/25088223
tags question: http://stackoverflow.com/q/25087636
tags question: http://stackoverflow.com/q/25136503
tags question: http://stackoverflow.com/q/25129298

http://stackoverflow.com/comment/39194098
has text: @user3703527 I shared plunkr, and by the way if you read my answer *entirely* you'd know that I answered that part in my optional section.
comment on: http://stackoverflow.com/a/25172784
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40175087
comment on: http://stackoverflow.com/a/25691717
score: 0
type: AnswerComment
type: Comment
has text: Great information, but you seem to also agree that it is not possible to transfer a large image to the GPU asynchronously, right ?

http://stackoverflow.com/q/25175492
answer count: 2
has comment: http://stackoverflow.com/comment/71272681
tagged with: http
has answer: http://stackoverflow.com/a/25177229
has comment: http://stackoverflow.com/comment/39201164
has comment: http://stackoverflow.com/comment/71307916
tagged with: javascript
type: UnansweredQuestion
tagged with: post
has answer: http://stackoverflow.com/a/25177000
upvote count: 4
has comment: http://stackoverflow.com/comment/39201372
downvote count: 0
tagged with: meteor
has body: So I want to use an sms service from 46elks in my meteor project. The following php script allows you to send an sms: &lt;? // Example to send SMS using the 46elks service // Change $username, $password and the mobile number to send to function sendSMS ($sms) { // Set your 46elks API username and API password here // You can find them at https://dashboard.46elks.com/ $username = 'u2c11ef65b429a8e16ccb1f960d02c734'; $password = 'C0ACCEEC0FAFE879189DD5D57F6EC348'; $context = stream_context_create(array( 'http' =&gt; array( 'method' =&gt; 'POST', 'header' =&gt; "Authorization: Basic ". base64_encode($username.':'.$password). "\r\n". "Content-type: application/x-www-form-urlencoded\r\n", 'content' =&gt; http_build_query($sms), 'timeout' =&gt; 10 ))); return false !== file_get_contents( 'https://api.46elks.com/a1/SMS', false, $context ); } $sms = array( 'from' =&gt; 'DummyFrom', /* Can be up to 11 alphanumeric characters */ 'to' =&gt; '+46400000000', /* The mobile number you want to send to */ 'message' =&gt; 'Hello hello!' ); sendSMS ($sms); ?&gt; Now I need this in my meteor project and I've been trying to convert it to meteors http.call(): HTTP.call("POST", "https://api.46elks.com/a1/SMS", { headers: { "Authorization": "Basic SomeLongBase46EncodedString", "Content-type": "application/x-www-form-urlencoded" }, data: { "from": "testFrom", "to": "+46701111111", "message": "test message" } }, function (error, result) { if (error) { console.log("error: " + error); } else { console.log("result: " + result); } }); But what I keep getting is the following error: error: Error: failed [403] Missing key from
favorite count: 0
type: Question
has title: meteor http post to other domain
score: 4

http://stackoverflow.com/q/25227865
tagged with: datepicker
answer count: 0
has comment: http://stackoverflow.com/comment/39301046
has title: Backbone and Jquery Datepicker - hover event firing on load of datepicker
has body: In a backbone app I am developing I have a view that renders a jquery datepicker object. I have a hover event attached to the datepicker so that hovering on a date will fire another function I have. When I render the view, the hover event fires straight away for every day in the datepicker. This does not happen if I change to a click event, so I suspect that the hover event is somehow propagating through on the initial load and firing on each date. After the initial load everything functions as expected. Changing to 'mouseenter' or 'mouseover' has no effect. Any ideas how to mitigate this unwanted event firing?
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39301260
tagged with: backbone.js
type: UnansweredQuestion

http://stackoverflow.com/comment/39095992
has text: Problem with moment() is that it uses local time on the user's computer, e.g. won't work properly if the user is outside of London or has set the time and timezone wrong on the device.
comment on: http://stackoverflow.com/a/25119991
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25182816
has body: function showDialog2() { $("#dialog1").removeClass("fade").modal("hide"); $("#dialog2").addClass("fade").modal("show"); } you want to be this
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/59530171
score: 4
answers question: http://stackoverflow.com/q/25182520
downvote count: 1
has comment: http://stackoverflow.com/comment/39211492

http://stackoverflow.com/comment/39213093
comment on: http://stackoverflow.com/a/25183183
type: Comment
has text: I got this : ReferenceError: id_name is not defined
type: AnswerComment
score: 0

http://stackoverflow.com/q/25181441
answer count: 1
tagged with: javascript
has title: how to work with large files, NodeJS streams, and pipes
favorite count: 0
has body: i'm somewhat new to NodeJS streams, and the more i learn about it, the more i believe it's not a particularly simple and stable thing. i'm attempting to read big files with csv / csv-parse (apparently the most popular CSV module with NodeJS) using the piping API, which involves using stream-transform by the same author. part of what i'm experiencing here is actually reproducible without actually using the parser, so i out-commented those parts to make the example simpler (for those who prefer JavaScript over CoffeeScript, there's also a JS version): #------------------------------------------------------------------------------- fs = require 'fs' transform_stream = require 'stream-transform' log = console.log as_transformer = ( method ) -&gt; transform_stream method, parallel: 11 # _new_csv_parser = require 'csv-parse' # new_csv_parser = -&gt; _new_csv_parser delimiter: ',' #------------------------------------------------------------------------------- $count = ( input_stream, title ) -&gt; count = 0 #............................................................................. input_stream.on 'end', -&gt; log ( title ? 'Count' ) + ':', count #............................................................................. return as_transformer ( record, handler ) =&gt; count += 1 handler null, record #------------------------------------------------------------------------------- read_trips = ( route, handler ) -&gt; # parser = new_csv_parser() input = fs.createReadStream route #............................................................................. input.on 'end', -&gt; log 'ok: trips' return handler null input.setMaxListeners 100 # &lt;&lt;&lt;&lt;&lt;&lt; #............................................................................. # input.pipe parser input.pipe $count input, 'trips A' .pipe $count input, 'trips B' .pipe $count input, 'trips C' .pipe $count input, 'trips D' # ... and so on ... .pipe $count input, 'trips Z' #.................................…
upvote count: 3
has comment: http://stackoverflow.com/comment/39214358
tagged with: node.js
downvote count: 0
tagged with: stream
has answer: http://stackoverflow.com/a/25219838
accepted answer: http://stackoverflow.com/a/25219838
type: Question
type: AnsweredQuestion
score: 3
tagged with: pipe
tagged with: coffeescript

http://stackoverflow.com/a/67940752
answers question: http://stackoverflow.com/q/25097566
score: 1
upvote count: 1
has body: I think the issue with the accepted answer (thank you for that!) is that one of the properties it tries to transfer on the element style from the Computed Style is the cssText. If we exclude from the transfer cssText and also other properties that are actually methods, it works! So building on the accepted answer and this answer, I've got: var el = document.querySelector("#answer-25097808 > div > div.answercell.post-layout--right > div.s-prose.js-post-body > pre"); // change yourId to id of your element, or you can write “body” and it will convert all document var els = el.getElementsByTagName("*"); for(var i = -1, l = els.length; ++i < l;){ el = els[i] s = getComputedStyle(el) for (let styleKey in el.style) { for (let computedStyleKey in s) { let computedStyleKeyCamelCase = computedStyleKey.replace(/\-([a-z])/g, v => v[1].toUpperCase()); if ((typeof el.style[styleKey] != "function") && (styleKey != 'cssText')){ if(styleKey == computedStyleKeyCamelCase) { el.style[styleKey] = s[computedStyleKey]; } } } } } P.S.: the above code should run in the Developer Tools console (tried it in Chrome)
has comment: http://stackoverflow.com/comment/132583866
downvote count: 0
type: Answer

http://stackoverflow.com/q/25149043
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39150127
has comment: http://stackoverflow.com/comment/39150603
has answer: http://stackoverflow.com/a/25208018
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/39150155
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39150456
has comment: http://stackoverflow.com/comment/39157284
has body: I have a three different Car Fuel type pages which they render a Partial View to load common functionality across all three. I am using knockout js to perform some dynamic calculation in that partial view. So each of my Fuel type pages has a BeginForm and the id is different for each so DieselForm, PetrolForm, ElectricForm. The fuel type is set in my viewModel and is stored in the common partial view in a hidden field - @Html.HiddenFor(model =&gt; model.FuelType) The following is some of my knockout js which is in the Partial View: var mvcModel = @Html.Raw(Json.Encode(Model)); var viewModel = ko.mapping.fromJS(mvcModel); var calculateTotal = function() { var form = $('#DieselContent form'); if (!form.valid()) return; var formData = form.serialize(); //ajax post to server method removed for brevity Is there a way I can pull the FuelType value from the viewModel property and then dynamically change the form var based on which FuelType is set - i.e - it should be either var form = $('#DieselContent form'); or var form = $('#PetrolContent form'); or var form = $('#ElectricContent form'); I tried using var fuelType = viewModel.FuelType.val(); but that throws an undefined error.
type: Question
has comment: http://stackoverflow.com/comment/39150089
has title: Access value of viewModel property with knockout?
tagged with: knockout.js

http://stackoverflow.com/comment/39246436
type: AnswerComment
comment on: http://stackoverflow.com/a/25200532
type: Comment
has text: First off, thanks for the reply. Just tried this out however and the buttons now don't do anything? Also, I read through your notes and that helps me see what you mean about the null bit. A thought I had was, would it not make sense to have the name of the first div instead of null?
score: 0

http://stackoverflow.com/q/25135354
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has title: Phonegap: cannot get data from external php server
type: UnansweredQuestion
tagged with: android
tagged with: php
has comment: http://stackoverflow.com/comment/39124207
tagged with: cordova
has body: I've been having problems for 2 days now. Before I didn't face this, but now it gives me a lot of headaches. I can't get the json data from external php server using jQuery get method in phonegap (newest version). Here is my data and code: Sample data: {"name":"test"} var url = 'http://website.com/app/user.php'; $.ajax({ type: 'GET', url: url, data: {mb: user}, success: function (data) { alert(JSON.stringify(data)); }, error: function () { alert('error'); } }); I get the result, but not the 'test' data but totally different. The alert is an html page rather than json data. I really don't know what is this. I already tried the origin * and allow internet in android manifest. I'm receiving a full valid html file instead of the data I expect My guess is the problem came from the server itself? Any suggestions?
has comment: http://stackoverflow.com/comment/39126702
type: Question
has answer: http://stackoverflow.com/a/25138411

http://stackoverflow.com/comment/39278679
score: 0
has text: @BobBrown I think you're on to something here. The fact that it works on the others is because PHP sets the right response content type header as godaddy maybe just returns the php file as text/html as Pham posted is the response.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25217469

http://stackoverflow.com/q/25152193
tagged with: css
has comment: http://stackoverflow.com/comment/39155788
favorite count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has body: i have located a number of posts on this topic, but none of them seem to address my specific need. my ultimate goal is to reproduce Nike ID Flash-based customization using html5,css3, and javascript. my immediate knee-jerk reaction was to slice up an image into a number of irregularly-shaped image slices. then use some image editing software (photoshop, etc) to create additional copies of each image slice, each bearing a different color profile. finally, i would position all images slices in such a way where they would recompose the original image, sort of like a jigsaw puzzle. and that is where i hit a wall. the very nature of each such image slice's irregular shape would result in some of its area(s) to be transparent. what makes it more complicated is the fact that some of those transparent areas are bound to reside above the active slice areas of the underlying image slices, thereby preventing the latter from registering the hover and click mouse actions. granted there are a lot of posts out there on how to make javascript ignore the transparent areas. however, i have yet to come across a solution where a transparent area would truly behave transparent, thereby allowing for the underlying image to register mouse interactions. so the question is if there is a way to make transparent areas truly transparent? or am i going all wrong about is? any suggestions would be greatly appreciated! thank you.
has title: how to make javascript ignore transparent image areas during hover and click
has comment: http://stackoverflow.com/comment/39221469
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25152282
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/q/25100808
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25100916
has answer: http://stackoverflow.com/a/25100916
tagged with: twitter-bootstrap
has body: I am learning to become a web developer. I know quite a bit of (OOP) PHP. I know a little Javascript but not much, mostly just do jQuery for simple things. I usually just use Bootstrap for the styling. Should I learn to style myself with CSS (or something like SASS) and get good with vanilla JavaScript? Would it be better for a future in web design?
has comment: http://stackoverflow.com/comment/39059947
has answer: http://stackoverflow.com/a/25100824
has title: Is it bad to use Bootstrap and jQuery?
tagged with: css
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25100824
has comment: http://stackoverflow.com/comment/39059965

http://stackoverflow.com/q/25183118
answer count: 1
tagged with: javascript
score: 0
has body: I am new to nodejs.please help. Here is my html and node.js code. I want to send email and password from login.html(client) to login.js(server) and validate from table storing email and password. login.html Submit login.js var express = require('express') , app = express() , mysql = require("mysql"); app.get('/loginme', function (req, res) { res.sendfile(__dirname + '/loginmysql.html'); }); app.post('/valid', function (req, res) { console.log("hello"); var username=req.body.email; var password=req.body.pass; var connection = mysql.createConnection({ "hostname": "localhost", "user": "root", "password": "123", "database": "login" }); connection.connect(); connection.query('SELECT * FROM id WHERE email=? AND password=?', [username,password], function(err, rows){ if (err){ throw err; }else{ for (var i in rows) { console.log('name: ', rows[i].name); name=rows[i].name; res.redirect('/option'); } } }); connection.end(); });
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39212327
has answer: http://stackoverflow.com/a/25183315
has comment: http://stackoverflow.com/comment/39212490
has title: How can I send data from client to server
has comment: http://stackoverflow.com/comment/39212306
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39212437
has comment: http://stackoverflow.com/comment/39212600
accepted answer: http://stackoverflow.com/a/25183315
type: Question

http://stackoverflow.com/comment/39289636
comment on: http://stackoverflow.com/a/25224000
score: 0
type: AnswerComment
has text: Secondly I can not add those ` ` tags in HTML because I can not add anything to ` ` and I can not add any ` ` tags anywhere. I can just use an API function to load a JS function from an external file.
type: Comment

ruby-on-rails-4
tags question: http://stackoverflow.com/q/25122978
type: Tag
tags question: http://stackoverflow.com/q/25149550
tags question: http://stackoverflow.com/q/25102135
tags question: http://stackoverflow.com/q/25095220
tags question: http://stackoverflow.com/q/25227622
tags question: http://stackoverflow.com/q/25094707
tags question: http://stackoverflow.com/q/25107442
tags question: http://stackoverflow.com/q/25163551
tags question: http://stackoverflow.com/q/25118911
tags question: http://stackoverflow.com/q/25096233
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/25181527

http://stackoverflow.com/q/25127495
has title: Writing a Atom editor plugin, animated syntax coloring
type: Question
has body: I am in for a little experiment, I just need someone to guide me.. I want to make my own custom syntax coloring (for Javascript), and that needs to be animated. Big plus would be (if it is possible) is posibility of using shader-language for fonts animating (fragment shader). Is such thing possible in Atom? EXAMPLES: Well two ideas are 'event based' animations and 'persistent-animation'. Event based: Imagine you are writing Javascript, and when you write 'function', it doesn't directly colorize, but slowly fade into it's color. Example code: keyword('function').on('creation', function(keywordAnimableObject) { keywordAnimableObject.fromTo ({opacity:0, color:rgb(0,0,0)}, {opacity:1, color:rgb(1,1,0) }); }); Persistent based: Every keyword or symbol (if, else &amp;&amp;, function, (), {}, commas and so on), would have it's own frequency. Let's say 'function' would have frequency of 0.5Hz, if else would have 0.25Hz ... and so own. This frequency would modify the keywords color 'hue' for example. keyword('function').on('idle', function(keywordAnimableObject, time) { var baseColor = rgb(1,1,0); var frequency = 0.5; var currColor = hueShiftBy(baseColor, Math.sin(time*2*PI*frequency); keywordAnimableObject.set({ color: currColor }); }); Also, if shaders would be possible, every keyword would have subtle animated pattern. Now imagine if you have error somewhere, frequency would be higher, for example 1.5Hz and more 'annoying'. allKeywords().on('notDeclared', function(keywordAnimableObject, time) { var baseColor = Color.red; var frequency = 1.5; var currColor = hueShiftBy(baseColor, Math.sin(time*2*PI*frequency); keywordAnimableObject.set({ color: currColor }); }); Ok, I realize this could be fucking annoying but I think it is worth experimenting with :). Not just for animating but really making beautiful syntax styling not just coloring..
tagged with: javascript
has comment: http://stackoverflow.com/comment/39111734
score: 0
tagged with: atom-editor
has comment: http://stackoverflow.com/comment/39110844
answer count: 1
tagged with: fragment-shader
type: AnsweredQuestion
tagged with: animated
has answer: http://stackoverflow.com/a/26237731
accepted answer: http://stackoverflow.com/a/26237731
tagged with: syntax-highlighting

http://stackoverflow.com/comment/39173554
comment on: http://stackoverflow.com/a/25161949
has text: You are right. That does indeed happen on windows. Weird, thanks for the heads up!
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39140594
comment on: http://stackoverflow.com/q/25143973
type: Comment
type: QuestionComment
has text: Sorry, it's hard to understand what you are asking. Can you rephrase?
score: 0

objective-c
tags question: http://stackoverflow.com/q/25166238
type: Tag
tags question: http://stackoverflow.com/q/25130726
tag name: objective-c
tags question: http://stackoverflow.com/q/25113957

http://stackoverflow.com/comment/39068524
type: Comment
score: 0
type: AnswerComment
has text: +1 for using charCodeAt to generate a numeric representation of the strings, then using an operator that doesn't care about ordering. However, Guffa - doesn't this lead to easy collisions? eg try it with var c = ['c', 'd', 'f']; var d = ['a', 'b', 'b'];
comment on: http://stackoverflow.com/a/25104825

http://stackoverflow.com/comment/39196146
has text: @Nick There was a bug in my regex. See the updated answer for the fixed regex. Other than that, your fiddle looks to be working.
comment on: http://stackoverflow.com/a/25173566
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39075854
has text: The reason he is using `substring` is to remove the `?`. For some reason I think that some browsers do not include the `?`, so his method may not be the safest. Regardless, you should modify your regex (replace) so that it only removes question marks from the beginning of the string so that no subsequent question marks are removed: `queryString.replace(/^\?/,'');`
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25109398
type: Comment

http://stackoverflow.com/comment/39027698
comment on: http://stackoverflow.com/q/25079366
has text: Unless something has changed with MVC5, I don't think the ModelBinder can translate the HTTP request parameters to an interface. I think you need a concrete type as an argument to your controller method.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25138932
has answer: http://stackoverflow.com/a/25151555
tagged with: javascript
has body: I have a number of arcs that make up a circle and what I need to do is on the click of an arc translate the center point of the arc and zoom in. I have done the work for translating and scalling but the center point i get for the arc needs translating to screen coords (or the larger svg container coords, not 100% on that) so that the translate actually goes to the correct place and puts the arc in the middle of the screen (camera). I have looked around on here and not had much joy. I did get the way how to get the center point of an arc off of here by using the svg's bounding box. But trying the other things I have come across I have not had anymore joy. Cheers Mark CODE var coords = getCentroid(arcParthObj); //seperated scale and translate as when both together the position it translates to changes (to the wrong one) RadarDraw.ZoomListener.scale(6); RadarDraw.ZoomListener.event(svg.transition().duration(500)); RadarDraw.ZoomListener.translate([-text[0], -text[1]]); RadarDraw.ZoomListener.event(svg.transition().duration(500)); function getCentroid(selection) { var element = selection.parentNode; // use the native SVG interface to get the bounding box var bbox = element.getBBox(); // return the center of the bounding box return [bbox.x + bbox.width/2, bbox.y + bbox.height/2]; }
linked to: http://stackoverflow.com/q/7032403
type: Question
has title: Get the center of an arc path and get the x and y that relates to in screen coords
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39131408
score: 0
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39131965

http://stackoverflow.com/comment/39295527
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25227030
type: AnswerComment
has text: It's a good idea! Just need to add the modifier g to make a global search. Thanks ;)

http://stackoverflow.com/comment/39232806
type: QuestionComment
comment on: http://stackoverflow.com/q/25193788
has text: With regards to the IE11 border radius bug, it might be because it is using compatibility view to render the page, if the page is hosted locally. [Try this solution](http://blog.jonschneider.com/2014/03/fix-css-border-radius-not-working-in.html).
score: 2
type: Comment

http://stackoverflow.com/comment/39207039
score: 0
comment on: http://stackoverflow.com/q/25180235
type: Comment
has text: try `filter` of javascript.
type: QuestionComment

http://stackoverflow.com/comment/39208222
type: QuestionComment
has text: I think the nature of the problem is well described in that post @jfriend linked (see also [this one](http://stackoverflow.com/q/23667086/1048572)). It might not be an exact duplicate, but whether the async function is `xhr.onload` or `geocoder.geocode` is not much difference. Have you tried implementing a callback solution?
comment on: http://stackoverflow.com/q/25167010
score: 0
type: Comment

http://stackoverflow.com/comment/39145181
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25143225
has text: One thing that may help is to set a string key in the path. For example, if you were to add "root" into the collection's data, and ignored that key at the client, then the data would be treated as an object and all the null keys would disappear. It's a cheap workaround, but a way to disable the array-like behavior and make the keys be treated as objects. In reality, you'll push just want to use push ids and get rid of the array keys, because it's going to cause nothing but problems in this use case.

http://stackoverflow.com/comment/39171428
type: QuestionComment
type: Comment
score: 2
has text: I think OP did make own effort to fix this problem and therefore should be reopened.
comment on: http://stackoverflow.com/q/25156933

http://stackoverflow.com/comment/39190821
score: 0
type: Comment
has text: Thanks, I thought about that as well. The Specification doesn't allow me to use text field. I was hoping something like `hideTrigger:true` would work but it didn't.
type: QuestionComment
comment on: http://stackoverflow.com/q/25170018

http://stackoverflow.com/q/25114498
possible better answer: http://stackoverflow.com/a/25114665
score: 0
has title: JS Keep loading till img src changed
has answer: http://stackoverflow.com/a/25114665
has answer: http://stackoverflow.com/a/25123436
has body: I want to monitor an unmount event on my NAS. it has a seperate page to unmount all usb drives. I've included it via iframe and want to keep the site loading until the image source has been changed to a specific source (a green bar, indicating that it has done unmounting). The reason why I want to keep it loading is because im calling it via a jquery.get function from another site, and i want it to wait till the unmounting process is done. Would be great if this is possible only in plain javascript, but if needed I can also include jquery. Here is what I got so far: &lt;script type="text/javascript"&gt; function check(){ if (!(document.getElementById("uiView_TestPic").src == "/css/default/images/finished_ok_green.gif")){ window.setTimeout(check(), 2000); }else{ alert("Done!"); }} window.onload(check()); &lt;/script&gt;&lt;/head&gt; &lt;body&gt; &lt;iframe seamless width="100%" frameborder="0" height="80%" src="http://fritz.box/usb/usb_diskcut.lua?usbdev=all"&gt;&lt;/iframe&gt; I am immediately receiving an error that the element "uiView_TestPic" does not exist, even when I add a timeout before running check. The included iFrame site stops loading as soon as all images are loading and not when the whole process is done.
has comment: http://stackoverflow.com/comment/39107991
has comment: http://stackoverflow.com/comment/39085565
accepted answer: http://stackoverflow.com/a/25123436
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39085327
linked to: http://stackoverflow.com/q/24603580
has comment: http://stackoverflow.com/comment/39085817
tagged with: image
tagged with: src
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39005351
comment on: http://stackoverflow.com/q/25071468
score: 0
has text: thats weird I tried running it on chrome and it didnt load the whole page instead it just displayed the whole code of the page.. is this because of chrome?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39184896
type: QuestionComment
has text: Here's an example with the :empty http://codepen.io/evanrbriggs/pen/ojzKv
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25167585

http://stackoverflow.com/a/25144048
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39140339
type: Answer
answers question: http://stackoverflow.com/q/25143978
upvote count: 1
has body: Ids are meant to be unique in a document. Try having delete be a class instead. To refer to just the item that was clicked use $(this) $().on('click', '.delete' function() { var $that = $(this); ...

http://stackoverflow.com/comment/39172468
score: 0
type: Comment
has text: The value is saved in the database, if amount (the property) is zero (no value) the textbox is editable and user can enter a value into it but if the user already assigned a value to amount, he has no possiblity to edit it but he must see it.
type: AnswerComment
comment on: http://stackoverflow.com/a/25161466

http://stackoverflow.com/a/25161090
has comment: http://stackoverflow.com/comment/39173366
upvote count: 1
answers question: http://stackoverflow.com/q/25161023
score: 1
has comment: http://stackoverflow.com/comment/39192273
has comment: http://stackoverflow.com/comment/39172167
downvote count: 0
has body: 1) This is the definition of jQuery when Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events. It make no sense to use it for a single ajax call, you want to use it for 2 or more so you wait for them to finish before executing some code. 2) I don't know what showDialog does but your dialog already shows because in your success handler you have $("#showoptions").dialog("show");. Again, no need at all to use when here
has comment: http://stackoverflow.com/comment/39173171
has comment: http://stackoverflow.com/comment/39176865
has comment: http://stackoverflow.com/comment/39183833
type: Answer
has comment: http://stackoverflow.com/comment/39172762
has comment: http://stackoverflow.com/comment/39173657

http://stackoverflow.com/comment/39094650
comment on: http://stackoverflow.com/q/25119495
type: Comment
type: QuestionComment
has text: Why would you want to do that? Why because `this` is not `this` inside that function. Your comments show that.
score: 0

http://stackoverflow.com/a/43693707
downvote count: 0
answers question: http://stackoverflow.com/q/25220621
type: Answer
upvote count: 1
score: 1
has body: in my meteor apps i'm using tap:i18n package, it is well documented see: https://atmospherejs.com/tap/i18n to start with browserlanguage i use in client/main.js (or in any other init file on client) getBrowserLanguage = function() { return navigator.language || navigator.userLanguage }; Meteor.startup(function() { TAPi18.setLanguage(getBrowserLanguage); }); say you create a template for your languageswitcher like: EN NL FR then my template helper looks like this: Template.LanguageSwitcher.Oncreated(function(){ Session.set('language', navigator.language || navigator.userLanguage); }); Template.LanguageSwitcher.events({ 'click .en' : function(){ Session.set('language','en'); TAPi18n.setLanguage('en'); }, 'click .nl' : function(){ Session.set('language','nl'); TAPi18n.setLanguage('nl'); }, 'click .fr' : function(){ Session.set('language','fr'); TAPi18n.setLanguage('fr'); } }); I'm using a extra global session cause i find it easy to work with translated content in my collections. Last thing to do is create some json files with the translations, just create a folder in root folder named i18n and in this folder create files using the syntax : [language].i18n.json ( ex nl.i18n.json) { "original string" : "translation" } now you'll be able to use this in your templates like {{_ "original string"}} hope this gives you a headstart on how to implement internationalization.

http://stackoverflow.com/comment/39279625
has text: Can't you send your whole `data` (containing the URLs) in a single `POST` request and get the result for each URL in the form of json objects? This will require only one Ajax call.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25218709

http://stackoverflow.com/comment/43817405
comment on: http://stackoverflow.com/a/27136128
type: AnswerComment
score: 0
type: Comment
has text: Thank you, Rick! Unfortunately the project is over and I'm not able to verify if this solution works for me. But nevertheless I mark your answer as accepted as definitely it's most helpful.

http://stackoverflow.com/q/25075427
has comment: http://stackoverflow.com/comment/39012128
tagged with: iframe
has body: So I'm building this register with a menu to the left and an iframe to the right. Everything works perfectly with the iframe and navigation, but there's one thing missing. I would like to have the url of the parent page change from: "address.com/help" to for example: "address.com/help/unicorn" when I click on the "unicorn.html" link to the left in the navigation. I.e, make the active site in the iframe become an extension of the parent url. I've seen the var iframe = $('iframe'); var contentWnd = iframe.attr('contentWindow'); var url = contentWnd.window.location.href; window.location.hash = url; on a different thread, but I can't seem to get that to work either.
type: Question
has answer: http://stackoverflow.com/a/25075522
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39017416
answer count: 1
type: UnansweredQuestion
has title: Show the active site in an iframe as an extension to the parent page url
has comment: http://stackoverflow.com/comment/39085234

http://stackoverflow.com/q/25130564
tagged with: javascript
has answer: http://stackoverflow.com/a/25130634
has title: Can attackers bypass Ajax Form with JavaScript switched off
has comment: http://stackoverflow.com/comment/39115667
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39116094
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25130634
has body: I have a form on my website with all the validation done on jQuery and PHP and sanitizing done by PHP of user information's. A quick question came into my mind. Can a attacker (Hacker) bypass Ajax Form with JavaScript Switched Off? Here is the HTML &lt;form action="" method="post" id="form-contact-us" enctype="multipart/form-data"&gt; &lt;input type="hidden" id="action" name="action" value="contact"&gt; &lt;input type="text" class="hide" value="" name="challenge" id="challenge"&gt; &lt;div class="col-md-6 mt-10"&gt; &lt;label&gt;Your Full Name&amp;nbsp;&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;input type="text" class="form-control" id="name" name="name" placeholder="Your Full Name"&gt; &lt;/div&gt; &lt;div class="col-md-6 mt-10"&gt; &lt;label&gt;Your Email Address&amp;nbsp;&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;input type="text" class="form-control" id="email" name="email" placeholder="Your Email Address"&gt; &lt;/div&gt; &lt;div class="col-md-6 mt-10"&gt; &lt;label&gt;Phone Contact&lt;/label&gt; &lt;input type="text" class="form-control" id="phone" name="phone" placeholder="Phone Contact"&gt; &lt;/div&gt; &lt;div class="col-md-6 mt-10"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="col-md-6 band mt-10"&gt; &lt;label for="firstname"&gt;Your Message&amp;nbsp;&lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt; &lt;textarea class="form-control" rows="3" id="message" name="message"&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;div class="btn-group band"&gt; &lt;span id="loader"&gt;&lt;/span&gt; &lt;button type="submit" class="btn btn-primary pull-right" style="margin-right: 14px; border-radius: 0px;"&gt;SEND &lt;span class="glyphicon glyphicon-chevron-right"&gt;&lt;/span&gt;&lt;/button&gt; &lt;/div&gt; &lt;/form&gt; JavaScript $("form#form-contact-us").on("submit", function (){ var form, challenge, name, email, phone, message; form = $("form#form-contact-us").serialize(); challenge = $("#challenge").val(); name = $("form#form-contact-u…
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39115508
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39115516
has comment: http://stackoverflow.com/comment/39115549
has comment: http://stackoverflow.com/comment/39115615

http://stackoverflow.com/comment/39193907
has text: So, what is the problem?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25172486

http://stackoverflow.com/comment/39075598
type: QuestionComment
has text: Your "markers" array is an array of anonymous objects, not google.maps.Markers. The elements of that array do not have a setMap method.
comment on: http://stackoverflow.com/q/25108952
score: 0
type: Comment

http://stackoverflow.com/a/25244819
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25137757
type: Answer
has body: After some research it seems that Service Worker may be the answer to this problem. It is still very early days. Check https://jakearchibald.github.io/isserviceworkerready/
upvote count: 1

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/25090686
tags question: http://stackoverflow.com/q/25113414
tags question: http://stackoverflow.com/q/25173830
tags question: http://stackoverflow.com/q/25079549
tags question: http://stackoverflow.com/q/25115723
tags question: http://stackoverflow.com/q/25091112
tags question: http://stackoverflow.com/q/25228754
tags question: http://stackoverflow.com/q/25177848
tags question: http://stackoverflow.com/q/25080040
tags question: http://stackoverflow.com/q/25095877
tags question: http://stackoverflow.com/q/25081925
tags question: http://stackoverflow.com/q/25121007
tags question: http://stackoverflow.com/q/25173636
tags question: http://stackoverflow.com/q/25174727
tags question: http://stackoverflow.com/q/25127867
tags question: http://stackoverflow.com/q/25210156
tags question: http://stackoverflow.com/q/25096115
tags question: http://stackoverflow.com/q/25091357
tags question: http://stackoverflow.com/q/25187410
tags question: http://stackoverflow.com/q/25073510
tags question: http://stackoverflow.com/q/25164665
tags question: http://stackoverflow.com/q/25097210
tags question: http://stackoverflow.com/q/25169805
tags question: http://stackoverflow.com/q/25182009
tags question: http://stackoverflow.com/q/25183777
tags question: http://stackoverflow.com/q/25149388
tags question: http://stackoverflow.com/q/25115859
tags question: http://stackoverflow.com/q/25083474
tags question: http://stackoverflow.com/q/25224005
tags question: http://stackoverflow.com/q/25211095
tags question: http://stackoverflow.com/q/25182912
tags question: http://stackoverflow.com/q/25216990
tags question: http://stackoverflow.com/q/25095353
tags question: http://stackoverflow.com/q/25080744
tags question: http://stackoverflow.com/q/25140419
tags question: http://stackoverflow.com/q/25185490
tags question: http://stackoverflow.com/q/25198241
tags question: http://stackoverflow.com/q/25205056
tags question: http://stackoverflow.com/q/25167890
tags question: http://stackoverflow.com/q/25148651
tags question: http://stackoverflow.com/q/25142325
tags question: http://stackoverflow.com/q/25131200
tags question: http://stackoverflow.com/q/25091772
tags question: http://stackoverflow.com/q/25215404
tags question: http://stackoverflow.com/q/25130071
tags question: http://stackoverflow.com/q/25094648
tags question: http://stackoverflow.com/q/25172753
tags question: http://stackoverflow.com/q/25148646
tags question: http://stackoverflow.com/q/25140413
tags question: http://stackoverflow.com/q/25091597
tags question: http://stackoverflow.com/q/25160276
tags question: http://stackoverflow.com/q/25072474
tags question: http://stackoverflow.com/q/25179347
tags question: http://stackoverflow.com/q/25117383
tags question: http://stackoverflow.com/q/25109691
tags question: http://stackoverflow.com/q/25176418
tags question: http://stackoverflow.com/q/25112363
tags question: http://stackoverflow.com/q/25174122
tags question: http://stackoverflow.com/q/25157064
tags question: http://stackoverflow.com/q/25122835
tags question: http://stackoverflow.com/q/25083364
tags question: http://stackoverflow.com/q/25148622
tags question: http://stackoverflow.com/q/25128278
tags question: http://stackoverflow.com/q/25100175
tags question: http://stackoverflow.com/q/25230135
tags question: http://stackoverflow.com/q/25185636
tags question: http://stackoverflow.com/q/25212726
tags question: http://stackoverflow.com/q/25164276
tags question: http://stackoverflow.com/q/25164482
type: Tag
tags question: http://stackoverflow.com/q/25098980
tags question: http://stackoverflow.com/q/25159385
tags question: http://stackoverflow.com/q/25201728
tags question: http://stackoverflow.com/q/25204312
tags question: http://stackoverflow.com/q/25130465
tags question: http://stackoverflow.com/q/25220348
tags question: http://stackoverflow.com/q/25197781
tags question: http://stackoverflow.com/q/25078340
tags question: http://stackoverflow.com/q/25170758
tags question: http://stackoverflow.com/q/25213904

http://stackoverflow.com/comment/39127269
has text: I guess so. I'm beginning to think the idea of a user uncovering their own keys in some way is not that dangerous. But the question of where to store the keys so that nobody other than the authorised user can see them is still relevant.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25130977

http://stackoverflow.com/a/25176553
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25176493
answers question: http://stackoverflow.com/q/25176493
has body: there may be below possible reasons try to change these and check it works or not 1). ScriptManager.RegisterStartupScript(this, this.GetType(), "msg", "alert('hi!')", true);//no need to use javascript with alert when bool set to true 2). ScriptManager.RegisterStartupScript(page, page.GetType(), "msg", "alert('hi!')", true); 3). ClientScript.RegisterClientScriptBlock(GetType(), "sas", "&lt;script&gt; alert('hi!');&lt;/script&gt;", true);
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39200829
type: Answer
has comment: http://stackoverflow.com/comment/39200790
score: 5

http://stackoverflow.com/comment/39007474
has text: show your servlet code. check in browser network tab is your ajax call success or not.
score: 0
comment on: http://stackoverflow.com/q/25072453
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25180469
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/39207176
has answer: http://stackoverflow.com/a/25180598
upvote count: 0
downvote count: 5
tagged with: javascript
tagged with: jquery
has title: Nested Json retrieval
accepted answer: http://stackoverflow.com/a/25180598
has body: I have the JSON in this format: { "child": { "data": 45, "child": { "data": "12", "child": { "data": "23", "child": { "data": "11", "child": { "data": "56", "child": { "data": "76", "child": {} } } } } } } } My issue is dynamically using jQuery get the data of each child and retrieve on the page
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39207364
type: AnsweredQuestion
score: -5

http://stackoverflow.com/q/25199615
tagged with: jquery
favorite count: 0
type: Question
score: 5
tagged with: android
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: how to add to 'Add to homescreen' popup for android mobile
has body: Does anyone know any example, how I can show popup message for 'Add to homescreen' in chrome. In my web app I wanna show popup message first time user open web app to save short cut icon. Using html5 and jquery. (so that my webapp will run as native app next time).
upvote count: 5
has answer: http://stackoverflow.com/a/32245242
tagged with: jquery-mobile
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/34369951
downvote count: 0
duplicate of: http://stackoverflow.com/q/34369951

http://stackoverflow.com/a/39596875
score: 0
has body: So, Ive read a bunch of different threads on this and most of what Ive seen is pretty complicated. I went a much more simple route. $('.reveal-overlay').click(function(e){ var loc = document.getElementById('myFrame').src; var stoploc = loc.replace("?autoplay=1", ""); document.getElementById('myFrame').setAttribute('src', stoploc); }); $('.playVideo').click(function(e){ var loc = document.getElementById('myFrame').src; var autoloc = loc + "?autoplay=1"; document.getElementById('myFrame').setAttribute('src', autoloc); }); This will basically just append ?autoplay=1 to a YouTube video once the modal is opened. The class .playVideo is on whatever button youre using to open your modal window. The class .reveal-overlay is created by Foundation. So when the overlay is clicked it removes any ?autoplay=1 from the video url. Hope this helps anyone running into this problem. It's simple and should work for multiple different videos, plus, if someone has js turned off, it won't play anything in the background. One more thing, the video you load should be a regular non-autoplay video. This will turn it into an autoplay after clicked ony and return it to non-autoplay when closed.
type: Answer
answers question: http://stackoverflow.com/q/25175166

http://stackoverflow.com/comment/39076226
comment on: http://stackoverflow.com/q/25109044
type: Comment
score: 0
has text: @RobSchmuecker All of the ajax calls I have work great on my mobile device. The Ajax calls aren't the issue. The issue is the persistance of the js variables comics and checkedItems between the JQM pages. Those arrays persist just fine on my desktop computer but not in my android browser.
type: QuestionComment

http://stackoverflow.com/q/25222909
answer count: 2
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How do I link to a JavaScript function?
has answer: http://stackoverflow.com/a/25222953
has body: I have JavaScript that makes it so that when you click on a string of text it creates a div that slides down and expands an area bellow it to show more information. I want to be able to have a link on a different page of my website that when clicked takes you to the page with the string of text ALREADY clicked on and expanded. How would I do this? JSFidldle: http://jsfiddle.net/hr07tn16/2/ JavaScript: $('.moreInfo').on('click', function(){ var target = $(this).data('target'); $('.expandable').not('.' + target).slideUp(500, function(){ $('.' + target).slideDown(500, function(){ }); }); }); HTML More Info More Info RED GREEN CSS: .expandable { width: 997px; height: 300px; } .red { color: white; position: relative; top: 380px; border: 1px solid rgba(0,0,0,.1); } .green { color: white; position: relative; top: 380px; border: 1px solid rgba(0,0,0,.1); }
has answer: http://stackoverflow.com/a/25222946
downvote count: 2
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/117735385
score: 0
type: AnswerComment
has text: The answer also added
type: Comment
comment on: http://stackoverflow.com/a/66369211

http://stackoverflow.com/a/79330275
has body: For Bootstrap v5.3 var carousel = new bootstrap.Carousel('#carousel_1', { interval: 2000, touch: true, keyboard: true, pause: false, ride: true }); Call it on a button click function ChangeCarouselInterval(nNewInterval) { carousel.dispose(); carousel = new bootstrap.Carousel('#carousel_1', { interval: parseInt(nNewInterval), touch: true, keyboard: true, pause: false, ride: true }); }
score: 0
answers question: http://stackoverflow.com/q/25147394
type: Answer

http://stackoverflow.com/comment/39194739
comment on: http://stackoverflow.com/q/25162191
score: 0
type: Comment
type: QuestionComment
has text: ps:sorry for my English capability,but I think you can understand it.:)

http://stackoverflow.com/comment/39136392
comment on: http://stackoverflow.com/q/25141569
score: 0
type: Comment
has text: Is your server API actually receiving the OPTIONS request? If it is receiving the request, is it properly replying?
type: QuestionComment

http://stackoverflow.com/comment/39136360
type: QuestionComment
type: Comment
has text: Have you read the docs? Do you know if it is at all possible?
comment on: http://stackoverflow.com/q/25142086
score: 0

jshowoff
tags question: http://stackoverflow.com/q/25153158
type: Tag
tag name: jshowoff

http://stackoverflow.com/q/25113342
tagged with: input
has body: Short question QUESTION How can I access the string value "2013-10-20" from the input in HTML to show it in JavaScript? HTML &lt;input name="DateStart" class="inputPanel" type="text" size="20" maxlength="20" value="2013-10-20"&gt; JAVASCRIPT &lt;script javascript="javascript" type="text/javascript"&gt; alert("Value: " + ???) &lt;/script&gt; Thanks!
has answer: http://stackoverflow.com/a/25113377
answer count: 4
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/3936249
linked to: http://stackoverflow.com/q/2435525
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25113365
has title: input string in javascript
accepted answer: http://stackoverflow.com/a/25113377
possible better answer: http://stackoverflow.com/a/25113365
downvote count: 0
tagged with: javascript
score: 1
tagged with: string
has answer: http://stackoverflow.com/a/25113397
favorite count: 0
has answer: http://stackoverflow.com/a/25113389
tagged with: http://stackoverflow.com/tag/html

nodelist
type: Tag
tags question: http://stackoverflow.com/q/25175798
tag name: nodelist

http://stackoverflow.com/a/25079840
has comment: http://stackoverflow.com/comment/39029668
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39026896
has comment: http://stackoverflow.com/comment/39027085
downvote count: 0
has comment: http://stackoverflow.com/comment/39029605
has comment: http://stackoverflow.com/comment/39027998
has comment: http://stackoverflow.com/comment/39030373
has comment: http://stackoverflow.com/comment/39028599
answers question: http://stackoverflow.com/q/25078070
type: Answer
has comment: http://stackoverflow.com/comment/39030758
accepted answer of: http://stackoverflow.com/q/25078070
has body: I think to get the sort of functionality you are after you are going to need to do it with JavaScript so that you can access the _renderItem function. Something like this: $(document).ready(function () { $.get('Rack/Autocomplete', function (data) { $('input[name="searchTerm"]').autocomplete({ minLength: 0, source: data, create: function () { $(this).autocomplete('instance')._renderItem = function (ul, item) { return $('&lt;li&gt;').append('&lt;a&gt;' + item.label + '&lt;br&gt;' + item.name + '&lt;br&gt;' + item.label + '&lt;/a&gt;') .appendTo(ul); }; } }); }); }); Can see it working in this jsfiddle. For older versions of jQuery: create: function () { $(this).data("ui-autocomplete")._renderItem = function (ul, item) { return $('&lt;li&gt;').append('&lt;a&gt;' + item.label + '&lt;br&gt;' + item.name + '&lt;br&gt;' + item.label + '&lt;/a&gt;') .appendTo(ul); }; } or even older: create: function () { $(this).data("autocomplete")._renderItem = function (ul, item) { return $('&lt;li&gt;').append('&lt;a&gt;' + item.label + '&lt;br&gt;' + item.name + '&lt;br&gt;' + item.label + '&lt;/a&gt;') .appendTo(ul); }; }
has comment: http://stackoverflow.com/comment/39027386
has comment: http://stackoverflow.com/comment/39026444
has comment: http://stackoverflow.com/comment/39028884
has comment: http://stackoverflow.com/comment/39027671
upvote count: 1
has comment: http://stackoverflow.com/comment/39029650
score: 1
has comment: http://stackoverflow.com/comment/39029449
has comment: http://stackoverflow.com/comment/39029534
has comment: http://stackoverflow.com/comment/39030509
has comment: http://stackoverflow.com/comment/39027022
has comment: http://stackoverflow.com/comment/39029722
has comment: http://stackoverflow.com/comment/39028120

http://stackoverflow.com/a/25181251
has comment: http://stackoverflow.com/comment/39211663
downvote count: 0
has body: In javaScript var innerTable = document.getElementById('myTable'); var headerTable = document.getElementById('header'); var totalColumn = headerTable.rows[0].cells.length; for (var i = 0; i < totalColumn; i++) { var innerTableWidth = innerTable.rows[0].cells[i].offsetWidth var headerTableWidth = headerTable.rows[0].cells[i].offsetWidth if (innerTableWidth < headerTableWidth) innerTable.rows[0].cells[i].width = headerTableWidth; else headerTable.rows[0].cells[i].width = innerTableWidth; } HTML is ID Model Brand 1 BMW 320 2 Audi A4 3 Some_kind_of_car Very_long_name_to_exist SEE DEMO HERE
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25177809
has comment: http://stackoverflow.com/comment/39224649
score: 1

http://stackoverflow.com/q/25125992
tagged with: hide
tagged with: image
type: Question
has answer: http://stackoverflow.com/a/25127719
has answer: http://stackoverflow.com/a/25126063
tagged with: button
tagged with: javascript
tagged with: show
answer count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39110579
has title: Javascript - Show/hide pictures with buttons
has body: I would like to improve my script so I can have more buttons which can show one image each. (I need 49 buttons). At the moment I only have two well working buttons. How should I write my script below so I can make 49 buttons? JavaScript HTML box1 box2
score: 0

http://stackoverflow.com/comment/39185450
has text: I am bit confused i am already having a class for the element and can you please redo your code so tat I know where do I use the current blurred element
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25167768

http://stackoverflow.com/comment/39204234
type: QuestionComment
comment on: http://stackoverflow.com/q/25178416
score: 0
type: Comment
has text: Can you make some simple jsfiddle, where you replace your ajax calls with just some dummy data?

http://stackoverflow.com/comment/39074692
comment on: http://stackoverflow.com/a/25108521
has text: I'm not familiar with hostinger so I can't help you more than this.. sorry :/
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25143562
has comment: http://stackoverflow.com/comment/39139418
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/52493305
has comment: http://stackoverflow.com/comment/39139549
has comment: http://stackoverflow.com/comment/39139492
has body: I think you are looking for code like: $(document).ready(function() { $("#allstates").on("change", function() { var checked = $(this).prop("checked"); $(this).parents(".controls") .first() .find("input[type=checkbox]") .prop("checked", checked); }); }); JsFiddle Example When the state of the checkbox with the id allstates changes, get the checkbox value, find the first parent html element with a class called controls and then only update all the checkboxes in that element with the value of checked.
answers question: http://stackoverflow.com/q/25143083
downvote count: 0
has comment: http://stackoverflow.com/comment/39141732

http://stackoverflow.com/q/25130876
has answer: http://stackoverflow.com/a/25134205
accepted answer: http://stackoverflow.com/a/25134205
score: 0
has title: return value from devtools.inspectedwindow.eval
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am trying to return the value of an eval to my function and I have not been able to get it working. I have tried a few things all which have been giving me null or undefined. Here is my code this.isLoggedIn = function() { var q = 'document.getElementById("game").contentWindow["' + windowMembers[gints] + '"]["' + gamevars[lints] + '"]["' + loginvars[l2ints] + '"]()["' + loginvars2[flogin] + '"]()'; chrome.devtools.inspectedWindow.eval(q, function(s,e){console.log(s); s}); }; The console.log shows the correct value is being received in the callback function I have also tried chrome.devtools.inspectedWindow.eval(q, function(s,e){console.log(s); return s}); return chrome.devtools.inspectedWindow.eval(q, function(s,e){console.log(s); s}); return chrome.devtools.inspectedWindow.eval(q, function(s,e){console.log(s); return s}); none of these have worked for me and I believe it has something to do with the fact that. A: chrome.devtools.inspectedWidow.eval does NOT return a value B: when returning a value from the callback function it is just ending said callback function so I was hoping some one here could help me achieve the following run the function isLoggedIn() have the eval run on the query obtain the value of the query (in this case true\false) have the isLoggedIn function return the eval data I am writing this for a devtools extensions for debugging certain html5\js games.
type: AnsweredQuestion
tagged with: google-chrome-devtools
tagged with: google-chrome
type: Question
tagged with: javascript

http://stackoverflow.com/q/25079469
has title: Using Node.js file system is it smarter to run through 80 files looking for a property than it is to run through conditions in one file?
type: AnsweredQuestion
tagged with: performance
has comment: http://stackoverflow.com/comment/39048933
has comment: http://stackoverflow.com/comment/39022965
type: Question
accepted answer: http://stackoverflow.com/a/25081750
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39024509
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25081750
has comment: http://stackoverflow.com/comment/39024073
tagged with: fs
tagged with: node.js
downvote count: 0
has body: Let me explain: I am building a node.js project that needs to check if dates match or fall within a range. If there is a match, I need to store a reference to the path of a file on the server. There are about 80 of these files. They are configurations. I can write a giant condition in a function that can run through and check the dates. It will be fast, I'm sure. The real question is, is it smarter to let each config file store it's own date (the date is a calculation based on a date that will have to be passed in to the config file), then loop through the files, requiring each one, finding the property holding the date, checking it, then either storing the files path or not? The requiring approach will be much less code, and it will be cleaner, but I'm wondering if I will take a huge performance hit. Is it better to just write a giant list of conditions? Sorry if this is not clear. Let me know if I need to include anything to help clarify the question.
score: 1

http://stackoverflow.com/a/25164567
has comment: http://stackoverflow.com/comment/39178926
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25164287
answers question: http://stackoverflow.com/q/25164287
type: Answer
has body: In javascript you can find your element in various ways. document.getElementById is a function that (like the name suggests) finds your html element by the id attribute. In javascript you can set the value of your html element like this: test.html &lt;input type="text" id="my_var" value=""&gt; test.js var test = "hello world"; document.getElementById('my_var').value = test; I can also recommend jQuery if you want to do more html-element manipulations. jQuery is very easy if you know a little CSS, you can select element with the same way, with jQuery you can manipulate the HTML instead of the style. It would look something like this: test.html &lt;script src="path-to/jquery.js"&gt;&lt;/script&gt; &lt;script src="path-to/test.js"&gt;&lt;/script&gt; .... &lt;input type="text" id="my_var" value=""&gt; test.js var test = "hello world"; jQuery('#my_var').val( test );

http://stackoverflow.com/a/25162876
has comment: http://stackoverflow.com/comment/39176809
answers question: http://stackoverflow.com/q/25162831
has comment: http://stackoverflow.com/comment/39176052
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39176420
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/42771456
has body: Just nest them ? funcA("firstParameter", function(callbackData1){ funcA("secondParameter", function(callbackData2){ }); }); Another option would be promises, but for just two async functions, nesting really is the easiest !
has comment: http://stackoverflow.com/comment/39176902
has comment: http://stackoverflow.com/comment/39177233
has comment: http://stackoverflow.com/comment/39175686

http://stackoverflow.com/comment/39079607
type: Comment
has text: Can you provide jsfiddle of your problem so we can see what problem is there....
type: QuestionComment
comment on: http://stackoverflow.com/q/25111242
score: 0

http://stackoverflow.com/q/25148378
tagged with: javascript
favorite count: 0
tagged with: colors
has answer: http://stackoverflow.com/a/25148620
score: -2
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25148620
downvote count: 3
upvote count: 1
type: Question
has title: How to change color of certain area in page with java script?
has body: I have come across "bookmarklets" and found out I can change background color of any page. What I tried and failed was changing of some particular area. I have taken screenshot of debugger in opera. The color I want to change is highlighted on the right side. I hope this screen is sufficient to generate bookmarklet script to past in the address bar. I want that color to be white. https://i.sstatic.net/QYgcX.jpg Could you please help me generating the bookmarklet code?
tagged with: bookmarklet
answer count: 1

http://stackoverflow.com/q/25178166
tagged with: kendo-asp.net-mvc
type: AnsweredQuestion
type: Question
tagged with: asp.net-mvc
has body: I'd appreciate if someone can advise on my issue. In my .cshtml view I have: @Html.Partial("AccountsGrid", context.CustomerAccounts) When the above link with class k-button accountSearch is clicked KendoWindow appears: $(document).ready(function () { var accwindow = $(".accountsWindow"); acc = $(".accountSearch") .on("click", function () { accwindow.data("kendoWindow").open(); }); if (!accwindow.data("kendoWindow")) { accwindow.kendoWindow({ actions: [ ... ] }); } }); The grid is rendered as partial (AccountsGrid.cshtml)and appears in popup kendoWindow: @model IEnumerable<DAL.Model.CustomerAccount> @(Html.Kendo().Grid(Model) .Name("AccountsGrid") .Columns(columns => { columns.Bound(u => u.IBAN).Template(@ @item.IBAN ).Title("IBAN").HtmlAttributes(new { style = "width:150px" }); }) .Pageable() ) I want to get the model value @item.IBAN passing in with function getCustomerAccount(@item.IBAN). The error occurs when function is called, it says: US11223344 is not defined where US11223344 is the @item.IBAN value and is correct but why there is an error? I dont see the alert as well.
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25178475
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25178475
has title: Function parameter is not defined onclick in KendoGrid, ASP.NET MVC
has comment: http://stackoverflow.com/comment/39203556

http://stackoverflow.com/a/25125089
has body: update html code as &lt;div&gt; &lt;input type="text" id="typetextbox" onkeypress="return keyPress(event)" maxlength="120" autocomplete="off" /&gt; &lt;button type="submit" id="submit" onblur="submit"&gt; &lt;/button&gt; &lt;/div&gt; java script implementation: for every keypress the function keyPress(event) will be called. the function definition can be var keyPress = function(e){ if(e.keyCode == 13){ send(); } return true; } the function send consists of code for updating the message box
downvote count: 0
answers question: http://stackoverflow.com/q/25123720
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/25165908
has comment: http://stackoverflow.com/comment/39181081
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25166073
type: Question
score: 0
has body: I have ready many post on this but none of them seem to help me out with my problem or i don't understand their answer in a way to convert it to my script. I want to add a item to an array from the input as long as it does not already exist in the array. please any help is greatly appreciated. i would imagine i need to use a for loop and then compare the new item to the existing items in the array to check if the item already exist. var Fruit = ['apple', 'bannanna', 'rasberry', 'watermelon', 'grape', 'orange']; $('#addFruit').on('click', function(e) { e.preventDefault(); var val = $('#fruitAdd').val(); Fruit.unshift(val); console.log(Fruit); }); HTML Submit
has title: push to array as long as the item does not already exist in array using javascript
answer count: 3
has answer: http://stackoverflow.com/a/25166079
has answer: http://stackoverflow.com/a/25165962
has comment: http://stackoverflow.com/comment/39181293
tagged with: push
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25165962
has answer: http://stackoverflow.com/a/25166073

http://stackoverflow.com/comment/39192613
type: QuestionComment
has text: emitter = event.EventEmitter(), it is an EventEmitter() object. And getSnmp(OID,eventName) uses the net-snmp library as a get request. It takes OIDs in an array and an event name string to response with the results. When it receives results it emits the event with the data as a callback parameter. Ill update the code to more accurately reflect that.
type: Comment
comment on: http://stackoverflow.com/q/25171822
score: 0

http://stackoverflow.com/q/25089484
has body: i have a partial view that itself is inside a partial view. The content inside the inner most partial view can be rendered multiple times. i have a javascript code that is significant only for the innermost view. SO what happens is when the content is rendered more than once the javascript code is added twice and event are called twice. e.g var isDccmAndReady = '@isDccmAndReady'; $(document).ready(function() { $(function() { $("input[name='ReportDate']").change(function() { if (isDccmAndReady) { var d = new Date(); var currentDate = (d.getMonth() + 1) + "/" + +d.getDate() + "/" + d.getFullYear(); var dateSelected = $(this).val(); if (new Date(dateSelected) &gt; new Date(currentDate)) { var answer = confirm("The contract has been already reported, are you sure you wish to continue?"); if (answer) { return true; } else { $(this).val('@Model.OriginalReportDate.Value.ToShortDateString()'); return false; } } } return false; }); }); Now if the textbox is embedded twice onchange event is called two times when something changes in one of the textbox. how to circumvent this issue?
type: Question
has title: to have a javascript code only added once when using partial view
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25107429
tagged with: asp.net-mvc-partialview
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25089607

http://stackoverflow.com/a/25135465
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25135400
score: 1
upvote count: 1
has body: function hello is in local scope of T. define T like this. function T() { this.hello = function() { alert("hello"); } }

http://stackoverflow.com/q/25082421
accepted answer: http://stackoverflow.com/a/25082466
has comment: http://stackoverflow.com/comment/39025423
type: Question
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39025375
possible better answer: http://stackoverflow.com/a/25082701
has body: I have a table which look like this: Apple x Ball x Now what I want to do is delete the "tr" which 'x' has been clicked. For this I need to let my delete function to know which 'x' has been clicked. But 'this' as a parameter seems like not working. Note: I can't put id in my table elements.
has title: passing 'this' on onClick event function call
answer count: 3
has answer: http://stackoverflow.com/a/53333766
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25082466
has comment: http://stackoverflow.com/comment/39025556
upvote count: 1
has comment: http://stackoverflow.com/comment/39025382
has answer: http://stackoverflow.com/a/25082701

storage
tag name: storage
tags question: http://stackoverflow.com/q/25110563
tags question: http://stackoverflow.com/q/25130117
tags question: http://stackoverflow.com/q/25149944
type: Tag

http://stackoverflow.com/comment/39224679
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25189426
type: QuestionComment
has text: `str = str.replace('.', '\\.');`. That page you refered too also says it: _as a literal part of a name, it must be escaped with with two backslashes_

http://stackoverflow.com/comment/39025964
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25082307
has text: @Jhawins he's copying every attribute to the new element
score: 0

http://stackoverflow.com/comment/39145148
comment on: http://stackoverflow.com/q/25146506
score: 2
has text: Why not test it? Just run them both a couple of hundred thousand times and see which takes longer?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39084895
comment on: http://stackoverflow.com/a/25114176
score: 0
type: AnswerComment
type: Comment
has text: I've been writing like that for a long time and at one point I got lost, so something had to change. And now Im trying to assign as much scirpt to elements themselves as possible so I know where to find the right script.

http://stackoverflow.com/a/25107360
type: Answer
has body: You should rename App.ApplicationController to App.IndexController since you located on index route for your jsbin example. Demo
score: 0
answers question: http://stackoverflow.com/q/25107122

http://stackoverflow.com/q/25126436
has body: I have just started with ember and am slowly getting my head round it. This is most likely an incredibly easy question to answer but i've been trying to find an answer for ages now and have had no luck. I am using ember-tools and have hooked up my ember app with my Laravel API successfully. I use Fractal as the transformer for the API and am using the JsonAPISerializer which I believe is the correct format for Ember (take a look here). I have just been trying to plug in data from a user record into the template to get going. Here's the JSON returned: { "user":[ { "id":1, "firstName":"Jacob", "surname":"Windsor", "country":"", "city":"", "pro":false, "emailSubscribed":false, "emailConfirmed":false, "artist":true, "blogger":false, "avatar":false, } ] } This is the route I have defined: this.resource('user', {path: '/user/:user_id'}); And in user_route.js: var UserRoute = Ember.Route.extend({ model: function(params){ return App.User.find(params.user_id); } }); module.exports = UserRoute; The user.js model: var attr = DS.attr; var User = DS.Model.extend({ firstName: attr('string'), surname: attr('string'), country: attr('string'), city: attr('string'), pro: attr('boolean'), emailSubscribed: attr('boolean'), emailConfirmed: attr('boolean'), artist: attr('boolean'), blogger: attr('boolean'), avatar: attr('boolean'), }); module.exports = User; And finally the handlebars template: user {{firstName}} No errors appear in the console and the resource is retrieved from the API if I navigate to /#/user/1. I thought maybe I had got something wrong with naming conventions but then maybe the resource wouldn't be retrieved from the API at all. If any more information is required to help me out on this please say. Update 1 In ember inspector, if I click on the user model (<App.User:ember333:1>) it comes up with the model data but it is not populated from the API response. So all string values are empty and all booleans false but the ID is correct so I assume ember has retrieved it fr…
score: 0
has comment: http://stackoverflow.com/comment/39108696
tagged with: ember.js
has comment: http://stackoverflow.com/comment/39108853
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39109556
has comment: http://stackoverflow.com/comment/39108342
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39109261
has comment: http://stackoverflow.com/comment/39109113
has title: Ember JS not inserting data from API into the template
type: Question
has comment: http://stackoverflow.com/comment/39108778
has comment: http://stackoverflow.com/comment/39109039
tagged with: javascript

http://stackoverflow.com/a/25079990
has body: Moving the socket.io code out of app.get('/something', function(req, res) {//code here}); and placing it after server.listen(3000) seemed to have solved this problem. However I wanted to have a socket.io connection only in a certain page. How would I do this?
type: Answer
answers question: http://stackoverflow.com/q/25079075
score: 0

http://stackoverflow.com/a/25742513
type: Answer
upvote count: 26
answers question: http://stackoverflow.com/q/25212439
downvote count: 0
has comment: http://stackoverflow.com/comment/88380263
score: 26
has body: Use escapejs filter. Example:
has comment: http://stackoverflow.com/comment/102756165

http://stackoverflow.com/a/25090781
upvote count: 4
has body: jQuery in WordPress runs in noConflict mode which means the global $ shortcut for jQuery isn't available. Replace your code with the following: &lt;script&gt; jQuery(document).ready(function($) { $("#reply-title").hide(); }); &lt;/script&gt; Inside the document ready wrapper the $ can be used as an alias for jQuery.
downvote count: 0
answers question: http://stackoverflow.com/q/25090615
score: 4
has comment: http://stackoverflow.com/comment/39042459
type: Answer

http://stackoverflow.com/q/25073233
tagged with: network-programming
has comment: http://stackoverflow.com/comment/39008298
has body: I'm using IRC npm and my bot hasn't been connecting to an IRC server and I wasn't receiving any errors. So I went into the source code to find out what was happening. Apparently the function was ran. Where is it being emitted? And I found this: util.log('Connection got "close" event'); Where is it logged to?
has title: Where is self.emit emitted?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39008277
score: 0
tagged with: irc
tagged with: node.js
answer count: 0
type: UnansweredQuestion
type: Question

http://stackoverflow.com/comment/39043505
type: AnswerComment
has text: `subs` is just an array of subscription handles - I'm just pushing two more handles onto it. [$or](http://docs.mongodb.org/manual/reference/operator/query/or/) is a mongodb operator.
type: Comment
comment on: http://stackoverflow.com/a/25087548
score: 0

http://stackoverflow.com/comment/39185042
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25167768
score: 0
has text: @sss111 you don't need IDs for the rows. Use a class (`.2CrpAcrs` or something). Within the `blur` method, refer to the current blurred input as `$(this)`

http://stackoverflow.com/comment/63045515
score: 0
type: Comment
type: QuestionComment
has text: Did you resolve this? I am facing the same issue :(
comment on: http://stackoverflow.com/q/25162099

http://stackoverflow.com/comment/39285838
type: QuestionComment
type: Comment
has text: You make an ajax request for it. i.e. `$('.whatever).load('/just/my/random/business/response.html')`. Or something similar. For something resembling an detailed answer you need to ask a detailed question.
comment on: http://stackoverflow.com/q/25220770
score: 1

http://stackoverflow.com/q/25098753
type: Question
upvote count: 1
downvote count: 0
possible better answer: http://stackoverflow.com/a/25099033
tagged with: javascript
linked to: http://stackoverflow.com/q/17756550
favorite count: 0
answer count: 3
has body: I am trying to send a HTTP GET request to a remote server and use the response on an HTML page. Below is the project/js/script.js page var app = angular.module('app', ['ngResource']); var config = { url:"www.myWebsite.com/discover", headers: { "X-Object-Header" : "123456789 ", "Content-Type": "application/json" } }; app.controller('discoverObjectCtrl', ['$scope', '$http', function (scope, http) { console.log('Everything Works!'); http.get("/object", config).success(function (data) { scope.object = data; }); console.log(scope.object); }]); In my response header, this is what I get Remote Address:127.0.0.1:63342 Request URL:localhost:63342/object Request Method:GET Status Code:404 Not Found Request Headers Accept:application/json, text/plain, / Accept-Encoding: gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:max-age=0 Connection:keep-alive Host:localhost:63342 Referer: localhost:63342/DemoSP/index.html User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 X-Object-Header: 123456789 What I would like to do is send the http request with a customized URL. So for instance I would like my console Header to display Request URL:www.myWebsite.com/discover/object And not Request URL:localhost:63342/project/www.myWebsite.com/discover/object Please I need Help on this. Thanks
tagged with: http-get
has title: Send HTTP Header Requests with AngularJS
tagged with: angularjs
has answer: http://stackoverflow.com/a/31721550
has answer: http://stackoverflow.com/a/25099033
has answer: http://stackoverflow.com/a/25098934
accepted answer: http://stackoverflow.com/a/25098934
type: AnsweredQuestion
score: 1
tagged with: http-headers
tagged with: httprequest

http://stackoverflow.com/comment/39060330
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25100921
has text: @AstroCB I added all the code necessary for the page. I edited also the main text with right codes. :)
score: 0

webrtc
tags question: http://stackoverflow.com/q/25185080
type: Tag
tags question: http://stackoverflow.com/q/25080451
tags question: http://stackoverflow.com/q/25141080
tag name: webrtc
tags question: http://stackoverflow.com/q/25104179
tags question: http://stackoverflow.com/q/25105690
tags question: http://stackoverflow.com/q/25093378

http://stackoverflow.com/comment/39162832
type: Comment
comment on: http://stackoverflow.com/a/25156141
has text: Ah yea, hadn't refreshed. Your solution now looks correct to my eye :) [Edit: just to note, I'm not the downvoter]
type: AnswerComment
score: 0

http://stackoverflow.com/comment/105859598
score: 0
type: AnswerComment
type: Comment
has text: This also returns the hashbang, which most probably not what the OP wanted
comment on: http://stackoverflow.com/a/58549933

http://stackoverflow.com/a/25206845
type: Answer
score: 0
has body: You can use DOM api jsFiddle Style: document.getElementById("test").style.width Attribute: document.getElementById("test").getAttribute("width")
answers question: http://stackoverflow.com/q/25206533

http://stackoverflow.com/comment/39284158
has text: how about using a button and window.location as mentioned above
comment on: http://stackoverflow.com/a/25221001
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25157513
has answer: http://stackoverflow.com/a/42003637
tagged with: audio
type: UnansweredQuestion
upvote count: 15
answer count: 4
has answer: http://stackoverflow.com/a/49749868
downvote count: 0
tagged with: pitch-shifting
has answer: http://stackoverflow.com/a/25617577
tagged with: javascript
tagged with: playback
type: Question
has answer: http://stackoverflow.com/a/25160407
favorite count: 0
score: 15
has title: javascript pitch shift with time stretch
has body: I'm a beginner learning javascript. I've got various projects in mind with an interactive page on my site related to microtonal frequencies and planetary frequencies. I need to be able to play my audio sample .wav file in a loop but have the audio sample timestretched with a corresponding change in pitch. I tried myAudio.playbackRate = 0.5; which plays the audio 0.5 slower but keeps pitch same. I researched and found something. But how do i set preservesPitch to false or true? And this only works in 'Google Chrome' I think, so other program i found is here : https://github.com/janesconference/KievII/blob/master/dsp/pitchshift.js Can't seem to get it working, i don't know how i am supposed to modify it, where do i paste my Audio .wav file URL in the program ? Any other tips related to this would be much appreciated. Thanks in advance for your time and help.

http://stackoverflow.com/q/25159998
tagged with: jquery
tagged with: ajax
type: Question
has title: How can I combine code of the two jQuery functions to reduce execution time?
has body: I've following two functions. First one is written for auto complete functionality and second one is written for checking whether user has selected the value from the auto populated list or not. But as I've used the same AJAX functionality in both of the functions it's taking too much time in completing the execution. Can someone please help me in optimizing the code I written by making a single function? My code is as follows: $('.dynamic_cat').keyup(function() { $(".dynamic_cat").typeahead({ source: function(query, process) { var textVal = $(".dynamic_cat").val(); var admin_url = $("#admin_url").val(); $.ajax({ url: admin_url+'modules/product_types/product_types.php', type: 'POST', data: 'op=get_all_categories', dataType: 'JSON', async: true, success: function(data) { process(data); } }); } }); }); $(document).ready(function() { $('.dynamic_cat').blur(function() { if( $('.dynamic_cat').val() ) { var textVal = $(".dynamic_cat").val(); var admin_url = $("#admin_url").val(); $.ajax({ url: admin_url+'modules/product_types/product_types.php', type: 'POST', data: 'op=get_all_categories', dataType: 'JSON', async: true, success: function(data) { if($.inArray(textVal, data) == -1) { alert("Please select the value from list only!!!"); $('.dynamic_cat').val(""); } } }); } }); }); Thanks in advance.
score: 0
tagged with: php
answer count: 1
has comment: http://stackoverflow.com/comment/39169337
type: UnansweredQuestion
tagged with: bootstrap-typeahead
has answer: http://stackoverflow.com/a/25160496
tagged with: javascript

http://stackoverflow.com/q/25103700
accepted answer: http://stackoverflow.com/a/25103809
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
has body: Please have a look at the jsFiddle When I run it, I want to get the width of the images but I get following values (have a look in the JS console) 400 0 575 533 0 ... Some are zero. I don't know why this happens. And it's always different. If you refresh the fiddle (F5) some times you will get different values for the width. Sometimes the correct width, sometimes just 0. Local (with images saved to my hard disc) it's the same. Does anyone have a suggestion whats wrong?
downvote count: 1
type: AnsweredQuestion
score: -1
type: Question
tagged with: jquery-plugins
has answer: http://stackoverflow.com/a/25103809
upvote count: 0
has title: Get width of not displayed images with JS/jQuery
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/48302232
score: 1
has text: Hi @ShifaKhan, yeah. I did sort this. Please see the response below.
comment on: http://stackoverflow.com/q/25177237
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39202690
type: Comment
comment on: http://stackoverflow.com/q/25177647
type: QuestionComment
score: 0
has text: @kharandziuk On server side you can have ready-to-use (or even built-in) facilities to generate desired random numbers. Whereas in JS you have to implement it yourself. Furthermore, imho server-side implementation is better from the security point

http://stackoverflow.com/comment/39276439
type: QuestionComment
comment on: http://stackoverflow.com/q/25216662
has text: still nothing, my js is 'function getEvents() { $.ajax({ type:"post", url:"assets/php/api.php", datatype:'json', data:{'action':'getEvents'}, success:function(data) { console.log(data); } }); }'
score: 0
type: Comment

http://stackoverflow.com/comment/39434061
type: AnswerComment
comment on: http://stackoverflow.com/a/25301279
type: Comment
has text: Welcome to StackOverflow. When posting code, please format code by indenting it with 4 spaces.
score: 1

http://stackoverflow.com/a/25233414
has body: Use a variable to which you assign the function, e.g. const fac = (n) =&gt; n&gt;0 ? n*fac(n-1) : 1; If you really need it anonymous, use the Y combinator, like this: const Y = (f) =&gt; ((x)=&gt;f((v)=&gt;x(x)(v)))((x)=&gt;f((v)=&gt;x(x)(v))) … Y((fac)=&gt;(n)=&gt; n&gt;0 ? n*fac(n-1) : 1) … (ugly, isn't it?)
upvote count: 10
score: 10
downvote count: 0
answers question: http://stackoverflow.com/q/25228394
type: Answer
has comment: http://stackoverflow.com/comment/39308400

http://stackoverflow.com/q/25097115
tagged with: javascript
favorite count: 0
has body: I am using YTPlayerView to play youtube video, which is wrapper of this Javascript API (https://developers.google.com/youtube/js_api_reference). My app can be notified when user start/stop playing the video through the API, but I am wondering if my app can be notified for users' action to slide on the time bar that change the player's currentTime? I know that I can monitor using getCurrentTime API, but I want to get notified when currentTime is changed by user action, instead of monitoring it continuously. Thanks for any suggestions
has title: iOS embedded Youtube Player time change notification
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: youtube-api
type: Question
score: 1
tagged with: ios
downvote count: 0

http://stackoverflow.com/a/25142297
has comment: http://stackoverflow.com/comment/39137299
has body: The $().val() method is for input fields. See http://api.jquery.com/val/ Also as pointed out by epascarello https://stackoverflow.com/a/25142313/227299, you have a set of nodes, so you need to $.filter, not $.find If you want the innerHTML, use $(dom).filter("#listParticipants").html()
has comment: http://stackoverflow.com/comment/39137267
has comment: http://stackoverflow.com/comment/39137163
answers question: http://stackoverflow.com/q/25142253
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39137074
upvote count: 3
downvote count: 1

http://stackoverflow.com/comment/39194755
type: QuestionComment
type: Comment
has text: Be sure to make use of the developer tools in your browser, specifically the console. Makes things like this much easier.
comment on: http://stackoverflow.com/q/25172995
score: 0

http://stackoverflow.com/q/25150570
tagged with: momentjs
has title: Get hours difference between two dates in Moment Js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/77360532
score: 552
has answer: http://stackoverflow.com/a/55916701
has answer: http://stackoverflow.com/a/37092950
has answer: http://stackoverflow.com/a/41762378
downvote count: 3
has answer: http://stackoverflow.com/a/71018121
has answer: http://stackoverflow.com/a/70290375
type: Question
has answer: http://stackoverflow.com/a/25150793
has answer: http://stackoverflow.com/a/48800197
has answer: http://stackoverflow.com/a/65488102
has answer: http://stackoverflow.com/a/55206251
has answer: http://stackoverflow.com/a/73355889
has body: I'm able to get the difference between two dates using MomentJs as follows: moment(end.diff(startTime)).format("m[m] s[s]") However, I also want to display the hour when applicable (only when >= 60 minutes have passed). However, when I try to retrieve the duration hours using the following: var duration = moment.duration(end.diff(startTime)); var hours = duration.hours(); it is returning the current hour and not the number of hours between the two dates. How do I get the difference in hours between two Moments?
tagged with: javascript
tagged with: date
has answer: http://stackoverflow.com/a/56128332
upvote count: 555
possible better answer: http://stackoverflow.com/a/34195466
has answer: http://stackoverflow.com/a/34195466
has answer: http://stackoverflow.com/a/53760956
accepted answer: http://stackoverflow.com/a/25150793
answer count: 17
has answer: http://stackoverflow.com/a/55009751
favorite count: 0
has answer: http://stackoverflow.com/a/46059357
has answer: http://stackoverflow.com/a/53130814

http://stackoverflow.com/comment/39028665
has text: How can I check? Developer Tools isn't showing up anything
comment on: http://stackoverflow.com/q/25083393
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25107892
has body: MCRYPT_RIJNDAEL_256 refers to the rijndael encryption algorithm with a non-standard block size of 256 bits, rather than a key size of 256 bits. PHP uses libmcrypt for its encryption, while Node.js uses openssl, and while libmcrypt implements AES (block size of 128 bits), it also implements rijndael with configurable block size. AES is specifically defined with a block size of 128 bits, and that is the only version of rijndael openssl supports. As such, I wrote a minimal libmcrypt binding for node called node-rijndael, which should serve your purposes. See also my answer to a similar question here. var Rijndael = require('node-rijndael'); // shared_key var key = '14370ced836...'; // aes_iv var iv = new Buffer('MjY2YjljMmM0MjVjNzVlMGMyZGI2NjAwN2U5ZGMzZDQ=', 'base64'); var payload = new Buffer(/*payload*/); var rijndael = new Rijndael(key, { mode: Rijndael.MCRYPT_MODE_CBC, encoding: 'hex', // shared_key encoding iv: iv }); // defaults to utf-8 output encoding payload = rijndael.decrypt(payload); payload = payload.replace(/\0+$/, '');
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25099305
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25099305

http://stackoverflow.com/q/25120749
tagged with: javascript
score: 0
has title: Hammerjs v2.0.2 pinch to zoom image
answer count: 1
linked to: http://stackoverflow.com/q/18011099
tagged with: cordova
tagged with: pinchzoom
tagged with: android
has body: I'm trying to create a pinch to zoom action in a Web app developed with Cordova for iOS and Android. I've tried this script with Hammerjs 1.1.3, and in a first moment i think that was the version of Hammerjs to create this problem, so i'have "translated" the script to working with Hammerjs 2.0.2 but i have the same result either way. In iOS (at the moment i'm using the Xcode emulator on my Mac) i'm able to zoom the image but after the first drag event the image is cut, and after this i can't drag the image. I think this issue is caused by the css transform3d animation, have you ever had the same problem or something similar in iOS? The HTML structure: &lt;div id="pinchzoom"&gt; &lt;img id="rect" src="..." width="2835" height="4289" alt="" /&gt; &lt;/div&gt; This is the script in Hammerjs 2.0.2. var elem = document.getElementById('pinchzoom'); var mc = Hammer(elem,{touchAction: 'manipulation'}); mc.get('pinch').set({enable: true}); var rect = document.getElementById('img_hover'); var posX=0, posY=0, scale=1, last_scale, last_posX=0, last_posY=0, max_pos_x=0, max_pos_y=0; mc.on('pan pinchout pinchin panend', function(ev){ switch(ev.type) { case 'pan': if(scale != 1){ posX = last_posX + ev.deltaX; posY = last_posY + ev.deltaY; if(posX &gt; max_pos_x){ posX = max_pos_x; } if(posX &lt; -max_pos_x){ posX = -max_pos_x; } if(posY &gt; max_pos_y){ posY = max_pos_y; } if(posY &lt; -max_pos_y){ posY = -max_pos_y; } }else{ posX = 0; posY = 0; saved_posX = 0; saved_posY = 0; } break; case 'pinchin': case 'pinchout': last_scale = scale; scale = Math.max(1, Math.min(last_scale * ev.scale, 10)); max_pos_x = Math.ceil((scale - 1) * rect.clientWidth / 2); max_pos_y = Math.ceil((scale - 1) * rect.clientHeight / 2); if(posX &gt; max_pos_x){ posX = max_pos_x; } if(posX &lt; -max_pos_x){ posX = -max_pos_x; } if(posY &gt; max_pos_y){ posY = max_pos_y; } if(posY &lt; -max_pos_y){ posY = -max_pos_y; } break; case 'panend': last_posX = posX &lt; max_pos_x ? posX: max_pos_x; last_posY = posY …
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/27503260
accepted answer: http://stackoverflow.com/a/27503260
type: Question
tagged with: ios

http://stackoverflow.com/q/25181052
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39215360
answer count: 0
has body: We have faced a weird issue in IE11. During initialization of the page, initialization code of Dojo script uses console object, and accessing this object causes Permission denied error that fails whole initialization. Meanwhile the navigator object has the same issues. The IE11 build is Release Preview and that should be the reasons of these issues. However, the build has the same version as the released one and all updates are installed. It might be some settings issues, but changing it gave no effects. Any help is appreciated.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39213999
has comment: http://stackoverflow.com/comment/39218113
type: Question
has comment: http://stackoverflow.com/comment/39220694
tagged with: internet-explorer
tagged with: internet-explorer-11
has title: Console object is not accessible in IE11 (Permission denied)
score: 4
upvote count: 4
tagged with: browser
tagged with: permission-denied
downvote count: 0

http://stackoverflow.com/comment/39170337
type: Comment
comment on: http://stackoverflow.com/a/25160266
has text: I didn't think of AngularJS, but it seems like a great idea. I'll have a try !
score: 0
type: AnswerComment

http://stackoverflow.com/q/25113690
favorite count: 0
has comment: http://stackoverflow.com/comment/39083793
has comment: http://stackoverflow.com/comment/39098919
has body: I defined some variables in Javascript: var aaa = "aaa"; var bbb = "bbb"; var ccc = "ccc"; But my friend says it should be better to define them as: var aaa = "aaa", bbb = "bbb", ccc = "ccc"; Because JsLint will report errors on my code. I'm not sure why we should do it as the second one, since I found my version is better to view if the value is very big, like: var aaa = { some1 : 111, some2 : 222 }; var bbb = { some1 : 111, some2 : 222 };
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39083781
has comment: http://stackoverflow.com/comment/39083756
has answer: http://stackoverflow.com/a/25113769
has comment: http://stackoverflow.com/comment/39083908
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/39087472
accepted answer: http://stackoverflow.com/a/25113769
downvote count: 0
tagged with: javascript
score: 4
answer count: 1
has title: Why do we need to use one `var` to define many variables?

http://stackoverflow.com/a/25100784
has comment: http://stackoverflow.com/comment/39060764
score: 2
answers question: http://stackoverflow.com/q/25100714
upvote count: 2
has body: Array.prototype.slice is not suitable for cloning arrays This should work well for you function deepClone(arr) { var len = arr.length; var newArr = new Array(len); for (var i=0; i&lt;len; i++) { if (Array.isArray(arr[i])) { newArr[i] = deepClone(arr[i]); } else { newArr[i] = arr[i]; } } return newArr; } If you need to support older browser, make sure to use this polyfill (via MDN) if(!Array.isArray) { Array.isArray = function(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; }; }
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39059923

google-chrome
tags question: http://stackoverflow.com/q/25173253
tags question: http://stackoverflow.com/q/25191189
tags question: http://stackoverflow.com/q/25120472
tags question: http://stackoverflow.com/q/25167184
tags question: http://stackoverflow.com/q/25150038
tags question: http://stackoverflow.com/q/25138763
tags question: http://stackoverflow.com/q/25128330
tags question: http://stackoverflow.com/q/25229130
tags question: http://stackoverflow.com/q/25107774
tags question: http://stackoverflow.com/q/25229924
tags question: http://stackoverflow.com/q/25091361
tags question: http://stackoverflow.com/q/25094387
tags question: http://stackoverflow.com/q/25092998
tags question: http://stackoverflow.com/q/25095485
tags question: http://stackoverflow.com/q/25115233
tags question: http://stackoverflow.com/q/25117869
tags question: http://stackoverflow.com/q/25072940
tags question: http://stackoverflow.com/q/25073918
tags question: http://stackoverflow.com/q/25107820
tags question: http://stackoverflow.com/q/25130876
tags question: http://stackoverflow.com/q/25099409
tags question: http://stackoverflow.com/q/25120235
tags question: http://stackoverflow.com/q/25080451
tags question: http://stackoverflow.com/q/25151398
tags question: http://stackoverflow.com/q/25088698
tags question: http://stackoverflow.com/q/25156714
tags question: http://stackoverflow.com/q/25199135
tags question: http://stackoverflow.com/q/25141080
tags question: http://stackoverflow.com/q/25118894
tags question: http://stackoverflow.com/q/25158666
tags question: http://stackoverflow.com/q/25095769
tags question: http://stackoverflow.com/q/25210726
tags question: http://stackoverflow.com/q/25204398
tags question: http://stackoverflow.com/q/25107229
tags question: http://stackoverflow.com/q/25182471
tags question: http://stackoverflow.com/q/25186609
tags question: http://stackoverflow.com/q/25188160
tags question: http://stackoverflow.com/q/25180184
tags question: http://stackoverflow.com/q/25118087
tags question: http://stackoverflow.com/q/25076580
tags question: http://stackoverflow.com/q/25145416
tags question: http://stackoverflow.com/q/25114200
type: Tag
tags question: http://stackoverflow.com/q/25084285
tags question: http://stackoverflow.com/q/25220757
tags question: http://stackoverflow.com/q/25101441
tags question: http://stackoverflow.com/q/25125237
tags question: http://stackoverflow.com/q/25100213
tags question: http://stackoverflow.com/q/25138322
tags question: http://stackoverflow.com/q/25214874
tag name: google-chrome
tags question: http://stackoverflow.com/q/25071021
tags question: http://stackoverflow.com/q/25192167
tags question: http://stackoverflow.com/q/25128762
tags question: http://stackoverflow.com/q/25122425
tags question: http://stackoverflow.com/q/25105690
tags question: http://stackoverflow.com/q/25089958
tags question: http://stackoverflow.com/q/25149645
tags question: http://stackoverflow.com/q/25195886
tags question: http://stackoverflow.com/q/25161128
tags question: http://stackoverflow.com/q/25111087
tags question: http://stackoverflow.com/q/25143529
tags question: http://stackoverflow.com/q/25140648
tags question: http://stackoverflow.com/q/25178768
tags question: http://stackoverflow.com/q/25177340
tags question: http://stackoverflow.com/q/25147955
tags question: http://stackoverflow.com/q/25179605
tags question: http://stackoverflow.com/q/25167390
tags question: http://stackoverflow.com/q/25096284
tags question: http://stackoverflow.com/q/25166051
tags question: http://stackoverflow.com/q/25105414
tags question: http://stackoverflow.com/q/25079836
tags question: http://stackoverflow.com/q/25128005

http://stackoverflow.com/comment/39086058
type: AnswerComment
comment on: http://stackoverflow.com/a/25103326
has text: is it possible to have only one input field and it will contain the week number? I don't want the selected date to be shown, only the week number
score: 0
type: Comment

http://stackoverflow.com/comment/39079604
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25111292
has text: How did you come up with the `margin-top: -213px;`? Your notation there isn't exactly clear.

http://stackoverflow.com/comment/39185294
comment on: http://stackoverflow.com/a/25167460
type: Comment
type: AnswerComment
score: 0
has text: ah my bad haha, I'm glad you get the idea. Enjoy!

http://stackoverflow.com/a/25171883
has comment: http://stackoverflow.com/comment/39192874
has comment: http://stackoverflow.com/comment/39192463
answers question: http://stackoverflow.com/q/25171846
downvote count: 2
has comment: http://stackoverflow.com/comment/39223414
has comment: http://stackoverflow.com/comment/39192720
has comment: http://stackoverflow.com/comment/39192583
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39239104
has comment: http://stackoverflow.com/comment/39192534
upvote count: 3
has comment: http://stackoverflow.com/comment/39192615
has body: The getJSON method is Asynchronous, that means that once started it will eventually hold a result, the function wrapped in document ready instead fires as soon as the DOM is ready, instead of doing this sequence of action you should move the code form the ready function to the getJSON callback: $(document).ready(function() { $.getJSON('java_output/tasksTab.json', function (data) { console.log ("first"); }).done(function() { console.log( "second" ); }) }) As adeneo pointed out you don't actually need to chain the done method, you can simply add the computation in the default callback: $(document).ready(function() { $.getJSON('java_output/tasksTab.json', function (data) { console.log ("first"); console.log( "second" ); }) }) Other kinds of callback you can use are fail and always.
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39192488
has comment: http://stackoverflow.com/comment/39192790
has comment: http://stackoverflow.com/comment/39240197
has comment: http://stackoverflow.com/comment/39192712
has comment: http://stackoverflow.com/comment/39192644
accepted answer of: http://stackoverflow.com/q/25171846
has comment: http://stackoverflow.com/comment/39192749
has comment: http://stackoverflow.com/comment/39192815

http://stackoverflow.com/a/25130340
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25130090
has body: All I can offer right now is some cleaned-up code, not sure how much, if any, further it will get you but here it is. &lt;script type="text/javascript"&gt; var loc = new google.maps.LatLng(30.4900271, -90.4629746), myOptions = { zoom: 13, center: loc, mapTypeId: google.maps.MapTypeId.ROADMAP }, map = new google.maps.Map(document.getElementById("gmap_canvas"), myOptions), marker = new google.maps.Marker({ map: map, position: loc }); function init_map() { $("#hammondButton").click(function () { google.maps.event.addListener(marker, "click", function() { infowindow.open(map, marker); }); // is this necessary? google.maps.event.trigger(map, 'resize'); }); } window.addEventListener("load", init_map); &lt;/script&gt;

http://stackoverflow.com/q/25137044
tagged with: javascript
has answer: http://stackoverflow.com/a/25137096
has comment: http://stackoverflow.com/comment/39127210
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/39127107
upvote count: 2
type: UnansweredQuestion
score: 2
has title: this property scope in javascript
has comment: http://stackoverflow.com/comment/39127013
has answer: http://stackoverflow.com/a/25137098
type: Question
answer count: 2
downvote count: 0
has body: I have a code, var a= document.getElementById("demo"); a.onclick = function(){ alert(this.innerHTML) setTimeout(function(){ alert(this.innerHTML) },1000); } I got correct innerHTML value from first alert statement. But i got undefined value in second alert statement. Can anyone explain this?

http://stackoverflow.com/comment/39157243
type: AnswerComment
comment on: http://stackoverflow.com/a/25151553
has text: If this doesn't fix it please post your manifest.json
type: Comment
score: 0

http://stackoverflow.com/comment/39048850
type: AnswerComment
comment on: http://stackoverflow.com/a/25094485
has text: Hi Berserker, logically error is there in the code, on applying positions, check this jsfiddle http://jsfiddle.net/9M32w/3/
type: Comment
score: 0

http://stackoverflow.com/q/25197111
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
type: UnansweredQuestion
has title: Sending a JSON encoded PHP variable to JS with Laravel 4
tagged with: php
has body: I am having some trouble passing a JSON encoded php array to javascript in Laravel 4. I am sending it to my view from my controller, populating a value field in HTML, and then pulling that value with JS. Code is below: Controller: $artist_likes_profile = Fanartist::profile_fan_likes(Auth::user()-&gt;get()-&gt;id); $artist_likes = json_encode(array("name"=&gt;$artist_likes_profile)); return View::make('artists.show', compact('artist')) -&gt;with('artist_likes', $artist_likes); HTML: &lt;input type="hidden" id="js-helper-artist-likes" name="js-helper-artist-likes" value="&lt;? php echo $artist_likes ?&gt;"&gt; JS: var artist_likes = $('#js-helper-artist-likes').val(); console.log(artist_likes); However, running this, I only see the artist_likes variable in the console appear as "{" instead of the actual json string. When I add these two lines (to try to decode the json variable in js): var artist_likes_decoded = $.parseJSON(artist_likes); console.log(artist_likes_decoded); I get the error: Uncaught SyntaxError: Unexpected end of input I know the JSON string is populating the value field, because I see this in the page source: &lt;input type="hidden" id="js-helper-artist-likes" name="js-helper-artist-likes" value="{"name":[{"id":215,"fbid":"19538277626","stage_name":"311","city":"","state":"","image_path":"http:\/\/graph.facebook.com\/19538277626\/picture?width=720&amp;height=720", "description":"311 was formed in 1990 in Omaha, Nebraska."},{"id":18,"fbid":"14591271531","stage_name":"Beck","city":"","state":"","image_path":"https:\/\/graph.facebook.com\/14591271531\/picture?width=720&amp;height=720", "description":""},{"id":47,"fbid":"137029526330648","stage_name":"Disclosure","city":"","state":"","image_path":"https:\/\/graph.facebook.com\/137029526330648\/picture?width=720&amp;height=720","description":""}, {"id":11,"fbid":"152513780224","stage_name":"Arcade Fire","city":"","state":"","image_path":"https:\/\/graph.facebook.com\/152513780224\/picture?width=720&amp;hei…
has comment: http://stackoverflow.com/comment/39238840
has comment: http://stackoverflow.com/comment/39238918
has answer: http://stackoverflow.com/a/25197252
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: laravel-4

http://stackoverflow.com/comment/39254419
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25205375
type: Comment
has text: If JSON will not contain any xml tags, then this will be more simple and fast then using a parser.

http://stackoverflow.com/q/25095765
answer count: 3
has comment: http://stackoverflow.com/comment/39052054
possible better answer: http://stackoverflow.com/a/25096215
has comment: http://stackoverflow.com/comment/39050431
has answer: http://stackoverflow.com/a/25096193
linked to: http://stackoverflow.com/q/25094811
favorite count: 0
has comment: http://stackoverflow.com/comment/39053043
has comment: http://stackoverflow.com/comment/39051875
tagged with: http://stackoverflow.com/tag/csv
tagged with: regex
has answer: http://stackoverflow.com/a/51681606
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39052158
downvote count: 0
has answer: http://stackoverflow.com/a/25096215
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25096193
has body: I have a string with keywords, separated by comma's. Now I also have a nice RegEx, to filter out all the keywords in that string, that matches a queried-string. Check out this initial question - RegEx - Extract words that contains a substring, from a comma seperated string The example below works fine; it has a masterString, and a resultString. That last one only contains the keywords that has at least the word "car" in it. masterString = "typography,caret,car,align,shopping-cart,adjust,card"; resultString = masterString.match(/[^,]*car[^,]*/g); console.log(resultString); Result from the code above; "caret", "car", "shopping-cart", "card" But how can I use the RegEx, with a variable matching-word (the word "car" in this example static and not variable). I think it has to do something with a RegExp - but I can't figure out...
upvote count: 2
has title: RegEx - JavaScript .match() with a variable keyword

http://stackoverflow.com/q/25164795
has answer: http://stackoverflow.com/a/25169773
has title: YouTube API seekTo plays only sound, no picture on second play on IE9 and IE10
has body: I'm building a website for my client who wants YouTube embedded video with external control. This is the code. var player; function onYouTubePlayerAPIReady() { player = new YT.Player('player', { height: '100%', width: '100%', playerVars: {rel: 0}, videoId: 'myvideoid', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } function onPlayerStateChange(event) { if(event.data === 0) { player.stopVideo(); } $(document).ready(function() { $( '.play-btn' ).on( 'click', function() { if ($('.video').hasClass('mobile')) { } else { player.seekTo(0, true); player.playVideo(); } }); This works fine on modern browsers, but on IE9 I have a problem: video starts playing when clicked. However, when video reaches it's end and I press external button again, I get "Error occurs" message and only video sound starts to play. Any idea what might cause this? EDIT onError event gives error code 5, which is, as I've understood, HTML5 related. Error also occurs at the end of the video, not at the beginning, as I first thought.
tagged with: youtube-javascript-api
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25169773
tagged with: youtube-api
type: Question
tagged with: internet-explorer
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/25189159
has body: I'm working on a bookmarklet that requires jQuery and have run into a problem on a website. When I try loading jQuery on toysrus.com, using this code: var element = document.createElement("script"); element.onload=function() { jQuery.noConflict(); } element.src = "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js"; document.body.appendChild(element); This error is shown in the console: Uncaught TypeError: Cannot read property 'exports' of null Screenshot. The error points to the second line of code in the file: if ( typeof module === "object" &amp;&amp; typeof module.exports === "object" ) { From what I understand, it's perfectly fine to load jQuery more than once as long as noConflict() is called, which I'm doing, and this error only seems to be happening on this one website. Why is the error occurring and what can I do to fix it? UPDATE: Running the code from the line the error is occurring on in the browser causes the same error: typeof module === "object" &amp;&amp; typeof module.exports === "object" Output: TypeError: Cannot read property 'exports' of null I'm confused why the error is being thrown, since if module.exports doesn't exist, should the console just output undefined?
downvote count: 0
has title: Error when loading jQuery: "Uncaught TypeError: Cannot read property 'exports' of null "
accepted answer: http://stackoverflow.com/a/25189814
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/25189814
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39224913
has comment: http://stackoverflow.com/comment/39224782

http://stackoverflow.com/a/25208802
has comment: http://stackoverflow.com/comment/39261050
answers question: http://stackoverflow.com/q/25208608
type: Answer
has body: If you are using jquery, you should be able to use the .html() to assign the value of the text of the button. company google apple microsoft facebook adobe other Added an ID to the button, and then reference it using jquery: $("#company-name").html("company-name-here"); with company name selected as the parameter.
score: 0

http://stackoverflow.com/comment/39059880
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25100181
score: 0
has text: @LironShapira In my work, C#, I use *both* comparator's and key-selectors. The form used is based on which is most appropriate (I am thankful there is both!), and the world keeps running

http://stackoverflow.com/q/25087420
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25088508
downvote count: 1
has answer: http://stackoverflow.com/a/25087784
has comment: http://stackoverflow.com/comment/39036285
has body: i have a paragraph element which has display property hidden.I split each of that paragraph words and put them inside individual span element.Then i want to give them some effects which involves each word will come from different locations and sit in correct order.But here each word is not showing such effect rather they arise from lower position to upper positions.how can i achieve the effect i am hoping for?please help me out!!! jsfiddle if you miss the action ,please reload the page the earth moves round the sun
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39036149
tagged with: javascript
has comment: http://stackoverflow.com/comment/39036076
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
has title: split the words of a paragraph and put individual words inside seperate span element and animate them
accepted answer: http://stackoverflow.com/a/25087784
score: 0
possible better answer: http://stackoverflow.com/a/25088508

http://stackoverflow.com/comment/39043807
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25091922
has text: That worked! How annoying - any idea why IE behaves in this way? The interesting thing is that now the images all load correctly in all browsers, but IE still lags before it starts playing sounds by about 5 seconds. I guess I'll have to add a similar delay to the sound loading functions. Thanks for your answer :)

http://stackoverflow.com/q/25184303
has comment: http://stackoverflow.com/comment/39215097
score: 0
answer count: 2
has body: I currently have working code that checks for a cookie and if found, it won't show a block of HTML code. If not found, it shows the code and then sets a cookie to expire in 24 hours.That's pretty simple. I wan't to elaborate on it though and now show that block of HTML code the first 3 visits in a 24-hour period. On the 4th visit in 24-hours, I don't want to show that code. I started writing javascript that would check for 3 different cookies and it got to be too much for me. I wonder if there is an easier way. Here's what I have today: &lt;script type="text/javascript"&gt; function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } } return unescape(dc.substring(begin + prefix.length, end)); } var thecookie='bd3b5cookie'; var myCookie = getCookie(thecookie) ; if (myCookie == null) { console.log("not found"); //add html content here } else { console.log(" found"); //dont show html code } &lt;/script&gt; &lt;script type = "text/javascript"&gt; //set cookie var now = new Date(); var time = now.getTime(); time += 3600 * 8000; now.setTime(time); document.cookie = 'bd3b5cookie=ok;expires='+now.toGMTString()+';path=/'; //console.log(document.cookie); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39215232
has answer: http://stackoverflow.com/a/25184511
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25185253
tagged with: php
has comment: http://stackoverflow.com/comment/39214428
has comment: http://stackoverflow.com/comment/39214364
tagged with: cookies
type: Question
has title: Show something to user until their 4th visit
tagged with: javascript

http://stackoverflow.com/q/25106226
has title: Rendering view for object passed by {{link-to}} helper issue
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25106323
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: ember.js
accepted answer: http://stackoverflow.com/a/25106323
favorite count: 0
upvote count: 2
has body: I have a simple list of animals showing them in categories. When a category is picked in the nav all the animals from that category are listed along with their attributes. When an animal-box is clicked a view for the animal is loaded. In it the category is eliminated and it is presented as animal generally. That logic is implemented in my routes. Here's the problem however the animal route doesn't bring the animal representation object to the view. Can't get the animal although I pass the object {{#link-to 'animal' this}} What am I doing wrong? Thank you for your kind help. Here's a: demo: http://emberjs.jsbin.com/sekuvabi/1 full code mockup: http://emberjs.jsbin.com/sekuvabi/1/edit View: //...... Script: //.... App.Router.map(function() { this.resource("animals", function(){ this.resource("cats"); }); this.route("animal",{path: 'animal/:animal_id'}); }); App.CatsRoute = Ember.Route.extend({ model: function() { var cats = []; var animals = getJson(); for(var place in animals.cats){ $.merge(cats, animals.cats[place]); } return cats; } }); App.AnimalRoute = Ember.Route.extend({ model: function(params) { return this.store.find('animal', params.animal_id); } }); //......

http://stackoverflow.com/comment/39084501
type: Comment
type: QuestionComment
has text: JSON is a *textual* notation. If you're dealing with objects in memory, you're not dealing with JSON.
comment on: http://stackoverflow.com/q/25114040
score: 3

http://stackoverflow.com/comment/39283887
has text: @Sara you want to call test on checkbox check?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25220814

http://stackoverflow.com/comment/39098722
comment on: http://stackoverflow.com/q/25121511
score: 0
type: Comment
type: QuestionComment
has text: Also, see this post: http://stackoverflow.com/questions/7077770/window-location-href-and-window-open-methods-in-javascript

http://stackoverflow.com/q/25227311
tagged with: ajax
has comment: http://stackoverflow.com/comment/39295364
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25227340
has comment: http://stackoverflow.com/comment/39295388
type: Question
tagged with: c#
has title: Passing data array from Javascript to C#
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25227406
tagged with: javascript
score: 0
answer count: 2
has body: This is my class ARecipe : public class ARecipe { public string picture { get; set; } public string title { get; set; } public int cookingTime { get; set; } public int preparationTime { get; set; } public string IngredientList { get; set; } public string ingredientsDescription { get; set; } public int nbPersons { get; set; } public string Category { get; set; } public string difficulty { get; set; } public double nbStars { get; set; } } My Ajax call : var dico = { picture: $("#fakeInput").val(), title : $("#title").val(), cookingTime : $("#cookingTime").val(), preparationTime : $("#preparationTime").val(), IngredientList : $("#ingredientListArea").val(), ingredientsDescription : $("#preparationArea").val(), nbPersons : parseInt($("#select-nb-Persons").val()), Category : $("#select-category").val(), difficulty: $("#select-difficulty").val(), nbStars : 4 }; $.ajax({ url: "/AddRecipe/TempData", type: 'POST', success: function (e) { //success event }, ///Form data data: JSON.stringify(dico), ///Options to tell JQuery not to process data or worry about content-type cache: false, contentType: false, processData: false }); And the method receiving the datas : [HttpPost] public ActionResult TempData(ARecipe recipe) { return Json(""); } My Ajax call well go to the TempData method but when I analyse the parameter 'recipe' with the debugger, I notice that all the fields are 'null'. Why ? Do you have a solution ? Thank you

http://stackoverflow.com/comment/39205430
type: Comment
type: QuestionComment
has text: Yes, I have searched it on google for the last 3 hours. I only found a PHP example >> http://www.bitrepository.com/php-how-to-add-multi-language-support-to-a-website.html and nothing else.
comment on: http://stackoverflow.com/q/25178894
score: 0

http://stackoverflow.com/a/25212627
answers question: http://stackoverflow.com/q/25212560
has body: From what it looks like, do you have your script tags in the HTML side of things that references your JS code? Put that function in a .js file, reference it via &lt;script&gt;&lt;/script&gt; tags in the HTML document so it can be integrated and used. And use the proper jQuery libraries at the top of your HTML document. It looks like you are getting there and have the right functionality/idea but you need to import these things for it to work when being run.
score: 0
type: Answer

http://stackoverflow.com/comment/39124054
comment on: http://stackoverflow.com/a/25129514
type: Comment
has text: Fixed in Crossfilter version 1.3.8.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39295097
comment on: http://stackoverflow.com/a/25227158
has text: jsfiddle is not working for you?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25203183
answers question: http://stackoverflow.com/q/25201312
score: 0
type: Answer
has body: Thanks for the suggestions from all of you. I found the solution. It was a mix up of some silly mistakes and some wrong SQL syntax. My final correct code is like this - form.html - Select* Franchisee Enquiry Feedback Complaint contact.php if($_POST) { $contacttype=$_POST['contacttype']; $name=$_POST['name']; $email=$_POST['email']; $phone=$_POST['phone']; $comment=$_POST['comment']; mysqli_query($connection,"insert into `contact_form`(`type`, `name`, `email`, `phone`, `comment`) VALUES ('$contacttype','$name','$email','$phone','$comment')"); echo "insert into `contact_form`(`type`, `name`, `email`, `phone`, `comment`) VALUES ('$contacttype','$name','$email','$phone','$comment')"; } else { } ?>

http://stackoverflow.com/comment/39133499
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25140413
has text: Just a side note: we normally try to reserve the `$` symbol for variables that are `jQuery` collections.
score: 0

http://stackoverflow.com/q/25089280
type: AnsweredQuestion
score: 7
has comment: http://stackoverflow.com/comment/39038876
has answer: http://stackoverflow.com/a/25090612
answer count: 2
possible better answer: http://stackoverflow.com/a/45756006
has title: pass arguments to a d3 on "click" event callback
has answer: http://stackoverflow.com/a/45756006
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25090612
has body: Here is my code: function toggleClass(element, className){ d3.select(element).classed(className, !d3.select(element).classed(className)); } d3.selectAll("rect").on("click", toggleClass(this, "clicked"); I cannot get it to work, it appears that passing arguments to a DOM event is bad news bears. Does anyone know a work-around for this? Thank you
tagged with: d3.js
upvote count: 7
has comment: http://stackoverflow.com/comment/39038793
type: Question

http://stackoverflow.com/comment/39268648
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25210316
has text: This is my setup. facebook.php and the generateAccessToken.php. facebook.php is what I posted above. generateAccessToken.php is the php from the link I have IE console up and nothing is being error flagged. The code you gave was a part of the link am I right? because that's a part of generateaccesstoken.php
score: 0

http://stackoverflow.com/a/25081324
has body: Since you are dealing with dynamically added elements, you need to use event delegation. $("#map").click(function (e) { $('&lt;div class="pin"&gt;&lt;/div&gt;').css({ left: a_variable, top: another_variable }).appendTo(this); }).on('click', '.pin', function (e) { //have a single delegated click handler e.stopPropagation(); }).on('mousedown', '.pin', function (e) { //use a delegated handler for mousedown also if (e.which == 1) { console.log("down"); moving = true; $(this).addClass("moving"); } else if (e.which == 3) { console.log("right"); } }) Also see Event binding on dynamically created elements?
type: Answer
answers question: http://stackoverflow.com/q/25080897
score: 0

http://stackoverflow.com/comment/39274758
type: AnswerComment
has text: Thanks for your reply it helps. Though its not a ajax call I am reading json with getJSON on UI itself which is taking some time it seems.
type: Comment
comment on: http://stackoverflow.com/a/25215824
score: 0

http://stackoverflow.com/comment/39107944
type: Comment
comment on: http://stackoverflow.com/q/25126331
type: QuestionComment
has text: Value of any attribute is text according to w3cs. It cannot be html. Now it is another thing to take this text and display it somewhere as HTML. During that process you can set the inner html of that particular element intended to display the "html contents" currently a string. If you plan to construct this html as angular directives or with bindings you need to $compile the element before attaching.
score: 0

http://stackoverflow.com/comment/39060050
type: Comment
has text: You can do `if (self === parent) {...}`. If true then you are inside the top frame, the web page. Otherwise you are inside the iframe. You can put all your JS code inside that if-statement so it will not load inside the iframe.
comment on: http://stackoverflow.com/a/25100668
score: 0
type: AnswerComment

http://stackoverflow.com/q/25167612
has title: How does one change the colour of a div based on current time?
has comment: http://stackoverflow.com/comment/39184661
has answer: http://stackoverflow.com/a/25168066
tagged with: colors
has answer: http://stackoverflow.com/a/25168118
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25167772
has body: I have javascript code that converts the color of the body based on current time but I need it to change the color of a div instead. I am not knowledgeable enough in javascript to know how to do this. I know I need to add a div to the html. The main code is bigger but I've just pulled the basics to get it to work. Javascript function emea() { var d = new Date(); var n = d.getUTCHours()+1; if (n > 18 || n < 9) { // If time is after 6PM or before 9AM, apply night theme to 'body' document.body.className = "emeanight"; } else { // Else use ‘day’ theme document.body.className = "emeaday"; } } $(document).ready(function() { emea(); }); HTML TZ TEST CSS .emeaday { background-color:green; } .emeanight { background-color:blue; } I have tried variations of document.getelementbyid but I keep hitting a blank.
has answer: http://stackoverflow.com/a/25167775
has answer: http://stackoverflow.com/a/25167762
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25167758
type: Question
has comment: http://stackoverflow.com/comment/39184697
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25167758
accepted answer: http://stackoverflow.com/a/25167762
answer count: 6
has comment: http://stackoverflow.com/comment/39184484
score: 0
has comment: http://stackoverflow.com/comment/39184511
has comment: http://stackoverflow.com/comment/39184430

http://stackoverflow.com/q/25114829
accepted answer: http://stackoverflow.com/a/25115246
favorite count: 0
has title: remove one class when animating
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25115246
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I try to animate menu-panel. It should slide to the left. But it doesn't work right. And I can't understand why.

http://stackoverflow.com/comment/39139986
type: Comment
comment on: http://stackoverflow.com/a/25143673
score: 0
type: AnswerComment
has text: Well not a big deal but asking without any code is not really good seen on stackexchange ;).

http://stackoverflow.com/q/25153939
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39159291
has comment: http://stackoverflow.com/comment/39167544
tagged with: twitter-bootstrap-3
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: coffeescript
has body: I trigger a modal to load, and then I want to work on the content with coffee/javascript however the loaded event isnt working. I have the latest bootstrap version installed 3.2. &lt;a data-toggle="modal" href="/messages/new" data-target="#modal" data-remote="true"&gt; I have the following cofeescript that works (but fires upon showing which might not always work if the loading of the modal content is delayed) $("#modal").on "shown.bs.modal", (e) -&gt; $(".typeahead-patient-search-box").typeahead name: 'patients' remote: url: '../patients.json?query=%QUERY', filter: (respData) -&gt; $(respData).each -&gt; this.value = this.full_name this.tokens = $(this.full_name).text().split(/\s+/) footer: "&lt;a href='/patients/new'&gt;Add New&lt;a/&gt;" but changing it to this (note that i changed the event to loaded) $("#modal").on "loaded.bs.modal", (e) -&gt; $(".typeahead-patient-search-box").typeahead name: 'patients' remote: url: '../patients.json?query=%QUERY', filter: (respData) -&gt; $(respData).each -&gt; this.value = this.full_name this.tokens = $(this.full_name).text().split(/\s+/) footer: "&lt;a href='/patients/new'&gt;Add New&lt;a/&gt;" I have isolated the appropriate bootstrap code... if (this.options.remote) { this.$element .find('.modal-content') .load(this.options.remote, $.proxy(function () { this.$element.trigger('loaded.bs.modal') }, this)) } } with breakpoints i can confirm that .find('.modal-content') runs but the breakpoint at this.$element.trigger('loaded.bs.modal') is never triggered and i cant work out why?!? any help would be much appreciated
has comment: http://stackoverflow.com/comment/39180456
has title: Bootstrap modal loaded.bs.modal is not firing
tagged with: javascript
type: Question

http://stackoverflow.com/a/25119191
accepted answer of: http://stackoverflow.com/q/25119147
answers question: http://stackoverflow.com/q/25119147
upvote count: 11
type: AcceptedAnswer
has body: You can use context param here: $.ajax({ url:'http://echo.jsontest.com/', context:this, // &lt;------this is the cliked button type: 'GET',
type: Answer
score: 11
has comment: http://stackoverflow.com/comment/39095025
downvote count: 0

state
tag name: state
tags question: http://stackoverflow.com/q/25116668
type: Tag

http://stackoverflow.com/comment/39134376
type: QuestionComment
score: 2
has text: It's not clear what you're asking for. A picture would help. Do you want to keep a *consistent* aspect ratio? Or do you want things to become square when they're enlarged?
comment on: http://stackoverflow.com/q/25140914
type: Comment

http://stackoverflow.com/q/25072220
type: Question
accepted answer: http://stackoverflow.com/a/25072272
has title: Repeating pattern in Javascript
tagged with: javascript
tagged with: translate-animation
has comment: http://stackoverflow.com/comment/39006506
answer count: 1
tagged with: arrays
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25072272
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
has body: How would I repeat the transform pattern below? BoxesFx.prototype._setTransforms = function() { this.transforms = { 'effect-1' : { 'next' : [ 'translate3d(0, ' + (win.height/2+10) + 'px, 0)', 'translate3d(-' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(0, -' + (win.height/2+10) + 'px, 0)', ], 'prev' : [ 'translate3d(' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(0, ' + (win.height/2+10) + 'px, 0)', 'translate3d(0, -' + (win.height/2+10) + 'px, 0)', 'translate3d(-' + (win.width/2+10) + 'px, 0, 0)' ] }}} Basically, I am trying to have : 'translate3d(0, ' + (win.height/2+10) + 'px, 0)', 'translate3d(-' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(0, -' + (win.height/2+10) + 'px, 0)' repeat n amount of times, we can say n will be 3, without copying and pasting it in 3 times. Is there a way to duplicate an array? I feel like I may be confusing.. hope I explained it well

http://stackoverflow.com/q/25198895
has answer: http://stackoverflow.com/a/25199130
has answer: http://stackoverflow.com/a/25199101
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/18296850
has answer: http://stackoverflow.com/a/25199601
has comment: http://stackoverflow.com/comment/39242209
possible better answer: http://stackoverflow.com/a/25198954
has comment: http://stackoverflow.com/comment/39242206
has answer: http://stackoverflow.com/a/56846513
has answer: http://stackoverflow.com/a/25198954
has comment: http://stackoverflow.com/comment/39242277
favorite count: 0
answer count: 5
accepted answer: http://stackoverflow.com/a/25199101
has title: How do I select table row using Jquery?
tagged with: css
upvote count: 6
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39243107
downvote count: 1
has body: I am trying to to select a table row using JQuery, but it seems not to fire the .selected event. I have put the code on JSFiddle http://jsfiddle.net/tonymaloney1971/3tevxmps/1/ I would like a table row selected when the mouse is clicked and change row colour and display an alert message with the selected row information. I have tried the following but it doesn't work: $("td").click(function () { $('.selected').removeClass('selected'); $(this).addClass("selected"); }); Any ideas? Thanks
type: Question
score: 5

http://stackoverflow.com/comment/39261612
type: Comment
has text: So it is save to assume both function will fire once and only once with this code?
comment on: http://stackoverflow.com/a/25209144
score: 0
type: AnswerComment

http://stackoverflow.com/comment/109787492
type: Comment
has text: This doesnt support veritical scrolling, some mice have that, using a combo of deltaX and deltaY should give you up down left and right
comment on: http://stackoverflow.com/a/43837834
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39231868
has text: Thx for your reply, actually I don't understand the algorithm you mentioned :-) But these would be the two rgb-colors: rgb(0,0,0) and rgb(0,207,239)
comment on: http://stackoverflow.com/a/25193194
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39243699
has text: I use `pushState:true` and the `layout.manager` from Backbone. When I navigate through my pages, the player starts/stops everytime which is partly clear since I apparently re-render my HTML templates each time I go back and forth. Is there still a way to make it play all the time?
comment on: http://stackoverflow.com/a/25199569
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39161475
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25104179
has text: and what about the other browsers?

asp.net
tags question: http://stackoverflow.com/q/25087096
tags question: http://stackoverflow.com/q/25146942
tags question: http://stackoverflow.com/q/25228754
tags question: http://stackoverflow.com/q/25163150
tags question: http://stackoverflow.com/q/25124297
tags question: http://stackoverflow.com/q/25118652
tags question: http://stackoverflow.com/q/25097967
tags question: http://stackoverflow.com/q/25141622
tags question: http://stackoverflow.com/q/25174055
tags question: http://stackoverflow.com/q/25150997
tags question: http://stackoverflow.com/q/25191471
tags question: http://stackoverflow.com/q/25138711
tags question: http://stackoverflow.com/q/25177463
tags question: http://stackoverflow.com/q/25213904
tags question: http://stackoverflow.com/q/25154361
tags question: http://stackoverflow.com/q/25097739
tags question: http://stackoverflow.com/q/25198290
tags question: http://stackoverflow.com/q/25081329
tags question: http://stackoverflow.com/q/25088481
tags question: http://stackoverflow.com/q/25126615
tags question: http://stackoverflow.com/q/25154055
tags question: http://stackoverflow.com/q/25186555
tags question: http://stackoverflow.com/q/25166439
tags question: http://stackoverflow.com/q/25208026
tags question: http://stackoverflow.com/q/25194617
tags question: http://stackoverflow.com/q/25217480
tags question: http://stackoverflow.com/q/25200867
tags question: http://stackoverflow.com/q/25091376
tags question: http://stackoverflow.com/q/25092358
tags question: http://stackoverflow.com/q/25072480
tags question: http://stackoverflow.com/q/25089172
tags question: http://stackoverflow.com/q/25204863
tags question: http://stackoverflow.com/q/25228291
tags question: http://stackoverflow.com/q/25171591
tags question: http://stackoverflow.com/q/25197781
tags question: http://stackoverflow.com/q/25215945
tags question: http://stackoverflow.com/q/25111896
tags question: http://stackoverflow.com/q/25102036
tags question: http://stackoverflow.com/q/25087973
tags question: http://stackoverflow.com/q/25071378
tags question: http://stackoverflow.com/q/25113171
tags question: http://stackoverflow.com/q/25193419
tags question: http://stackoverflow.com/q/25073779
tags question: http://stackoverflow.com/q/25178061
tags question: http://stackoverflow.com/q/25175136
tags question: http://stackoverflow.com/q/25113947
tags question: http://stackoverflow.com/q/25177205
tags question: http://stackoverflow.com/q/25220312
tags question: http://stackoverflow.com/q/25081685
tags question: http://stackoverflow.com/q/25075748
tags question: http://stackoverflow.com/q/25120646
tags question: http://stackoverflow.com/q/25179844
tags question: http://stackoverflow.com/q/25119649
tags question: http://stackoverflow.com/q/25188736
tags question: http://stackoverflow.com/q/25117790
tags question: http://stackoverflow.com/q/25085711
tags question: http://stackoverflow.com/q/25136600
tags question: http://stackoverflow.com/q/25118433
tags question: http://stackoverflow.com/q/25120131
tags question: http://stackoverflow.com/q/25076344
tags question: http://stackoverflow.com/q/25105976
tags question: http://stackoverflow.com/q/25227431
tags question: http://stackoverflow.com/q/25183602
tags question: http://stackoverflow.com/q/25225161
tags question: http://stackoverflow.com/q/25160058
tags question: http://stackoverflow.com/q/25118859
tags question: http://stackoverflow.com/q/25176493
tags question: http://stackoverflow.com/q/25101970
tags question: http://stackoverflow.com/q/25165790
tags question: http://stackoverflow.com/q/25133931
tags question: http://stackoverflow.com/q/25228586
tags question: http://stackoverflow.com/q/25147931
tags question: http://stackoverflow.com/q/25216206
type: Tag
tags question: http://stackoverflow.com/q/25176196
tags question: http://stackoverflow.com/q/25121218
tags question: http://stackoverflow.com/q/25144607
tags question: http://stackoverflow.com/q/25218594
tags question: http://stackoverflow.com/q/25104215
tags question: http://stackoverflow.com/q/25193607

http://stackoverflow.com/comment/39284179
comment on: http://stackoverflow.com/q/25221186
score: 2
type: Comment
has text: You're right about `this`. I'm confused about how you organized your code, but to get around the immediate problem, you could do `addNoise.call(this);` instead of just `addNoise();` which sets the value of `this` as you want in `addNoise`
type: QuestionComment

http://stackoverflow.com/a/25082028
has comment: http://stackoverflow.com/comment/39026017
has comment: http://stackoverflow.com/comment/39026275
accepted answer of: http://stackoverflow.com/q/25081805
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39025204
has comment: http://stackoverflow.com/comment/39025179
upvote count: 1
has body: I think that the problem is path and the position of gruntfile. You have this: BASE_PATH: '../', JS_SOURCE_PATH: '../js/src/', JS_BUILD_PATH: '../js/build/', CSS_SOURCE_PATH: '../css/src/', CSS_BUILD_PATH: '../css/build/', Seems that gruntfile isn't in the root directory but in a folder. Gruntfile (and package.json, node_modules) need to be in the root of the project to work well. If you would like to change its pat you can set two parameters --base and --gruntfile Try to move gruntfile into the root of your project and change path like this: BASE_PATH: '', JS_SOURCE_PATH: 'js/src/', JS_BUILD_PATH: 'js/build/', CSS_SOURCE_PATH: 'css/src/', CSS_BUILD_PATH: 'css/build/', After launch from your console: grunt watch
has comment: http://stackoverflow.com/comment/39025336
has comment: http://stackoverflow.com/comment/39026072
score: 1
answers question: http://stackoverflow.com/q/25081805
has comment: http://stackoverflow.com/comment/39025953
has comment: http://stackoverflow.com/comment/39027182

http://stackoverflow.com/comment/39132686
score: 0
has text: (frame.src) shows old value not latest value.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25138861

http://stackoverflow.com/q/25086516
has title: Populate Backbone collection with json encoded php array
answer count: 1
has comment: http://stackoverflow.com/comment/39034177
tagged with: backbone.js
tagged with: php
has body: I am trying a simple test. To populate a Backbone collection from a json encoded php array. var MyObjectModel = Backbone.Model.extend({ parse:function(response){ return JSON.parse(response); } }); var MyObjectView = Backbone.View.extend({ template: _.template('<a id="<%= id %>" href="#"><%= name %> '), render: function(){ this.$el.html(this.template(this.model.attributes)); return this; } }); var MyList = Backbone.Collection.extend({ url: 'testRest.php', model: MyObjectModel }); var MyListView = Backbone.View.extend({ el:$("#app"), initialize: function(){ this.collection.on('add',this.addOne,this); this.collection.on('reset',this.addAll,this); }, addOne: function(objectModel){ var objectView = new MyObjectView({model: objectModel}); this.$el.append(objectView.render().el); }, addAll: function(){ this.$el.empty(); this.collection.forEach(this.addOne,this); }, render: function(){ return this; } }); var myList = new MyList(); var myListView = new MyListView({collection:myList}); myList.fetch().done(function(){ myListView.render(); }); The HTML page is as basic as possible TEST it works fine when the file testRest.php contains echo json_encode("{\"id\":\"4\",\"name\":\"one\",\"color\":\"ff6600\",\"phoneNumber\":\"+123456789\"}"); but as soon as I try to have more that one item in the returned object: echo json_encode("[{\"id\":\"4\",\"name\":\"one\",\"color\":\"ff6600\",\"phoneNumber\":\"+123456789\"},{\"id\":\"1\",\"name\":\"two\",\"color\":\"800080\",\"phoneNumber\":\"\"}]"); I have an error: Uncaught ReferenceError: id is not defined Does anyone encountered the same issue ? Am I missing something ? Thanks in advance.
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25087318
type: Question
has answer: http://stackoverflow.com/a/25087318
tagged with: javascript
score: 0

http://stackoverflow.com/q/25069777
has answer: http://stackoverflow.com/a/25081770
tagged with: javascript
has body: What is the best way of sharing code between frontend and backend using javascript, specifically saying between nodejs and angularjs? Thing is that we are using same enums and constant values such as error codes in both backend and frontend. Right now we just copy&amp;paste each change to both platform which isn't a good solution. There are also some services that could be shared. I have seen libraries such as browserify; but thats not exactly what I am looking for. I am looking for a solution similar to maven dependency in java. In java, libraries can be shared easily using maven, whereas I can't find a similar way of doing that in javascript. Is there a way to isolate these services and give them as dependency to nodejs using npm and to angularjs using bower independently? Or what are the ways for sharing the same code between frontend and backend?
possible better answer: http://stackoverflow.com/a/27322755
answer count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/39002780
has answer: http://stackoverflow.com/a/27322755
favorite count: 0
tagged with: angularjs
tagged with: npm
upvote count: 18
has comment: http://stackoverflow.com/comment/39002395
tagged with: bower
tagged with: node.js
has comment: http://stackoverflow.com/comment/39023832
type: AnsweredQuestion
has title: Sharing code between AngularJS and Nodejs
accepted answer: http://stackoverflow.com/a/25081770
score: 17
type: Question

http://stackoverflow.com/comment/42546487
type: AnswerComment
has text: 1.0.0-beta.10 supports it, I'm guessing that was the first version
type: Comment
score: 0
comment on: http://stackoverflow.com/a/26823655

http://stackoverflow.com/a/47943005
score: 1
answers question: http://stackoverflow.com/q/25226917
downvote count: 0
has body: For Polymer 2, you would do this: Click Your template is immediately stamped, and all data bindings are relative to the dom bind element. Then you could even add 2 way bindings, etc such as: display See https://www.polymer-project.org/2.0/docs/devguide/templates#dom-bind Or for a quick and dirty solution, you could simply use a global event handler (not the best idea though...). Click
type: Answer
upvote count: 1

http://stackoverflow.com/q/25092358
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
downvote count: 0
tagged with: javascript
has body: I have a master page of my web app using asp.net. And there are for eg three other pages in which i am performing some facebook activites like upload image from facebook album ,autocomplete facebook friends and login also On My Master Page i have written this code for facebook login window.fbAsyncInit = function () { FB.init({ appId: '1499702230242110', // App ID status: false, // check login status cookie: true, // enable cookies to allow the server to access the session xfbml: true, // parse XFBML }); }; FB.Event.subscribe('auth.authResponseChange', function (response) { if (response.status === 'connected') { // performing insert query after login and reloading the page //insert query and on sucess reload function document.location.href = loc; } }); function Login() { flag_set_def = 0; FB.login(function (response) { if (response.authResponse) { // getUserInfo(); //update_insert_details(); flag_set_def = 0; } else { console.log('User cancelled login or did not fully authorize.'); } }, { scope: 'email,user_photos,user_videos' }); } &lt;a class="my_icon" style="cursor: pointer;" onclick="Login()" /&gt; On Master page sign in works smoothly and also query is fired Note the anchor tag(sign in button ) is on the master page (i.e header of the app) But my problem is other pages for eg Page A now here if i click the sign-in button theres error Code on this page window.fbAsyncInit = function () { FB.init({ appId: '1499702230242110', // App ID status: false, // check login status cookie: true, // enable cookies to allow the server to access the session xfbml: true, // parse XFBML }); }; FB.Event.subscribe('auth.authResponseChange', function (response) { // performing insert query after login and reloading the page }); I have tried FB.getLoginStatus(function(response) { instead of FB.Event.subscribe('auth.authResponseChange', function (response) { but its gets reloaded so i am confused what shud i use exactly to run the login system smoothly allthrough the pages
tagged with: jquery
tagged with: asp.net
tagged with: facebook
has title: how to use facebook login properly across website .net
tagged with: facebook-graph-api

http://stackoverflow.com/q/25120205
accepted answer: http://stackoverflow.com/a/25120460
tagged with: load
tagged with: autosuggest
has answer: http://stackoverflow.com/a/39603614
has title: typeahead.js load error "Uncaught ReferenceError: _ is not defined"
possible better answer: http://stackoverflow.com/a/39603614
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39096225
has comment: http://stackoverflow.com/comment/39096090
has answer: http://stackoverflow.com/a/25120460
has body: oHi guys, on page load i see this error in console: "Uncaught ReferenceError: _ is not defined" i have this code in head: I have no idea whats happening, and i cannot google anything about this kind of typeahead.js problem. I will appreciate any help. Thanks
type: Question
has answer: http://stackoverflow.com/a/25120760
tagged with: javascript
tagged with: jquery
score: 0
tagged with: typeahead.js
answer count: 3

http://stackoverflow.com/comment/39167747
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25159142
has text: That is not `inside` div, that will be a attribute of `div`.

http://stackoverflow.com/comment/39253200
comment on: http://stackoverflow.com/a/25204511
type: AnswerComment
score: 0
type: Comment
has text: Just to clarify that i replace the 'pathToScript' with the url?

http://stackoverflow.com/comment/39069467
comment on: http://stackoverflow.com/q/25105810
type: QuestionComment
has text: Disable firewall temporarily, as well as anti virus, make sure that both pc's can see each other on the network with 'ping'.
score: 0
type: Comment

http://stackoverflow.com/comment/39005937
type: QuestionComment
has text: Using *addEventListener* doesn't fix the issue because the closure is still formed as a consequence of the assignment of a function expression from within a function context creates a closure and circular reference. Also, the version of IE that mattered (early IE 6) didn't support *addEventListener* anyway. But substituting *attachEvent* doesn't make any difference.
comment on: http://stackoverflow.com/q/25071687
score: 0
type: Comment

http://stackoverflow.com/q/25099120
tagged with: javascript
has title: NVD3 not formatting dates correctly
answer count: 2
has comment: http://stackoverflow.com/comment/39057113
has answer: http://stackoverflow.com/a/25301279
has body: I'm trying to modify the stacked area chart example for NVD3. I can draw the chart with my own data and everything works fine. The data parsing seems to not be working correctly, however. Like in the NVD3 example, I've converted my dates to Unix time, like in the NVD3 examples, and these are the first values in the data. The second values are the counts. The data draws fine, but the dates are all put as 01/17/1970. An example can be seen here. My data looks like: var data = [ {'values': [[1403236800, 573], [1403323200, 632], [1403409600, 691], [1403496000, 882], [1403582400, 898], [1403668800, 869], [1403755200, 853], [1403841600, 787], [1403928000, 596], [1404014400, 505], [1404100800, 877], [1404187200, 813], [1404273600, 816], [1404360000, 754], [1404446400, 765], [1404532800, 531], [1404619200, 501], [1404705600, 786], [1404792000, 840], [1404878400, 963], [1404964800, 857], [1405051200, 909], [1405137600, 620], [1405224000, 694], [1405310400, 879], [1405396800, 926], [1405483200, 895], [1405569600, 1044], [1405656000, 1201], [1405742400, 869], [1405828800, 757], [1405915200, 1048], [1406001600, 972], [1406088000, 889], [1406174400, 941], [1406260800, 641], [1406347200, 477], [1406433600, 538], [1406520000, 780], [1406606400, 873], [1406692800, 757], [1406779200, 427], [1406865600, 37]], 'key': 'Stream1'}, {'values': [[1403236800, 782], [1403323200, 843], [1403409600, 791], [1403496000, 1020], [1403582400, 1059], [1403668800, 1062], [1403755200, 1231], [1403841600, 1235], [1403928000, 801], [1404014400, 689], [1404100800, 1095], [1404187200, 908], [1404273600, 972], [1404360000, 924], [1404446400, 775], [1404532800, 381], [1404619200, 488], [1404705600, 895], [1404792000, 1081], [1404878400, 1035], [1404964800, 923], [1405051200, 1036], [1405137600, 736], [1405224000, 803], [1405310400, 985], [1405396800, 1186], [1405483200, 1095], [1405569600, 1328], [1405656000, 1229], [1405742400, 1218], [1405828800, 787], [1405915200, 1164], [1406001600, 1100], [1406088000, …
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39056775
tagged with: nvd3.js
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39057068
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25099943
has comment: http://stackoverflow.com/comment/39056975
type: Question
has comment: http://stackoverflow.com/comment/39056929

http://stackoverflow.com/comment/39194860
has text: Hi thank you so much. I need the active class to be added to one of the tags as indicated above - the jQuery function adds the active class only if a user happens to click on the tag which holds an image. re:
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25172486
type: Comment

http://stackoverflow.com/a/25823578
has comment: http://stackoverflow.com/comment/104951845
accepted answer of: http://stackoverflow.com/q/25188684
answers question: http://stackoverflow.com/q/25188684
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Turns out FormData objects don't work with Android on PhoneGap.
upvote count: 1
has comment: http://stackoverflow.com/comment/42265761
score: 1

http://stackoverflow.com/comment/39099877
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25122181
has text: First: Button's are not new `HTML5` elements... Second: Your code is malformed, you have two action elements inside one `label`, not good. and Third and more important: What have you tried so far? let us see your code so we can help you.
score: 0

http://stackoverflow.com/comment/39171825
type: Comment
type: QuestionComment
score: 0
has text: Also, it may be just a typo, but you have an unclosed _tr_ tag there. `</tr `.
comment on: http://stackoverflow.com/q/25161128

http://stackoverflow.com/comment/39163273
score: 0
comment on: http://stackoverflow.com/q/25154332
type: Comment
type: QuestionComment
has text: yes i believe so <access origin="*" />

http://stackoverflow.com/comment/39043149
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25091589
score: 0
has text: Hi nnnnnn, not exactly sure what you mean. Would you mind providing a small code sample to explain? Also, how do you think this will help?

http://stackoverflow.com/comment/39209443
type: Comment
comment on: http://stackoverflow.com/a/25123019
has text: As a work around solution I am using window.open("tel:+18xxxx","_system") to open phone dialer. However if I use this there are couple other issues in my application I am working on it.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25126054
type: Question
has comment: http://stackoverflow.com/comment/39107209
has answer: http://stackoverflow.com/a/25126173
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39107139
has comment: http://stackoverflow.com/comment/39107343
accepted answer: http://stackoverflow.com/a/25126173
linked to: http://stackoverflow.com/q/13486479
possible better answer: http://stackoverflow.com/a/25126648
has answer: http://stackoverflow.com/a/25126648
has comment: http://stackoverflow.com/comment/39108061
has body: Ho everyone, I'm new to coding and I would like to know how do I find out whether an array has repeated objects or not regardless of their order without knowing what these objects are yet? For example: I create an empty array: var random_array = []; Then I use one function to push objects in that array, so I end up with: var random_array = [ball, ball, tree, ball, tree, bus, car]; In the array above we have: 3 balls, 2 trees, 1 bus, 1 car. So how will I be able to know these repeated numbers? Should I use a for loop or what? Anyway, I'm new to coding so please bear with me. And thanks in advance! Edit: Ok, so here's my simple code: function Product(name, price) { this.name = name; this.price = price; } var register = { total: 0, list: [], add: function(Object, quant) { this.total += Object.price * quant; for (x=0; x &lt;quant; x++) { this.list.push(Object); } }, undo: function() { var last_item = this.list[this.list.length - 1]; this.total -= last_item.price; this.list.pop(this.list[this.list.length - 1]); }, print: function() { console.log("Super Random Market"); for (x = 0; x &lt; this.list.length; x++) { console.log(this.list[x].name + ": " + this.list[x].price.toPrecision(3)); } console.log("Total: " + this.total.toFixed(2)); } } var icecream_1 = new Product("Chocolate Icecream", 2.30); var cake_1 = new Product("Chocolate cake", 4.00); register.add(icecream_1, 5); register.add(cake_1, 3); register.print(); I'm trying to build a cash register and I'm trying to find out how to only print the items once with its quantity, instead of multiple times.
has comment: http://stackoverflow.com/comment/39107274
has comment: http://stackoverflow.com/comment/39107195
has title: How to check if the elements in an array are repeated?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39107405
tagged with: arrays
has comment: http://stackoverflow.com/comment/39107182
linked to: http://stackoverflow.com/q/10541068
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25218053
type: Answer
answers question: http://stackoverflow.com/q/25217876
score: 0
has body: I see a couple issues. You forgot a closing curly brace in your for loop. There's a typo here: imgJersy = img_Jersy[**selectJesry**[i].value]; Anyway, here's a working version: http://jsfiddle.net/z92togqd/2/

http://stackoverflow.com/comment/39239441
comment on: http://stackoverflow.com/a/25195132
has text: @ppandu I think you should just modify the code you provided in the question can work. It seems missing the odata version information.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25099409
has body: I'm using this code in background.js in a Chrome extension to copy text to the user's clipboard: chrome.runtime.onMessage.addListener( function(request, sender, sendResponse) { if (request.command == "copy") { executeCopy(request.text); sendResponse({farewell: "copy request received"}); } } ); function executeCopy(text){ var copyDiv = document.createElement('div'); copyDiv.contentEditable = true; document.body.appendChild(copyDiv); copyDiv.innerHTML = text; copyDiv.unselectable = "off"; copyDiv.focus(); document.execCommand('SelectAll'); document.execCommand("Copy", false, null); document.body.removeChild(copyDiv); } It copies the text with formatting. How can I copy the text in plain text with no formatting?
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25275151
has title: Copy to clipboard as plain text
tagged with: google-chrome-extension
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25275151
tagged with: text
type: AnsweredQuestion
tagged with: copy-paste
score: 17
tagged with: google-chrome
upvote count: 17
type: Question

http://stackoverflow.com/q/25162842
has comment: http://stackoverflow.com/comment/39175512
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39175764
has title: sending and getting parameters with jquery/coffeescript
has comment: http://stackoverflow.com/comment/39175572
accepted answer: http://stackoverflow.com/a/25163393
has comment: http://stackoverflow.com/comment/39175855
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39175393
tagged with: coffeescript
has answer: http://stackoverflow.com/a/25163393
has body: My situation is that i need to redirect user to specific page. page which has two inputs. normally they are blank and just wait to be filled. but when this redirection mentioned before is performed: window.location.replace('new') then i need those inputs to be filled. Question is how can i detec if i'm somewhere because of redirection. i was thinking about sending some special params and read them everytime i'm in this place with inputs. anybody knows how to send and read parameters with jquery/coffeescript?
type: Question
has comment: http://stackoverflow.com/comment/39175257

http://stackoverflow.com/comment/56684025
type: AnswerComment
has text: @GabrielFlorit You're right. I think I've fixed it now.
score: 0
comment on: http://stackoverflow.com/a/25176688
type: Comment

http://stackoverflow.com/a/25164062
score: 1
answers question: http://stackoverflow.com/q/25163978
upvote count: 1
has body: The easiest thing to do would be to clear that field right before the form posts: document.getElementById("enc_key").value = '';
type: Answer
has comment: http://stackoverflow.com/comment/39177515
downvote count: 0

http://stackoverflow.com/a/25095157
has body: Use Jquery serialize method to create the form data for submission as you are not escaping the data on directly passing it. Return 1 on success and 0 in failure from PHP script. No data is bad. Your POST request has no response, so maybe it thinks as an error. and the error in callback is for AJAX error. You can pass 0 or any message on DB level error. function SaveUserBlankAnswer(form) { //do validations here var formData = $('#formId').serialize(); $.ajax({ type: "post", url: "Database/SaveUserBlankAnswer_db.php", dataType:"json", data: formData, success: function (data) { if(data.status === "1") { //Show success } else if(data.status === "0") { // alert for error on saving to DB } }, error: function(error){ alert('AJAX ERROR'); } }); } Hope it helps Happy Coding !!!
type: Answer
answers question: http://stackoverflow.com/q/25094927
score: 1
has comment: http://stackoverflow.com/comment/39049465
has comment: http://stackoverflow.com/comment/39049436
upvote count: 1
has comment: http://stackoverflow.com/comment/39049330
downvote count: 0
has comment: http://stackoverflow.com/comment/39049631

http://stackoverflow.com/comment/39033597
has text: Is your sandbox compromised? Why is this important?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25085473
score: 0

http://stackoverflow.com/q/25157936
tagged with: form-submit
has comment: http://stackoverflow.com/comment/39166832
accepted answer: http://stackoverflow.com/a/25158792
has comment: http://stackoverflow.com/comment/39165748
has body: I have sumbit button that triggers another function when clicked. It is not allowing the form to be submitted when the required fields were not filled but still triggers the other event because I put it like this. $('#SubmitButton').click(function() { $('.bs-example-modal-sm').modal('show'); }); The modal still shows even though I don't want it to happen when those required fields were not filled. Now, I want to call all element that contains required attribute to an event in javascript or jquery so that I can validate them together. Is it possible? Or do you have other suggestions to meet my desired output? Thank you.
type: Question
possible better answer: http://stackoverflow.com/a/25158037
has title: Is it possible to gather or call all element that contains 'required' attribute to one event in Javascript?
has comment: http://stackoverflow.com/comment/39165672
tagged with: javascript
has answer: http://stackoverflow.com/a/25158037
score: 0
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/39166283
has comment: http://stackoverflow.com/comment/39167055
has answer: http://stackoverflow.com/a/25158792
tagged with: required
type: AnsweredQuestion

http://stackoverflow.com/a/25144936
has comment: http://stackoverflow.com/comment/39144000
has body: Promises are not domains, they will not catch exceptions from asynchronous callbacks. You just can't do that. Promises do however catch exceptions that are thrown from within a then / catch / Promise constructor callback. So use function getPromise(){ return new Promise(function(done, reject){ setTimeout(done, 500); }).then(function() { console.log("hihihihi"); throw new Error("Oh no!"); }); } (or just Promise.delay) to get the desired behaviour. Never throw in custom (non-promise) async callbacks, always reject the surrounding promise. Use try-catch if it really needs to be.
has comment: http://stackoverflow.com/comment/39144816
has comment: http://stackoverflow.com/comment/39143732
score: 18
upvote count: 18
has comment: http://stackoverflow.com/comment/39144249
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25143476
answers question: http://stackoverflow.com/q/25143476
type: Answer
has comment: http://stackoverflow.com/comment/39144349

http://stackoverflow.com/comment/39161515
type: AnswerComment
comment on: http://stackoverflow.com/a/25143827
type: Comment
has text: Also [this](http://www.telerik.com/forums/intermittent-pagerequestmanagerparsererrorexception) may be of interest to you.
score: 0

http://stackoverflow.com/q/25198968
duplicate of: http://stackoverflow.com/q/1267283
favorite count: 0
linked to: http://stackoverflow.com/q/18828797
has answer: http://stackoverflow.com/a/25199024
has answer: http://stackoverflow.com/a/25199023
linked to: http://stackoverflow.com/q/10073699
has answer: http://stackoverflow.com/a/25198989
score: 12
has comment: http://stackoverflow.com/comment/39242609
type: Question
possible better answer: http://stackoverflow.com/a/25198989
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25199024
tagged with: javascript
has body: I have a ten digit number that will always be constant. I want to pad it so, that it will always remove a zero for every extra number added to the number. Can someone please show me an example of how I can do this? eg. 0000000001 0000000123 0000011299
linked to: http://stackoverflow.com/q/1267283
answer count: 3
upvote count: 12
downvote count: 0
linked to: http://stackoverflow.com/q/10841773
has title: Padding zero to the left of number in Javascript

http://stackoverflow.com/a/25175582
type: AcceptedAnswer
downvote count: 0
has body: You need to read up on async methods. Basically the get method is an async method. While this method is executing the remainder of your script will execute printing out undefined chrome.storage.sync.get('maxLength', function (items) { maxLengthVar = items.maxLength; console.log(maxLengthVar); }); // &lt;- at this point the async GET method may not have finished executing // but your code continues anyway console.log(maxLengthVar); document.getElementById("textToChange").innerHTML = maxLengthVar; Your code can be re-written using callbacks chrome.storage.sync.get('maxLength', function (items) { maxLengthVar = items.maxLength; document.getElementById("textToChange").innerHTML = maxLengthVar; });
has comment: http://stackoverflow.com/comment/39220628
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25174158
upvote count: 1
answers question: http://stackoverflow.com/q/25174158

http://stackoverflow.com/a/25165325
has comment: http://stackoverflow.com/comment/39180474
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25164793
has body: You cannot write a line like this : ( 2 x += in the same statement) body += '\n' + body += '\n' + sheet.getRange(temp + 1,11); // this throws the error I'd suggest to use an intermediate variable like this : var xxx = '\n' + sheet.getRange(temp + 1,11); body+= '\n'+ body + xxx ; if this is really what you want to do... but it seems strange to me... Shouldn't it be something like this : body+= '\n'+sheet.getRange(temp + 1,11);
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39180421
score: 1
has comment: http://stackoverflow.com/comment/39182562
answers question: http://stackoverflow.com/q/25164793

http://stackoverflow.com/comment/39267181
type: Comment
score: 1
has text: @Mark, I have to run for now, but I'll come back to your question later tonight and help you out if you haven't gotten a good answer by then.
comment on: http://stackoverflow.com/a/25212065
type: AnswerComment

http://stackoverflow.com/q/25158043
tagged with: ipython
possible better answer: http://stackoverflow.com/a/33942432
answer count: 2
has title: Could use Vim (-like bindings) in ipython notebook. Any workaround for Jupyter?
favorite count: 0
upvote count: 10
has body: It was possible to use codemirror's vim mode in ipython notebook by generally following the way explained here and I was enjoying it, but in 2.x it's not possible because the notebook's interface "steals" escape key. In fact, "Esc" in codemirror's vim mode is Ctrl-c, which is not working nevertheless. I don't know anything about Javascript, but it seems codemirror's vim.js located in ...\IPython\html\static\components\codemirror somehow maps Ctrl-c to Esc, but this Esc is presumably taken by ipython notebook. Mixing ipython notebook and vim keyboard binding was a great environment. Is there any workaround in 2.x? Because of this, I'm still using 1.2.1. EDIT (Solution to 3.x/Jupyter): ~~Vimception does not work on 3.x(Jupyter) but I found that this guy did a great job. This works perfectly.~~ EDIT2 Just see @Λlisue's answer. He deserves +100.
tagged with: codemirror
tagged with: jupyter-notebook
tagged with: vim
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25162110
accepted answer: http://stackoverflow.com/a/25162110
downvote count: 0
type: Question
has answer: http://stackoverflow.com/a/33942432
score: 10
tagged with: javascript

http://stackoverflow.com/q/25119782
type: UnansweredQuestion
has body: I have a ng-include directive: It renders properly but what I want to achieve is to pass "item" as "subItem" variable. What I did does the trick but when the scope gets updated it won't update the data loaded by ng-include with onload directives. Bigger part of my code: {% verbatim %} {% endverbatim %}
downvote count: 0
score: 1
type: Question
upvote count: 1
tagged with: javascript
favorite count: 0
has title: Angular - does not update data rendered by template from ng-include
answer count: 0
tagged with: angularjs

http://stackoverflow.com/q/25198480
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25334272
score: 0
linked to: http://stackoverflow.com/q/25564330
has title: Embedding yammer feed skipping OAuth, using access token only
answer count: 1
tagged with: oauth
type: UnansweredQuestion
tagged with: yammer
has body: I have successfully authenticated user and I stored its access token in the database. I use it to call some Rest API from the server side. When user logs out, yammer forces logging in again to access embedded feeds. Is it possible to authenticate (or impersonate) user automatically, using only its token via JavaScript to access embedded feeds? I'm not going to call Rest API as described here, I just need to embed feed skipping yammer login page, using access token only.

http://stackoverflow.com/comment/39282957
comment on: http://stackoverflow.com/a/25220297
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/59016/discussion-between-sike12-and-idan-magled).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39173570
type: Comment
has text: Is jQuery 1.4.4 so bad ?maybe i can change my version?
comment on: http://stackoverflow.com/a/25161544
score: 0
type: AnswerComment

http://stackoverflow.com/q/25133893
tagged with: php
has body: I have two dropdown boxes and what I want to do is when I select from the 1st dropdown the value of the 1st dropdown will be able to get by the 2nd dropdown so it will be the basis of the 2nd dropdown to its query. OR Book Type - <option value='0' <?php if($txtorbooktype=='0'){echo 'selected';} ?>> Real Property Tax Administration System <option value='1' <?php if($txtorbooktype=='1'){echo 'selected';} ?>> Business Permit and Licensing <option value='2' <?php if($txtorbooktype=='2'){echo 'selected';} ?>> Others Transaction OR Book <?php $sql = "SELECT orbookcode, concat(orbookfrom,' - ',orbookto) as orbookfromto FROM rorbookinfo where orbooktype = '".$_POST['txtorbooktype']."' and status = '0'"; include_once rootpathphp.'/lib/config.php'; $con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_DATABASE); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"ajax_demo"); $result = mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { $default = ''; if($row['orbookcode']==$txtorbookfromto) { $default = 'selected'; } echo $default; echo " ".$row['orbookfromto']." "; } mysqli_close($con); ?>
has comment: http://stackoverflow.com/comment/39122501
score: 0
type: Question
has comment: http://stackoverflow.com/comment/39121661
answer count: 1
tagged with: javascript
tagged with: jquery
has title: populate dropdown select using ajax or jquery
has answer: http://stackoverflow.com/a/25134919
type: UnansweredQuestion

http://stackoverflow.com/a/25100193
upvote count: 1
type: AcceptedAnswer
has body: You can use the unary plus operator to convert a string rather than parsing it: +"802.11" // 802.11 +"802.11 auth" // NaN
accepted answer of: http://stackoverflow.com/q/25100175
type: Answer
has comment: http://stackoverflow.com/comment/39106438
answers question: http://stackoverflow.com/q/25100175
downvote count: 0
has comment: http://stackoverflow.com/comment/39058814
score: 1

http://stackoverflow.com/comment/39077251
has text: Functions, callbacks, objects, properties, arrays, DOM manipulation, variable scope, `this`.
type: Comment
comment on: http://stackoverflow.com/q/25110044
type: QuestionComment
score: 2

http://stackoverflow.com/comment/39111320
type: Comment
score: 0
type: QuestionComment
has text: I updated my question with clarifications.
comment on: http://stackoverflow.com/q/25128165

http://stackoverflow.com/q/25217181
has comment: http://stackoverflow.com/comment/39318113
downvote count: 1
type: Question
upvote count: 0
tagged with: javascript
score: -1
has title: Greasemonkey code not deleting nodes (or not even executing)
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25331102
favorite count: 0
has body: This is the HTML structure that i want to delete (code pulled from twitch.tv) SKT T1 K vs Najin sword NLB Final 56,951 viewers on nicegametv this is the grease monkey code that i'm using to do it var killIt=["Hearthstone: Heroes of Warcraft", "League of Legends", "Minecraft"]; var el = document.getElementsByClassName("boxart"); //runthrough elements killing certain ones for (i = 0; i < el.length; i++) { for (j=0;j<killIt.length; j++) { if (el[i].getAttribute("original-title")==killIt[j]) { var ely=el[i].parentNode; ely.parentNode.removeChild(ely); } } } } I tried making it into a normal HTML file and running it with Firefox, everything works. However when i try to actually execute it on twitch it doesn't work at all. I assume i don't know something about greasemonkey. JSFiddle
type: UnansweredQuestion

http://stackoverflow.com/q/25130391
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39115614
has body: I am trying to develop some Angular.js webapp. In that app I would like to use angular-ui.bootstrap. So i was trying to do so and here is my app.js code. My question is, why do I get error like reservationController not a function got undefined if I use the recommended (function() { })(); at the start of my app.js file? (function() { var app = angular.module('app', ['ngGrid', 'ui.bootstrap']); var reservationController = function ($scope, $modal, $log) { $scope.items = ['item1', 'item2', 'item3']; $scope.open = function (size) { var modalInstance = $modal.open({ templateUrl: 'reservationTemplate.html', controller: ModalInstanceCtrl, size: size, resolve: { items: function () { return $scope.items; } } }); modalInstance.result.then(function (selectedItem) { $log.info('Foo'); }, function () { $log.info('Modal dismissed at: ' + new Date()); }); }; }; // Please note that $modalInstance represents a modal window (instance) dependency. // It is not the same as the $modal service used above. var ModalInstanceCtrl = function ($scope, $modalInstance, items) { $scope.items = items; $scope.selected = { item: $scope.items[0] }; $scope.ok = function () { $modalInstance.close(); }; $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; }; })(); Here is hte url to the planker planker - the app
answer count: 0
has comment: http://stackoverflow.com/comment/39136887
type: Question
linked to: http://stackoverflow.com/q/25111831
tagged with: anonymous-function
has comment: http://stackoverflow.com/comment/39115658
tagged with: javascript
has comment: http://stackoverflow.com/comment/39136317
has comment: http://stackoverflow.com/comment/39115810
score: 0
has comment: http://stackoverflow.com/comment/39115196
has comment: http://stackoverflow.com/comment/39115352
has title: Angularjs - angular ui bootstrap
has comment: http://stackoverflow.com/comment/39115339

http://stackoverflow.com/q/25135926
favorite count: 0
score: 4
tagged with: d3.js
type: UnansweredQuestion
has title: How to set the image size in Vis.js network graph
tagged with: chap-links-library
has comment: http://stackoverflow.com/comment/39147551
has answer: http://stackoverflow.com/a/36734097
type: Question
upvote count: 4
tagged with: canvas
has body: I am building a network graph using vis.js The problem is, how do I make all the images the same size? (see live example here --> comparison of wordpress &amp; drupal) here's the graph code: var nodes = []; nodes.push({ id: 7, shape: 'image', image: '/static/windows8_icons/PNG/Industry/circuit/circuit-26.png', label: 'sharepoint', widthMin: 20, widthMax: 20 }); edges.push({ from: 1, to: 7, length: 100 }); var data = { nodes: nodes, edges: edges }; var options = { smoothCurves: false, stabilize: false, nodes: { shape: 'image', radius: 24, fontSize: 18, widthMin: 20, widthMax: 20 }, edges: { width: 2 } }; network = new vis.Network(container, data, options);
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39140212
tagged with: data-visualization
answer count: 1
has comment: http://stackoverflow.com/comment/93757115

http://stackoverflow.com/a/25171449
answers question: http://stackoverflow.com/q/25170774
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/46158208
score: 1
has comment: http://stackoverflow.com/comment/39220112
has body: You can access the element definition (i.e. the polymer-element itself) through the element property. So document.querySelector('sample-component') .element.getAttribute('attributes') gives you 'foo1 foo2' (btw. inside an element you can simply write this.element.) Be aware that this only works after Polymer has registered and processed all elements, so depending on where you want to use this statement, you may have to put it into a polymer-ready event handler: &lt;script&gt; addEventListener('polymer-ready', function() { console.log(document.querySelector('sample-component') .element.getAttribute('attributes')); }); &lt;/script&gt; Update: If you want to get a list of all published properties (i.e. the ones in the attributes attribute plus the ones of the publish: {} property), you can use Object.keys(document.querySelector('sample-component').publish) which gives you ['foo1', 'foo2'].
has comment: http://stackoverflow.com/comment/39219308
downvote count: 0

http://stackoverflow.com/q/25184724
tagged with: jquery-ui-sortable
answer count: 2
tagged with: jquery-ui
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/48292713
has answer: http://stackoverflow.com/a/25187420
has body: I have three blocks, "draggable", "sortable" and "droppable" Inside "draggable" I have few elements built like this: &lt;li class="draggable ui-draggable ui-draggable-handle" id="header-1"&gt; &lt;img src="http://placehold.it/150x100"&gt; &lt;/li&gt; These elements can be dragged into "sortable" and the elements dragged here can be dropped into "droppable" which is removing them from "sortable" it's basically deleting them. How can I replace the image dropped into "sortable" with a new one without replacing the image from "draggable"? Here's what I've tried: I've tried adding this to the "draggable": start: function (event, ui) { $(this).addClass('testing'); } This is adding ".testing" class to the current dragged item. and I've added this to the "sortable" : receive: function (event, ui) { $('.testing').replaceWith('&lt;img src="http://placehold.it/400x300"&gt;'); The problem here is that is replacing the whole markup including the "li" parent and I want to replace just the "img" element. Here is a jsbin of how this works now.
possible better answer: http://stackoverflow.com/a/48292713
favorite count: 0
accepted answer: http://stackoverflow.com/a/25187420
type: AnsweredQuestion
score: 3
upvote count: 3
has title: jQuery UI sortable - replace content of dropped item
type: Question

http://stackoverflow.com/comment/39119010
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25132598
has text: Assuming this is possible, what if they edit the part of the Javascript that checks whether they edited the Javascript?

http://stackoverflow.com/q/25196868
accepted answer: http://stackoverflow.com/a/25202439
answer count: 1
tagged with: google-maps
tagged with: javascript
has title: Jquery Selector fails after setContent called on info window
type: AnsweredQuestion
tagged with: infowindow
tagged with: jquery
has body: I have a google maps info window that I open on a map, directly after which I want to bind event listeners to parts of the html in the info window. I do this with JQuery. The code goes something like: myInfoWindow.open(map); $('#someIdInInfoWindow').bind({ click: function() { foo1(); }, mouseenter: function() { foo2(); } }); Unfortunately, I think Google makes most of their libraries asynchronous, so the content of the info window is not actually set until after the JQuery selector has been called. How can I fix this so the event handlers are properly set? Thanks!
tagged with: asynchronous
has answer: http://stackoverflow.com/a/25202439
type: Question
score: 0

http://stackoverflow.com/comment/39234294
type: QuestionComment
comment on: http://stackoverflow.com/q/25194606
score: 0
has text: This doesn't really make sense. If you've got "some code", why isn't it just in your script?
type: Comment

http://stackoverflow.com/q/25129636
tagged with: css
type: AnsweredQuestion
score: 2
has body: I'm trying to create a page with a header, and a navigation below that's fixed when you scroll to a certain point. I'm trying to use the built in 'affix' plugin but I'm struggling a little. I've fixed a couple problems with the navigation not sitting in the same place which was adding these lines.. .navbar.affix { top:0px; width:100%; z-index:11;} However, when it fixes it to the top, the page jumps up and therefore it's not a smooth transition. I understand why, I think, because the space where the navigation was is now not being used, so the rest of the content shifts up.. What do I need to do so that when the navigation gets fixed, the content doesn't shift up? Thanks in advance. Demo - http://samtodd.co.uk/header-navigation.html
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25131614
tagged with: jquery
has title: Bootstrap affix attribute to have a fixed nav below a header
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25131614
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap

http://stackoverflow.com/a/32898922
type: Answer
answers question: http://stackoverflow.com/q/25139225
has body: Maybe because you spelt "length" wrong: for(var i = 1; i &lt; reservations.lenght; i++){
score: 0

http://stackoverflow.com/q/25142654
has answer: http://stackoverflow.com/a/25142854
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25142979
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25142854
has comment: http://stackoverflow.com/comment/39137568
has comment: http://stackoverflow.com/comment/39137808
has answer: http://stackoverflow.com/a/25143645
has body: I want to pull into an array the classes of all of the &lt;img&gt; in a particular &lt;div&gt; and then use those classes to delete the first &lt;img&gt; that shares that class in a different &lt;div&gt;. So far, I have this that calls the original array: var class = $('.frame div img').each(function() { return $(this).class; }).get(); class.forEach(function(entry) { console.log(entry); }); The log outputs a list of the &lt;img&gt;&lt;/img&gt; lines. After that, I get stuck. //Iterate through array and delete first &lt;img&gt; in #grid that has the same class, limit one per iteration. // var img_class = $.each(class, function(key, value) { // console.log(value); // return $(this).attr('class'); // }); $('#grid img').each(function(){ if($(this).attr('class') == img_class){ $(this).remove(); } }); The goals are: Getting an array of classes into the img_class variable Delete only the first &lt;img&gt; as it iterates through each class in the array Thanks!
has answer: http://stackoverflow.com/a/25142979
has comment: http://stackoverflow.com/comment/39137587
type: AnsweredQuestion
has title: Javascript - Pull attribute into array/delete items based on attribute
has comment: http://stackoverflow.com/comment/39137535
type: Question
has comment: http://stackoverflow.com/comment/39137571
tagged with: arrays

http://stackoverflow.com/a/25090707
accepted answer of: http://stackoverflow.com/q/25090615
has comment: http://stackoverflow.com/comment/39041288
has comment: http://stackoverflow.com/comment/39042746
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25090615
type: Answer
score: 2
upvote count: 2
has body: The reason that you're not seeing your script execute is because jQuery isn't assigned to the $ variable. When viewing the element inspector console on your page there's a javascript error Uncaught TypeError: undefined is not a function When I run the same script via console replacing $ with jQuery the #reply-title is hidden successfully.

http://stackoverflow.com/comment/39057207
score: 0
comment on: http://stackoverflow.com/a/25086939
has text: There is nothing to indicate to me that you should be getting that result from the given data. You will have to produce a JSFiddle example to show it. Also, it seems more like labels than points? In any case, this is getting slightly off topic from the timestamp/date problems that were initially occuring.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25158122
has body: for chapter use {{$index}} for page you can access index using {{$parent.$index}} please see here: http://jsbin.com/xowub/2/ Page: {{$parent.$index}} chapter:{{$index}} Title: {{page.title}} </d
answers question: http://stackoverflow.com/q/25158056
has comment: http://stackoverflow.com/comment/39165999
has comment: http://stackoverflow.com/comment/39166078
has comment: http://stackoverflow.com/comment/39166777
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39167431
has comment: http://stackoverflow.com/comment/39166484

http://stackoverflow.com/comment/39209302
type: AnswerComment
type: Comment
has text: Its fine but it action only on first DIV so how I can make for every DIV that have ID 'test' and replace it with new one ?
comment on: http://stackoverflow.com/a/25159224
score: 0

http://stackoverflow.com/comment/39050501
comment on: http://stackoverflow.com/q/25095794
score: 0
type: QuestionComment
type: Comment
has text: You mean you have two parameters which you want to send them to your next page ?

http://stackoverflow.com/comment/39122222
has text: I'll expand a little to make this more general.
comment on: http://stackoverflow.com/a/25134116
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25146591
has body: For example: ...... ...... ...... ...... I want the third or second iframe to open the link which is clicked, open in the first frame. Target attribute not work. It is possible ? if yes, then how to do it ?
tagged with: javascript
score: 0
upvote count: 1
downvote count: 1
has title: force a frame to open new window in the top frame
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39145353
has answer: http://stackoverflow.com/a/25146798
has comment: http://stackoverflow.com/comment/39157664
has answer: http://stackoverflow.com/a/25146709
type: Question
answer count: 2

http://stackoverflow.com/comment/39047916
type: Comment
has text: That would hardly work, as the app would need to scan all links in the content packages to generate the manifest, and that may be quite dinamic and unpredictable.
comment on: http://stackoverflow.com/a/25090420
score: 0
type: AnswerComment

http://stackoverflow.com/q/25085860
answer count: 2
has answer: http://stackoverflow.com/a/25085895
tagged with: javascript
tagged with: jquery
has body: I'm trying to create multiple DIVs when onClick() is triggered. I've used an increment value to create multiple DIVs. But this doesn't fully work. See comments in code. (works perfect when a single DIV is used) var tDV = 0; $("#aTx").click(function() { var diagonalScl; var txSiz; tDV++; $("#ltn").append(' '); //WORKS $("#aTextDV"+tDV).append(' '); // DOSEN'T WORK (no image, onClick does not work) $("#aTextDV"+tDV).append(' ');// DOSEN'T WORK (no image, onClick does not work) $("#aTextDV"+tDV).append(' ');// DOSEN'T WORK (no image, onClick does not work) $("#aTextDV"+tDV).append(' Type Here '); alert("#aTextDV"+tDV)// DOSEN'T WORK (no textarea)
has comment: http://stackoverflow.com/comment/39033244
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25085895
has comment: http://stackoverflow.com/comment/39032197
has answer: http://stackoverflow.com/a/25085899
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/25085899
has title: Create multiple DIVS on the fly
type: Question

http://stackoverflow.com/q/25123258
favorite count: 0
tagged with: html5-template
has comment: http://stackoverflow.com/comment/39144339
has comment: http://stackoverflow.com/comment/39102208
upvote count: 2
has comment: http://stackoverflow.com/comment/39101956
has comment: http://stackoverflow.com/comment/39102325
has comment: http://stackoverflow.com/comment/39102904
possible better answer: http://stackoverflow.com/a/25123461
accepted answer: http://stackoverflow.com/a/25123973
has comment: http://stackoverflow.com/comment/39102016
has answer: http://stackoverflow.com/a/25123461
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39102518
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39144490
tagged with: javascript
has title: How can I save a for a second use?
has body: I'm trying to properly use HTML5 templates in a webpage. However, I discovered that when I take the content of a template and put it into some section of the webpage, the template is emptied and the same action can't be performed again. How do I ensure the template isn't emptied, or should I be using a different technique? Example HTML: Click to show template Hooray! Now, note that when you try again, this area will be blank. JavaScript: $("#replace-button").click(replaceWithTemplate); function replaceWithTemplate(event) { $("#holder").html($("#my-template")[0].content); } Live demo: http://jsfiddle.net/Supuhstar/y33a9/
has answer: http://stackoverflow.com/a/25123973
has comment: http://stackoverflow.com/comment/39101871
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/39102630
has comment: http://stackoverflow.com/comment/39102121

http://stackoverflow.com/comment/39041002
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25090431
has text: I'm such a muppet. Hadn't even realised there had been an update. Thanks for the help!
type: Comment

http://stackoverflow.com/comment/39109597
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25127251
score: 0
has text: sorted now added my js code

http://stackoverflow.com/a/25139660
has comment: http://stackoverflow.com/comment/39132467
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25139049
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39132319
has comment: http://stackoverflow.com/comment/39132147
has body: First of all, sorry for my english skill. You are right, when you create It's cy='-10'moves your circle#c1 under the -10px to top Try this http://jsfiddle.net/9r78K/31/ I hope I correctly understood your problem.

http://stackoverflow.com/q/25160414
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: uiwebview
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39170387
tagged with: webview
linked to: http://stackoverflow.com/q/10237031
type: Question
has body: Can we open an ios WebView page from HTML5 using javascript? I have to redirect to the native ios page from the javascript code on a button click. Is this possible? I have gone through some links as mentioned below, How to open a native iOS app from a web app http://blog.grio.com/2012/07/uiwebview-javascript-to-objective-c-communication.html But, am not pretty clear with the solutions. Please help me with your answers and with some proper links.
has comment: http://stackoverflow.com/comment/39198213
tagged with: ios
answer count: 1
has title: Can we navigate to ios WebView page from javascript page?
tagged with: javascript
has answer: http://stackoverflow.com/a/25175375

http://stackoverflow.com/comment/39064456
type: Comment
type: QuestionComment
has text: Is there a cleaner way to do than creating (unnecessary) API calls to retrieve server-side info?
comment on: http://stackoverflow.com/q/25103255
score: 0

http://stackoverflow.com/comment/39163411
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25156557
has text: are you using express? did you configure static resource?
score: 0

http://stackoverflow.com/a/25070646
has comment: http://stackoverflow.com/comment/39012085
has comment: http://stackoverflow.com/comment/39013205
has body: I am not sure if I understood your question correctly, the formData is available before each files are sent. From Dropzone.js. Sending: Called just before each file is sent. Gets the xhr object and the formData objects as second and third parameters, so you can modify them (for example to add a CSRF token) or add additional data. Sample usage: sending: function(file, xhr, formData) { formData.append("test",$('#test').val()); },
upvote count: 1
answers question: http://stackoverflow.com/q/25070353
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25070353

http://stackoverflow.com/comment/39016114
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25077258
type: QuestionComment
has text: @jQueryAngryBird - +1 for your confidence. but not possible :)

http://stackoverflow.com/a/25210551
answers question: http://stackoverflow.com/q/25210500
downvote count: 1
upvote count: 0
score: -1
has body: Using the browser to parse the URL and getting the hash would probably be most reliable and would work with any valid URL var url = 'http://mysite/#/12345'; var ele = document.createElement('a'); ele.href = url; var result = ele.hash.slice(2); FIDDLE or you can just split and pop it var result = url.split('#/').pop();
type: Answer

http://stackoverflow.com/comment/39260084
comment on: http://stackoverflow.com/q/25208124
score: 0
has text: there is no type because it would not have functioned once i resized the page
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25090380
score: 2
downvote count: 0
type: Question
answer count: 2
has title: Is it possible to serve user created content offline in javascript?
tagged with: javascript
upvote count: 2
favorite count: 0
has body: My application serves user created bundles of HTML pages for e-learning, also known as SCORM packages, and i'm trying to make that as fast as possible. Loading page-by-page in iframes is quite slow, as pages may include high resolution graphics, animations, audio, video and so on. Unfortunately pre-loading these pages is quite difficult, as they usually react to onLoad() events to start animations and interactions. Without using applets or extensions, would it be possible to download the user bundle and serve it "in-browser" to the application?
tagged with: offline-browsing
tagged with: offline
has answer: http://stackoverflow.com/a/25097521
has answer: http://stackoverflow.com/a/25090420
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39047886
has comment: http://stackoverflow.com/comment/39041550

http://stackoverflow.com/comment/39058577
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25099777
has text: OP says she doesn't know how to set up a demo with Bootstrap features. Just a moment, I'll make a JSFiddle.

http://stackoverflow.com/q/25204398
type: UnansweredQuestion
tagged with: html5-appcache
tagged with: google-chrome
tagged with: gruntjs
has body: I have appcache implemented in a Web app I'm working on (generated by a grunt task) and it works fine. The only thing I'm wondering about is displaying the resources being appcached. For example in Chrome Developer console it shows the Appcache Update event (and displays when its done). However, in Firefox 31.0 I don't know if there is a way to duplicate Chrome's Developer appcache console log. Is there some addon that can duplicate this behaviour
type: Question
tagged with: firefox
answer count: 1
tagged with: javascript
has title: Firefox Appcache console logging
score: 0
has answer: http://stackoverflow.com/a/25204821

http://stackoverflow.com/q/25207528
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/25208224
accepted answer: http://stackoverflow.com/a/25207943
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Customize Search Box CSS in Bootstrap 3 and placement of elements in Navigation Bar
tagged with: twitter-bootstrap
answer count: 2
upvote count: 1
has body: I am a newbie to Bootstrap and I am having a hard time aligning elements in the way I want. I want my navigation bar to look like this: While now, it is something like this: What should I do so that the logo shifts a few pixels on the side? I tried over-riding the Bootstrap CSS by using margin-left in style.css: but that displaces the logo in small and medium resolutions. Like this: I want the logo to stick on the corner when the display is medium and small and be displaced like shown in the image only when the resolution is full scale. I am told that I must do that using Media Queries. Any other better alternatives using Bootstrap 3 classes or even a implementation in Media Queries will do. I have hosted the site here and the HTML/CSS and Bootstrap files here. I have another minor issue with the search box. Right now, its like this: I want it to look like this: What change should I make to the CSS code that my search box looks the way I desire? I am having a hard time adding customization to Bootstrapped CSS.
has answer: http://stackoverflow.com/a/25207943
has answer: http://stackoverflow.com/a/25208224
type: AnsweredQuestion

http://stackoverflow.com/a/25947945
score: 7
answers question: http://stackoverflow.com/q/25155818
upvote count: 7
type: Answer
has body: According to this, There are several 'rules' that need to be met, and yours is lacking at this point: Output the data to send (Always start with "data: ") It is somehow like: echo "data: {$resa['ct']}\n\n";
downvote count: 0

http://stackoverflow.com/q/25145242
possible better answer: http://stackoverflow.com/a/25145299
has title: "not defined" error when instantiating object
accepted answer: http://stackoverflow.com/a/25145319
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39142594
has comment: http://stackoverflow.com/comment/39142647
linked to: http://stackoverflow.com/q/833661
has comment: http://stackoverflow.com/comment/39142677
type: Question
has comment: http://stackoverflow.com/comment/39142663
has comment: http://stackoverflow.com/comment/39142620
has answer: http://stackoverflow.com/a/25145312
has body: If I create an object like this: var foo = foo || {}; There's no problem. But this: var foo = bar || {}; Produces the error: Uncaught ReferenceError: bar is not defined Why doesn't the second snippet work when the first does?
tagged with: javascript
score: 4
upvote count: 4
answer count: 3
has answer: http://stackoverflow.com/a/25145319
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25145299
has comment: http://stackoverflow.com/comment/39142603

http://stackoverflow.com/q/25182263
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39233279
has comment: http://stackoverflow.com/comment/39242234
answer count: 1
tagged with: kineticjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25208862
has title: Issues in design/implementation of a software with kineticjs
has body: I want to create an application that the user will have the ability to click on a picture add points and for each (certain) pairs of points the software will draw a line between those two. The points are draggable so the line must be able to readjust itself to the new position of its two ancors. The points are pre-specified and more than 5 or 6 (it can be 10 or more) So my design so far. One kinetic stage One backgroundLayer which will have the following children: backgournImage (will hodl the image to click on) The points aded the lines between the points I guess for each of the lines I will have to use a group that will contain the two ancors and the line. My problem is the following: Is there a convenient way to make sure a group is allready created for a certain pair of points so as not to create a new one when clicking on picture to add a new point? stage.('contentClick', function(event){ //create a new point // if a group for the specific pair of ancors exists //add the point and draw the line // else this is the first point of the pair we are talking about // so create the group //and add the new point // add the group on the backgroundLayer //redraw stage ); All points can have a specific id the name of the point. I know the code for creating points groups adding them removing them checking parents etc, just don't know how could I do it with the least manual method. I mean it's not very productive checking each and every one of the points right? Hope I am making some sense...
type: Question

http://stackoverflow.com/comment/39127423
comment on: http://stackoverflow.com/q/25137156
has text: With br's at the start, in database I dont have it
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25079021
tagged with: salesforce
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25079466
has body: How to import a file in Visualforce Markup? I'm trying to reference a static resource in Salesforce with the URLFOR Function. The following script works <apex:page> My First JavaScript Click Date to display current day, date, and time. Date </apex:page> But, I'd like to implement the following by referencing the function within VisualForce <apex:page> My First JavaScript Click Date to display current day, date, and time. Date <apex:includeScript value="{!URLFOR($Resource.SalesDashboard, '/js/datefunction.js')}"/> </apex:page> I've also tried: <apex:page> My First JavaScript Click Date to display current day, date, and time. Date <apex:includeScript value="{!$Resource.SalesDashboard}"/> </apex:page>
type: Question
tagged with: javascript
has title: How to import a javascript file in Visualforce Markup?
score: 0
tagged with: visualforce
answer count: 1

http://stackoverflow.com/a/25140833
accepted answer of: http://stackoverflow.com/q/25140723
has comment: http://stackoverflow.com/comment/39135852
has comment: http://stackoverflow.com/comment/39134243
score: 12
upvote count: 12
has comment: http://stackoverflow.com/comment/39134894
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39135277
has comment: http://stackoverflow.com/comment/39134164
type: Answer
has body: The problem is simply that the name property of function objects is not supported in Internet Explorer. The property is non-standard (up until ECMAScript 6, at least) so it's not altogether surprising. There isn't a completely reliable workaround so I would suggest trying to do without it if possible. However, you may be able to extract the name from the string representation of the function. Here a couple of links that deal with this that I got from a quick search: Javascript get Function Name? https://gist.github.com/dfkaye/6384439 Update From the comments, it turns out that the goal of the question author is to test whether a variable is a reference to a plain object create by the Object constructor. A reliable way of doing this for a variable a is Object.prototype.toString.call(a) == "[object Object]" For more information I recommend the following page written by Angus Croll: http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/
has comment: http://stackoverflow.com/comment/39134674
has comment: http://stackoverflow.com/comment/39136223
answers question: http://stackoverflow.com/q/25140723
has comment: http://stackoverflow.com/comment/39134902
has comment: http://stackoverflow.com/comment/39135462

http://stackoverflow.com/comment/39154470
comment on: http://stackoverflow.com/a/25151315
type: AnswerComment
score: 0
type: Comment
has text: Says `$currentCounterColor` is not defined! "undefined is not a function"

http://stackoverflow.com/a/51442695
type: Answer
score: 2
downvote count: 0
upvote count: 2
has body: You can simply use the data-interval attribute of the carousel class. It's default value is set to data-interval="3000" i.e 3seconds. All you need to do is set it to your desired requirements.
answers question: http://stackoverflow.com/q/25147394

http://stackoverflow.com/a/25076389
downvote count: 0
has comment: http://stackoverflow.com/comment/39014047
type: Answer
has comment: http://stackoverflow.com/comment/39014356
has comment: http://stackoverflow.com/comment/39015015
has comment: http://stackoverflow.com/comment/39014136
has comment: http://stackoverflow.com/comment/39014459
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25076227
has body: The function is called addLineClass
has comment: http://stackoverflow.com/comment/39014269
has comment: http://stackoverflow.com/comment/39014810

http://stackoverflow.com/a/25163819
upvote count: 5
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25163379
answers question: http://stackoverflow.com/q/25163379
has comment: http://stackoverflow.com/comment/39177244
type: Answer
has body: One big culprit behind your confusion is the C programming language. In it, many things that you think are statements, such as assignments, are actually expressions. //This is valid C and Javascript code x = (y += 1); //We all have been bitten by this one once haven't we? while(x = y){ } and in order to let these statements be used in lines of their own, there is a rule in the language grammar that lets an expression followed by a semicolon to count as a statement stmt := &lt;if_then_else&gt; | &lt;while loop&gt; | ... | &lt;expression&gt; ';' The rule for evaluating these single-expression statements is that the expression is evaluated for side-effects and its value gets ignored. Javascript (and lots of other languages) adopted lots of things from the C syntax, including this particular treatment of expressions. Using a string as a statement does nothing with its value (unless the string is "use strict" - then its a useful hack that does something in new browsers but nothing in the old ones). Using a function call as a statement runs it for side effects and ignores its return value. Some more stingy languages, such as Haskell or Go will complain if you ignore return values but C and Javascript will just throw them away. -- In Haskell you get a compiler warning for ignoring return values do functionThatReturnsNothing() a &lt;- functionThatReturnsAValue() _ &lt;- functionThatReturnsAValue() -- unless you ignore it explicitly It appears that anythign not explicitly wrapped in an eval function is ignored by JS rather than throwing any errors. Thank god its that way! It would be crazy error prone if things got implicitly eval-ed like that and strings should never be run as code unless you are explicit about it!

http://stackoverflow.com/comment/39295179
type: Comment
has text: @Alnitak—you're welcome to that opinion. To me, the plain JS solution is simpler and [hugely faster](http://jsperf.com/es5-vs-pojs)—about 10 times—and doesn't require shims or special consideration for any browser in use.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25224015

http://stackoverflow.com/a/25217896
type: AcceptedAnswer
type: Answer
score: 3
downvote count: 0
has body: it's because of this line, and the fact you are using local pages: js.src = "//connect.facebook.net/en_US/sdk.js"; When urls do not provide the protocol the browser will use whatever protocol the browser is currently viewing. Since you are using this from a local source the used link will be file://connect.facebook.net/en_US/sdk.js If you want to use it from a local source you need to add the protocol to the url js.src = "https://connect.facebook.net/en_US/sdk.js";
accepted answer of: http://stackoverflow.com/q/25217831
answers question: http://stackoverflow.com/q/25217831
upvote count: 3

http://stackoverflow.com/comment/39162900
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25155846
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58760/discussion-between-ryeballar-and-sfas).
type: AnswerComment

http://stackoverflow.com/a/25092671
has comment: http://stackoverflow.com/comment/39045001
has comment: http://stackoverflow.com/comment/39045285
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39044876
has comment: http://stackoverflow.com/comment/39044919
downvote count: 0
has body: javascript and php are run in 2 different places. Your javascript runs in a browser while your php runs on the server. You cant really mix those two. The way you probably want to do this is, on button click capture the click with javascript and send ajax request to your php script sitting on the server. Than have the php perform push notifications. Once php script is done, return result back to javascript to show it to the user. You should also use javascript library like jquery which makes things much easier (especially the ajax call).
score: 1
answers question: http://stackoverflow.com/q/25092612

http://stackoverflow.com/comment/112289145
type: Comment
comment on: http://stackoverflow.com/a/63501216
has text: Welcome to Stack Overflow. Code-only answers are discouraged on Stack Overflow because they don't explain how it solves the problem. Please edit your answer to explain what this code does and how it improves on the existing upvoted answers the question already has, so that it is useful to users with similar issues.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39068611
type: AnswerComment
comment on: http://stackoverflow.com/a/25104825
has text: @sifriday I am expecting to filter out duplicates before running this. I don't expect there is a way how to avoid that.
type: Comment
score: 0

http://stackoverflow.com/q/25113884
tagged with: angularjs
upvote count: 56
has answer: http://stackoverflow.com/a/25114028
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/26983696
score: 56
accepted answer: http://stackoverflow.com/a/25114028
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39084523
has title: Should angular $watch be removed when scope destroyed?
has body: Currently working on a project where we found huge memory leaks when not clearing broadcast subscriptions off destroyed scopes. The following code has fixed this: var onFooEventBroadcast = $rootScope.$on('fooEvent', doSomething); scope.$on('$destroy', function() { //remove the broadcast subscription when scope is destroyed onFooEventBroadcast(); }); Should this practice also be used for watches? Code example below: var onFooChanged = scope.$watch('foo', doSomething); scope.$on('$destroy', function() { //stop watching when scope is destroyed onFooChanged(); });
possible better answer: http://stackoverflow.com/a/43197127
tagged with: javascript
tagged with: angularjs-scope
has answer: http://stackoverflow.com/a/43197127
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/60563362
favorite count: 0

http://stackoverflow.com/comment/39153450
has text: @Se0ng11 sorry for bother you again. I try one more thing described in the link you indicate to me (see the update), but still it's happening the same error.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25150731

http://stackoverflow.com/comment/39051709
score: 0
has text: usually if i saw the same message, it means I didn't really parse the data to the page, it might be null or empty array , you can check it twice.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25096453

http://stackoverflow.com/comment/39098348
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25121371
has text: We had to solve this for a group of plugins that needed to be arbitrarily applied to loaded pages. Solution: We trigger our own "panel.loaded" event in the Ajax load, passing the new panel as a property. The top-level page code catches the panel.loaded event and applies plugins based on matching classes within in the loaded page.
score: 0

http://stackoverflow.com/comment/39242092
has text: @true: that's the problem, the OP doesn't know where/how to bind the event listener. Don't know why you are mentioning a elements at all.
comment on: http://stackoverflow.com/q/25198594
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25256938
score: 0
has body: You can actually achieve that in ECMAScript 6! class classe() { //Real class definition in JS! constructor(){ this.nome = "rodrigo"; } setup() { $("#1").keydown((event) =&gt; { if (event.keyCode == 13) { $(this).attr("value", ref.nome); } }) } } var obj = new classe(); obj.setup(); The this won't change if the () =&gt; {} syntax is used. Meanwhile in ES5 you can use .bind: function classe() { this.nome = "rodrigo"; this.setup = function() { var ref = this; $("#1").keydown(function (event) { if (event.keyCode == 13) { $(this).attr("value", ref.nome); } }.bind(this)); }; } var obj = new classe(); obj.setup();
type: Answer
answers question: http://stackoverflow.com/q/25204321

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/25191141
tags question: http://stackoverflow.com/q/25192134
tags question: http://stackoverflow.com/q/25177704
tags question: http://stackoverflow.com/q/25194291
type: Tag

http://stackoverflow.com/q/25071644
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39005584
has comment: http://stackoverflow.com/comment/39005881
has comment: http://stackoverflow.com/comment/39005835
type: Question
has comment: http://stackoverflow.com/comment/39005540
has comment: http://stackoverflow.com/comment/39005821
has comment: http://stackoverflow.com/comment/39005816
answer count: 1
has title: event prevent default not working
has comment: http://stackoverflow.com/comment/39005738
tagged with: javascript
tagged with: jquery
score: 0
has body: $(function(){ $('.button').click(function(e){ e.preventDefault(); history.pushState({url: 'index.html'},'','page1.html'); }); }); $(window).bind('popstate', function(e){ console.log(e.originalEvent); }); When e.preventDefault() is removed, the hash tag will appear after like localhost/page1.html# , but when e.preventDefault() is added, e.originalEvent.state will appear as null Click me What is the problem? How do I solve it? EDITED: When the button is pressed, the address bar updated(That's good). However, when I hit the back button, the state object appears as null(It suppose to show {url: 'index.html'})
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25071940
accepted answer: http://stackoverflow.com/a/25071940
has comment: http://stackoverflow.com/comment/39005884

http://stackoverflow.com/comment/39013926
comment on: http://stackoverflow.com/q/25076396
type: Comment
has text: you need to enclose it in `''`(like a string literal) - not sure abt PHP syntax
score: 0
type: QuestionComment

http://stackoverflow.com/a/25176691
has body: As mentioned in a comment isNaN() and Number.isNaN() both check that the value you pass in is not equal to the value NaN. The key here is that NaN is an actual value and not an evaluated result e.g. "blabla" is a String and the value is "blabla" which means it is not the value "NaN". A plausible solution would be doing something like: Number.isNaN(Number("blabla")); //returns true.
upvote count: 7
has comment: http://stackoverflow.com/comment/98744884
has comment: http://stackoverflow.com/comment/39200843
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25176459
score: 7

http://stackoverflow.com/q/25085020
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/14468659
accepted answer: http://stackoverflow.com/a/25127528
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25085326
answer count: 2
has answer: http://stackoverflow.com/a/25085326
downvote count: 0
tagged with: jquery-mobile
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am working on a final project for school and I have run into a bug that has me stumped. I have a jQM page that contains two divs (detailed-content, sortable-content), one to hold report A and one to hold report B. I have adapted the jQM hash processing demo to .show() the correct report div and .hide() the other report divs based upon the querystring 'selection'. This seems to work properly as long as the reports page is the page being physically loaded in the browser. Unfortunately, when another page, is loaded directly (by URL) and the Reports button at the top is then clicked, no content div is loaded once the reports page is loaded (although the console log confirms the event is being fired) and if the 'Choose Reports' button is clicked there is an odd issue with rendering of the jQueryMobile popup wiget. Then when any other page is visited many odd glitches occur relating to the system properly keeping track of the active page. Has anybody encountered this type of issue before? I am hoping that it is something simple that I am missing, it is driving me nuts! Let me know if any further information is required
has answer: http://stackoverflow.com/a/25127528
has title: jQuery Mobile - hash processing with subsequent jQuery.show() issues

http://stackoverflow.com/comment/39090269
type: QuestionComment
has text: Could you replicate your example as live demo?
comment on: http://stackoverflow.com/q/25069907
score: 0
type: Comment

webbrowser-control
type: Tag
tags question: http://stackoverflow.com/q/25142594
tag name: webbrowser-control

http://stackoverflow.com/q/25114259
tagged with: javascript
has title: Passing arguement to an event in dojo 1.7+
favorite count: 0
has answer: http://stackoverflow.com/a/25114856
type: UnansweredQuestion
tagged with: arguments
tagged with: parameter-passing
has answer: http://stackoverflow.com/a/35597381
tagged with: dojo
has body: I want to pass an argument to an event in dojo 1,7+. suppose I have the following module: define( [ "dojo/dom", "dojo/dom-style", "dijit/registry", "js/busyIndicator", "dojox/mobile/ListItem", "dojo/dom-class", "ppwidgets/MyCommunitesRecentListItem", "js/utils" ], function(dom, domStyle, registry, busyIndicator, ListItem, domClass, MyCommunitesRecentListItem, utils) { return { sortBy: function(sortType) { }}; } ); In html: In normal html I can do that: onClick="sortBy('date')" but in dojo, I have to use this: data-dojo-attach-event="onClick: _sortBy" I want to bind the function sortBy( ) to a button, How can I pass the sortType to sortBy( ) function. Thanks in advance :)
type: Question
answer count: 2
score: 5
upvote count: 5
downvote count: 0

http://stackoverflow.com/comment/39300584
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25230023
has text: This works perfectly fine but I prefer to use $.when in these situations as opposed to the success callback. I guess its just a preference thing?

http://stackoverflow.com/q/25177713
has answer: http://stackoverflow.com/a/25177766
has body: I came across this coffee script. y = ... // assume something that would work in the context d3.svg.line().x((d)-&gt; x(new Date(d.epoch * 1000))).y((d)-&gt; y(+d[info])) I want to know what is the + sign mean in that anonymous function at the tail. I tried to find coffee script ref. But I never learned this script, and I have know idea what should I look for. I use JavaScript, and I want to convert this script into JS.
type: AnsweredQuestion
tagged with: coffeescript
accepted answer: http://stackoverflow.com/a/25177766
has comment: http://stackoverflow.com/comment/39202643
type: Question
score: 0
answer count: 1
tagged with: javascript
has title: What does the '+' sign mean in a coffee script anonymous function do?

http://stackoverflow.com/q/25105854
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39069153
score: 0
has answer: http://stackoverflow.com/a/25146039
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25105881
answer count: 2
has title: JS error: SyntaxError: missing ; before statement
tagged with: javascript
favorite count: 0
has body: I'm getting an error (it's javascript btw), and even after a lot of googling, I cannot find where it comes from. It says "SyntaxError: missing ; before statement", with an arrow pointing to the point in between nmwoo_vars and file_meta. Anyone who knows how to solve it? var nmwoo_vars.file_meta = [{"label":"Graveren","type":"checkbox","options":"Ja, graveer mijn bril","price":"10"},{"label":"Gravering","type":"text","options":"","price":""}];

http://stackoverflow.com/q/25079495
has comment: http://stackoverflow.com/comment/39030073
has comment: http://stackoverflow.com/comment/39030105
tagged with: javascript
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/67125747
has answer: http://stackoverflow.com/a/35186088
downvote count: 0
tagged with: jquery
has title: How to use owl carousel vertically?
has answer: http://stackoverflow.com/a/25110213
favorite count: 0
has body: I did not want to take the plugin code so I was wondering if someone had already managed to use plugin vertically. It's a shame on the part of this plugin can be used horizontally. Sorry for langage...
type: Question
has answer: http://stackoverflow.com/a/62629657
tagged with: css
score: 15
has answer: http://stackoverflow.com/a/52226151
has comment: http://stackoverflow.com/comment/45232322
tagged with: owl-carousel
upvote count: 15

http://stackoverflow.com/comment/39475867
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25219425
has text: any chances a view filter is applied? or data processing delay? everything seems to be correctly implemented and I can't seea reason for this not to work...
type: Comment

http://stackoverflow.com/comment/39103867
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25124229
has text: @DaveNewton - It would be ideal if all the functions in the entire script tag I had just removed would stop running. I first realized this was an issue because I have the same buttons on multiple pages, they all do different things so the new and old functions were overlapping. I would love to find a way to remove the old javascript without reloading the page ( if its even possible ofcourse) because there is a ton of it coming in on each page to run quite a bit of stuff.
score: 0

http://stackoverflow.com/q/25202380
tagged with: firebug
has comment: http://stackoverflow.com/comment/39248516
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39251834
accepted answer: http://stackoverflow.com/a/27267786
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/25202788
has comment: http://stackoverflow.com/comment/39254303
has comment: http://stackoverflow.com/comment/39253725
upvote count: 3
has answer: http://stackoverflow.com/a/25202788
has title: Firebug causes Firefox to be unresponsive
type: Question
tagged with: firefox
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/27267786
has body: I'm a beginner web developer. I often use Firebug to debug my JavaScript. Problem is that there are some script files from my page's UI that have a lot of code and this causes my web browser to be unresponsive, i.e. I get a dialog saying the script is unresponsive. Basically this happens when I am within Firebug's Script panel. How can I deal with this?

http://stackoverflow.com/comment/39212906
has text: Note: @jgillich's answer is more complete than mine.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25183493

http://stackoverflow.com/a/25205365
type: Answer
has body: You were pretty much there already, you only needed to implement a way to actually put the disabled attribute on the option elements. This fiddle show the way to do that, plus remove the disabled attributes when the all option gets deselected again: http://jsfiddle.net/ruhar4j6/ $('.specialty_select_box').change(function(){ if($(this).val() == 'all'){ $(this).find("option").each(function(i, o) { if ($(o).val() != "all") { $(o).attr("disabled", "disabled"); } }); } else { $(this).find("option").removeAttr("disabled"); } });
answers question: http://stackoverflow.com/q/25204834
score: 0

http://stackoverflow.com/comment/39239402
has text: In this case it might be a bit safer to do `if(result >= Range)` or do an epsilon check as you suggest
type: Comment
comment on: http://stackoverflow.com/a/25197358
type: AnswerComment
score: 0

http://stackoverflow.com/a/25069961
has body: It looks to me like your resolve function in state1 is not being invoked because you've given it a dependency to be injected (RandomFactory) that doesn't exist. Why doesn't it exist? You've declared it in an incorrect manner using ['', function() {...}]. If you don't want to inject any dependencies, just omit the first item of the array rather than using an empty string. Like this: [function() {...}]. It's too bad there isn't a nice error message but this seems to be why it's not working. See here which works for me: http://plnkr.co/edit/QYfMSV6zdBC0Ra2HiF2Z?p=preview
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25069660
score: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39009066
has comment: http://stackoverflow.com/comment/39002909

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/25184495
tags question: http://stackoverflow.com/q/25072505
type: Tag

http://stackoverflow.com/a/25134205
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25130876
has body: It looks like you are confused with the asynchronous nature of JavaScript. If you call isLoggedIn it returns before function(s,e){console.log(s); s} is executed. Add a console.log('test') at the very end of isLoggedIn and observe order in which messages are displayed on the console. Your issue has nothing to do with chrome or chrome-extensions, what you need to read about is handling asynchronous functions in JavaScript. See this question for a good explanation and ways to solve it (said question is about AJAX, but that's just a detail).
score: 0
answers question: http://stackoverflow.com/q/25130876

http://stackoverflow.com/a/25165240
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25165068
has body: You're going to want to use the async library. It will make your life much easier. // inside `Tweet.find` async.each(tweets, function(done) { // do stuff to tweets User.findById(element.user, function(err, user){ if (err) return done(err); // do stuff with user done(); }); }, function(err) { // called when done res.json(response); });
answers question: http://stackoverflow.com/q/25165068
has comment: http://stackoverflow.com/comment/54574596
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25078801
type: Answer
answers question: http://stackoverflow.com/q/25078541
score: 0
has body: There are a few options. With plain old javascript, you can do, for example: Download or Download With jQuery you can easily disable a lot of links: Download Delete And you can even use CSS! Download Although, it wouldn't surprise you, IE <= v9 (if I'm correct) doesn't support this... And on most browsers you can't force the browser to use a pointer as a cursor... All in a fiddle demo!

http://stackoverflow.com/a/25161215
score: 1
has body: You'll have to use indexOf on the strings in the array to compare each one, something like this $('#test').on('input', function(){ var val = this.value, res = $.grep([].concat(sports, interests, hobbies), function(value) { return value.indexOf(val) != -1; }); res = $.trim(val).length &gt; 0 ? res : []; // account for empty value $('ul').html( $.map(res, function(val) { return $('&lt;li /&gt;', {text: val}); })); }); FIDDLE
downvote count: 0
answers question: http://stackoverflow.com/q/25161053
type: Answer
has comment: http://stackoverflow.com/comment/39171829
upvote count: 1

http://stackoverflow.com/q/25219176
tagged with: javascript
score: 6
has comment: http://stackoverflow.com/comment/39295362
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/31555578
favorite count: 0
has comment: http://stackoverflow.com/comment/39303624
has answer: http://stackoverflow.com/a/31555578
has answer: http://stackoverflow.com/a/25358102
type: Question
has comment: http://stackoverflow.com/comment/39280395
answer count: 2
tagged with: php
upvote count: 6
tagged with: moodle
accepted answer: http://stackoverflow.com/a/25358102
has body: In Moodle, while we use $PAGE->requires->js_init_call() to include a JS function defined in our plugin's module.js file, how can I include external Javascript resources, which we normally include in the tags like: mypage
has title: How to include external JavaScript on my Moodle page?

http://stackoverflow.com/a/75652106
downvote count: 3
upvote count: 0
answers question: http://stackoverflow.com/q/25159330
type: Answer
score: -3
has body: $moment(date).format("YYYY-MM-DD")

http://stackoverflow.com/comment/39014310
has text: I think you're after `$(e.target).parents(".class")` or `.closest(".class")` - depends on what sort of rules you have and what your markup is really
comment on: http://stackoverflow.com/q/25076574
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39156149
comment on: http://stackoverflow.com/a/25113108
has text: You can check the conflict using browser developers toolbar and yes you can replace $ with jQuery word.
score: 0
type: AnswerComment
type: Comment

kendo-combobox
tag name: kendo-combobox
type: Tag
tags question: http://stackoverflow.com/q/25106453

http://stackoverflow.com/q/25189565
has comment: http://stackoverflow.com/comment/39226228
tagged with: css
type: Question
has answer: http://stackoverflow.com/a/25190764
has body: I have a script for local scrolling (click a link it takes you to another part of the page) on a site that also has the Bootstrap carousel implemented as well. The internal scrolling script seems to override the carousel scripts and not sure how to fix. I tried leveraging jQuery's :not() method but couldn't get it to work the way I needed it to. Site is in development here JS $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') &amp;&amp; location.hostname === this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 800); return false; } }
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Internal scroll interfers with boostrap carousel
tagged with: twitter-bootstrap
type: UnansweredQuestion

http://stackoverflow.com/a/25183203
has body: The coding was this: function loginRecord(){ db.transaction(function(tx){ var user=$('#username').val(); var pwd=$('#pass').val(); var x="SELECT * FROM login WHERE username='"+user+"' AND password='"+pwd+"' "; tx.executeSql(x,[],function(tx,result){ if (result.rows.length &gt; 0){ // alert("Username : " + result.rows[0].username); //alert("Password: " + result.rows[0].password); alert("Hello " +user); alert("your password is " +pwd); }else{ alert("Invalid user!"); } }); }); }
type: Answer
answers question: http://stackoverflow.com/q/25074048
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/25174097
type: UnansweredQuestion
answer count: 0
score: 0
type: Question
has comment: http://stackoverflow.com/comment/39198025
tagged with: angularjs-service
tagged with: javascript
has body: Some external libraries that I use together with Angular create global variable, which I don't really like because it pollutes global scope. For example PaperJS, when include it in the page, it will create a global variable "paper" in global scope Anybody has any idea how to create Angular services to wrap those external libraries so that it's no longer exposed in global scope?
tagged with: abstraction
has comment: http://stackoverflow.com/comment/39196603
tagged with: global
has title: Abstract external library in Angular
tagged with: angularjs

http://stackoverflow.com/comment/39187106
type: Comment
type: QuestionComment
score: 1
has text: map is a local variable, remove the `var`-keyword
comment on: http://stackoverflow.com/q/25155685

http://stackoverflow.com/comment/39095126
type: AnswerComment
type: Comment
has text: @JabirALFatah First you need to add jQuery reference which I have given in my previous comment and then add your all script under that link then it will work
comment on: http://stackoverflow.com/a/25118870
score: 0

http://stackoverflow.com/a/25217100
answers question: http://stackoverflow.com/q/25217064
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39276720
downvote count: 2
has comment: http://stackoverflow.com/comment/39276775
upvote count: 4
has body: Nah, the relevant part to your issue is this blurb: If undefined, a function, or a symbol is encountered during conversion it is either omitted (when it is found in an object) or censored to null (when it is found in an array). So in other words, if your JSON object contains functions, they are omitted during the JSON.stringify process. "symbol-keyed" refers to a new primitive type introduced in ecmascript6. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof for more info. This is an example of a "symbol-keyed" property: {[Symbol("foo")]: "foo"} Reference for JavaScript Symbol: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol

http://stackoverflow.com/comment/39134633
has text: Chrome and Firefox (I don't think that the browser is the problem, though)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25141004

http://stackoverflow.com/comment/39175632
has text: Not really. Although you're now getting onto a different subject; you might be better asking a separate question about how to style the content of the infowindows
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25162855

http://stackoverflow.com/comment/39280514
comment on: http://stackoverflow.com/q/25219197
type: Comment
type: QuestionComment
has text: If window is not loaded, there will be no targ01. My suggestion is to hide body (not sure if it is possible) and turn it to visible after do the task. Personally, I do a DIV inside body to work with as a body. I had the same problem with Flash and solved hiding everything until the first adjustments done.
score: 0

http://stackoverflow.com/q/25106677
has answer: http://stackoverflow.com/a/25122410
tagged with: node.js
tagged with: phantomjs
type: AnsweredQuestion
score: 1
tagged with: stdout
has comment: http://stackoverflow.com/comment/39076446
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25122410
tagged with: javascript
has comment: http://stackoverflow.com/comment/39071528
answer count: 1
tagged with: child-process
has title: Why does output come out from STDERR and not STDOUT when using child_process.exec for Node.js?
favorite count: 0
has body: I am trying to buffer the results from my phantomjs script to nodejs but for some reason the buffer results is constantly coming out of STDERR but not STDOUT even though there doesn't seem to be an error. NodeJS code: var exec = require('child_process').exec; exec('phantomjs console.js', function(stdout, stderr, error){ if (error !== null) { console.log('exec error: ' + error); } console.log("Standard Output: " + stdout + " "); console.log("Error Output: " + stderr + " "); }); PhantomJS code (console.js): console.log("Hello world!"); phantom.exit(); Result that I get: exec error: Standard Output: null Error Output: Hello world!
upvote count: 2

http://stackoverflow.com/q/25093071
tagged with: typescript
has body: Here's my Typescript class and interface: interface ITest { qs: ITestQuestion[]; message: string; } interface ITestQuestion { answer: string; } class QuestionHomeController { test: ITest = { qs: null, message: string = "xxxxx" } constructor() { this.test.qs = // &lt;&lt; setting to An Array of Test Questions } } The code fails because this.test is not defined. How should I define this and should I create a new test object in my constructor? Also is this the correct way for me to declare the interfaces? I am a bit confused about how properties work in a Typescript class.
has title: Should I use new to make an object property in a typescript class?
type: Question
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25093250
has answer: http://stackoverflow.com/a/25093250
type: AnsweredQuestion

http://stackoverflow.com/q/25097183
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25097511
has comment: http://stackoverflow.com/comment/39053164
possible better answer: http://stackoverflow.com/a/25097445
type: Question
tagged with: google-maps
has answer: http://stackoverflow.com/a/25097445
tagged with: javascript
has comment: http://stackoverflow.com/comment/39053202
score: 0
has comment: http://stackoverflow.com/comment/39053130
answer count: 2
has body: I am brand new at coding and am playing with google maps. I have my map set up un the html window and I have a carousel of different poi's, which I have hard coded into the map. I want the poi marker to change based on which location is visible in the carousel. I have been able to retrieve the active carousel item(this.item), but can't get the variable out of this function. I appreciate any help. navigator.geolocation.getCurrentPosition(function(position) { this.pos = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); this.item = $('#this-carousel-id .carousel-inner .item.active').attr("data-id"); markerCurrentPosition = new google.maps.Marker({ map: map, position: pos, icon: currentPositionIcon, }); map.setCenter(pos); }, function() { handleNoGeolocation(true); }); // watch for user's current position watchId = navigator.geolocation.watchPosition(updateUserPosition); } else { // Browser doesn't support Geolocation handleNoGeolocation(false); }
has answer: http://stackoverflow.com/a/25097511
tagged with: jquery
has title: Get Javascript variable from inside function

http://stackoverflow.com/q/25150083
has answer: http://stackoverflow.com/a/25150183
has body: I've been trying to implement my own carousel as a way to teach myself javascript and have come across a problem where the animation prior to my removeClass call doesn't occur but the animation for bringing in the next element works as intended. I realize this sounds quite vague so I've reproduced my problem with jsfiddle: http://jsfiddle.net/f57N3/ I've also included the relevant code below. Any help would be greatly appreciated! HTML: Next thingy other thingy another thingy CSS: .box{ display: none; position: relative; opacity: 0; width: 350px; height: 200px; background-color: blue; color: white; border: 5px solid black; } .active-box{ display: block; opacity: 1; } .container{ width: 850px; height: 500px; margin: 0px auto; background-color: #003399; } Javascript: // Functionality for 'Next' button $("#b2").click(function(){ var thisBox = $(".active-box"); var nextBox = thisBox.next(); if(nextBox.length == 0){ nextBox = $(".box").first(); } // Set pre-animation conditions thisBox.css("margin-left", "0px"); thisBox.css("opacity", "1"); // Animate this box and remove active class thisBox.animate({marginLeft: "-=300px", opacity: "0"}, 800).removeClass("active-box"); //Set pre-animation conditions nextBox.css("margin-left", "300px"); nextBox.css("opacity", "0"); // Animate this box and add active class nextBox.animate({marginLeft: "-=300px", opacity: "1"}, 800).addClass("active-box"); }); Any help would be greatly appreciated!
has title: JQuery animate() not working as intended in conjunction with removeClass()
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25150190
tagged with: jquery
has answer: http://stackoverflow.com/a/25150190
possible better answer: http://stackoverflow.com/a/25150183

http://stackoverflow.com/q/25166945
has title: Expanding/Contracting Textarea on Typing
tagged with: css
answer count: 1
has comment: http://stackoverflow.com/comment/39184953
score: 0
has comment: http://stackoverflow.com/comment/39183845
has body: I am looking to have a comment field that will grow to show all text when the user clicks on it and then shrink back down (hiding the unshowable text) when the user clicks out of the text area. The user should be able to type in text and modify what they see. I am assuming that textarea is the way to go since input doesn't have multi-line functionality. However, I am a little stuck on how to implement this. It seems everything out there just has the textarea resize to fit the text but not shrink back down after the user is done typing in it. Could someone help me out/point me in the right direction? Thanks!
has answer: http://stackoverflow.com/a/25166974
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
type: Question

http://stackoverflow.com/q/25222193
has body: I have a radio group which is contains 2 radio buttons. This radio group created after an Ajax response. I want to get the value of the checked radio button but i am unable to do this. Here is my implementation, any help would be appriciated. HTML: Yes&lt;input class='radioInput' id='g1Positive' type='radio' name='g1' value='YES'/&gt; No&lt;input class='radioInput' id='g1Negative' type='radio' name='g1' value='NO'/&gt; JS: $('#resultTable').on("click", ".editForm2", function(){ var isIengStuWork = $('input:radio[name=g1]:checked').val(); });
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25222232
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39285929
has comment: http://stackoverflow.com/comment/39286339
has comment: http://stackoverflow.com/comment/39286101
has title: Unable to get radio group value via jquery
tagged with: jquery
has comment: http://stackoverflow.com/comment/39286172
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25222232
has answer: http://stackoverflow.com/a/25222366
accepted answer: http://stackoverflow.com/a/25222366
type: AnsweredQuestion

firefox
tags question: http://stackoverflow.com/q/25181538
tags question: http://stackoverflow.com/q/25139600
tags question: http://stackoverflow.com/q/25194928
tags question: http://stackoverflow.com/q/25202380
tags question: http://stackoverflow.com/q/25204285
tags question: http://stackoverflow.com/q/25117869
tags question: http://stackoverflow.com/q/25183175
tags question: http://stackoverflow.com/q/25155616
tags question: http://stackoverflow.com/q/25187903
tags question: http://stackoverflow.com/q/25170285
tag name: firefox
tags question: http://stackoverflow.com/q/25199852
tags question: http://stackoverflow.com/q/25134524
tags question: http://stackoverflow.com/q/25138536
tags question: http://stackoverflow.com/q/25120225
tags question: http://stackoverflow.com/q/25107634
tags question: http://stackoverflow.com/q/25118894
tags question: http://stackoverflow.com/q/25204398
tags question: http://stackoverflow.com/q/25076580
tags question: http://stackoverflow.com/q/25135626
type: Tag
tags question: http://stackoverflow.com/q/25145792
tags question: http://stackoverflow.com/q/25214315
tags question: http://stackoverflow.com/q/25192035
tags question: http://stackoverflow.com/q/25195612
tags question: http://stackoverflow.com/q/25119551
tags question: http://stackoverflow.com/q/25191712
tags question: http://stackoverflow.com/q/25211408
tags question: http://stackoverflow.com/q/25180890
tags question: http://stackoverflow.com/q/25082060
tags question: http://stackoverflow.com/q/25161128
tags question: http://stackoverflow.com/q/25083992
tags question: http://stackoverflow.com/q/25111087
tags question: http://stackoverflow.com/q/25147955
tags question: http://stackoverflow.com/q/25220821
tags question: http://stackoverflow.com/q/25136593
tags question: http://stackoverflow.com/q/25143460

http://stackoverflow.com/q/25098853
has answer: http://stackoverflow.com/a/25098936
has comment: http://stackoverflow.com/comment/39056265
favorite count: 0
has title: What is the difference javascript:method() and just plain method()
possible better answer: http://stackoverflow.com/a/25098936
type: AnsweredQuestion
tagged with: onclick
has answer: http://stackoverflow.com/a/25100439
has comment: http://stackoverflow.com/comment/39056355
type: Question
has comment: http://stackoverflow.com/comment/39059369
upvote count: 4
accepted answer: http://stackoverflow.com/a/25100439
answer count: 2
has body: I have come across the following syntax in JavaScript &lt;img style="padding-left:8px;" id="testIcon" align="middle" src="/images/test.png" onclick="javascript:testMethod()"/&gt; and was wondering what is the difference between above and &lt;img style="padding-left:8px;" id="testIcon" align="middle" src="/images/test.png" onclick="testMethod()"/&gt;
downvote count: 0
tagged with: javascript
score: 4

http://stackoverflow.com/comment/39081254
type: Comment
has text: Actually there was a type in CaspNZ's code (incorrect end-tag). When I fixed that it worked fine.
type: QuestionComment
comment on: http://stackoverflow.com/q/25110558
score: 0

http://stackoverflow.com/comment/39215935
type: Comment
comment on: http://stackoverflow.com/a/25184968
has text: Remove the set interval then?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25103349
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25103436
accepted answer: http://stackoverflow.com/a/25103436
has body: How can I disable a button after it has been clicked. And let it remain disabled. I tried using .prop('disabled', true); although it disables the button, however when i refresh the page then button became clickable again. Also if I have a list of it, it would disable other button as well which I do not want. Is there anyway to do it? $("#pay1").submit(function(){ $.ajax({ type: "GET", url: "pay.php", data: $("#pay1").serialize(), success: function(data){ $("#add_success").html(data); $("#add_err").html(""); } }); return false }); $("#pay2").submit(function(){ $.ajax({ type: "GET", url: "pay.php", data: $("#pay2").serialize(), success: function(data){ $("#add_success").html(data); $("#add_err").html(""); } }); return false }); $("#pay3").submit(function(){ $.ajax({ type: "GET", url: "pay.php", data: $("#pay3").serialize(), success: function(data){ $("#add_success").html(data); $("#add_err").html(""); } }); return false });
type: Question
has title: Disable button after clicked PHP
score: 0
answer count: 1
tagged with: button
tagged with: javascript
tagged with: jquery
tagged with: php
has comment: http://stackoverflow.com/comment/39064371

http://stackoverflow.com/comment/39114951
has text: The full solution would be to have a LibraryList View encompassing the entire list, and multiple instances of a LibraryItem View, used to render each element of the list. The activate function should be defined on LibraryItem View as well as the events attribute. Each LibraryItem View holds a reference to its Model (instance of Library), and can thus access the id using this.model.get('myID');
comment on: http://stackoverflow.com/a/25130177
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25138390
accepted answer: http://stackoverflow.com/a/25138583
answer count: 1
has body: how can we set the outer iframe inline style( height and width) using an external javascript? I define the outer frame inside a domain, and the the child frame inside another domain using an external javascript and append to the outer frame.Then I tried to make my outer frame with the width and height of the inner frame.But it shows some cross domain problem.How can we retify this problem using javascript?
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39129425
type: Question
has answer: http://stackoverflow.com/a/25138583
has title: how to set height and width of an iframe
score: 0

http://stackoverflow.com/a/25184633
has comment: http://stackoverflow.com/comment/39229437
has comment: http://stackoverflow.com/comment/39219976
has comment: http://stackoverflow.com/comment/39221845
answers question: http://stackoverflow.com/q/25184412
has comment: http://stackoverflow.com/comment/39217086
has comment: http://stackoverflow.com/comment/39225340
has comment: http://stackoverflow.com/comment/39233603
has comment: http://stackoverflow.com/comment/39240547
has comment: http://stackoverflow.com/comment/39220307
has comment: http://stackoverflow.com/comment/39219957
score: 0
has comment: http://stackoverflow.com/comment/39248509
has comment: http://stackoverflow.com/comment/39266441
has body: In your pure JS you write: var first = document.getElementsByTagName("section")[0]; first.style.minHeight = window.innerHeight + "px"; window.onresize = function() { first.style.minHeight = window.innerHeight + "px"; } while leaving out + "px" in jQuery: $("section:first").css("min-height", $(window).height()); $(window).resize(function() { $("section:first").css("min-height", $(window).height()); }); Try instead: $("section:first").css("min-height", $(window).height() + "px"); $(window).resize(function() { $("section:first").css("min-height", $(window).height() + "px"); }); .height() returns an integer only, you also need to add + "px" here, just as you do in pure JS
type: Answer

http://stackoverflow.com/comment/39220691
has text: You can create a hidden canvas and do it there
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25187367

http://stackoverflow.com/q/25142974
upvote count: 4
has answer: http://stackoverflow.com/a/25199805
answer count: 2
downvote count: 0
favorite count: 0
tagged with: cordova
tagged with: angularjs
type: UnansweredQuestion
has title: Ionic.js or Appgyver Steroids for Angular MPA
tagged with: ionic-framework
has body: I'm working on a somewhat large Angular.js CRM mobile app that uses Ionic JS Framework for the UI elements. I've been debugging using Ripple Phonegap Emulator. I've had literally no performance issues anywhere. The transitions are fast and fluid. However, once I deployed using Phonegap Build and loaded the APK on an Android device, the performance was terrible. Ionic.js has known problems with Master/Detail transitions which can be worked around, but even apart from these screens (when I am not loading any external content), the app was very slow. My question is, should I try to adopt Appgyver's Steroids Framework for my UI elements and transitions? Will Steroids offer faster performance and would it be worth the transition? I'm targeting Android and iOS.
type: Question
tagged with: mobile
tagged with: javascript
has answer: http://stackoverflow.com/a/25159957
score: 4

http://stackoverflow.com/comment/39040757
has text: A jsfiddle or codepen would help solve this issue. I assume you've tried CSS styles for #gdpbox, not just the inner div? I think you should remove the inner div, in any case.
comment on: http://stackoverflow.com/q/25090340
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25148510
has comment: http://stackoverflow.com/comment/39149271
has body: Instead of traversing the object properties names as your are doing, you should traverse the elements themselves. You can do this with jquery .each which iterates over the selected elements, in this case the elements you saved in kids: $(kids).each(function(){ console.log($(this).attr('id')); count++; }) console.log(count); You can read more about .each method here: http://api.jquery.com/each/
type: Answer
has comment: http://stackoverflow.com/comment/39149304
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25148447
answers question: http://stackoverflow.com/q/25148447
has comment: http://stackoverflow.com/comment/39149367
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/39229904
comment on: http://stackoverflow.com/q/25191336
type: Comment
score: 0
type: QuestionComment
has text: I have done that.still not working :(

http://stackoverflow.com/a/25146547
has comment: http://stackoverflow.com/comment/39145321
has comment: http://stackoverflow.com/comment/39145611
score: 2
downvote count: 0
has body: Option 1: You can call my method without instantiating MyObject: MyObject.prototype.myMethod(); Options 2: You must instantiate the MyObject to be able to access myMethod. This will fail: MyObject2.myMethod(); Uncaught TypeError: undefined is not a function This will not: var myObject = new MyObject2(); myObject.myMethod(); Check out the code pen: http://codepen.io/sessa/pen/tfqln
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25146417

http://stackoverflow.com/q/25126029
has title: Capture XAxis value NVD3 Stacked Area Chart
answer count: 1
linked to: http://stackoverflow.com/q/21917222
tagged with: nvd3.js
tagged with: d3.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25127516
type: Question
has body: I'm having trouble with capturing some data on the StackedAreaChart in NVD3. I'm able to successfully intercept the click event using this answer: NVD3 Stacked Area Chart However, I need to go one step deeper. Now that I've intercepted the event, I'm getting back an object that looks like this: { point: {key:"A Place", values:[], seriesIndex: 1}, pos: [479, 283], series: "A Place", seriesIndex: 1 } The object's pos array looks the most promising- the first element in the array is obviously the x coordinate with the second element being the y coordinate. I'm trying to pipe this number into the same function that generates the x-axis values in order to give me the data point on the x-axis I'm looking for. However, I haven't had any luck and my desk is starting to have a bow to it where I've been repeatedly slamming my head. Anyone have any insight on how I can essentially walk backwards and pipe the coordinates I'm getting back into the chart functions available in d3 to get the x-value I so deisre?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25127516
tagged with: stacked-area-chart
score: 0

http://stackoverflow.com/comment/39283470
has text: OK, so I need to load the sub-template (monthTemplate) once when the directive is initalized, compile it, then use it each time a month is rendered. I think I'm clear on the plan but don't know how to do that :)
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25220478
type: QuestionComment

http://stackoverflow.com/a/25170506
has body: If a variable is in one file, and just that one file is loaded, then that variable could be considered to be 'scoped' to that file. In File Three, you're attempted to access a value from File Two - and you're not finding it anywhere. That's because when you hit File Three, the only stuff that gets loaded is the stuff in File Three. Does that make sense? Your variables are scoped to what is actually being loaded - so it would make sense that File Three cannot access variables defined in another php page that has not been loaded. Your options are to either pass the value along as a parameter or to run the database query again. Also, obligatory sql injection attack warning.
has comment: http://stackoverflow.com/comment/39190236
has comment: http://stackoverflow.com/comment/39190510
answers question: http://stackoverflow.com/q/25170362
has comment: http://stackoverflow.com/comment/39190086
score: 0
has comment: http://stackoverflow.com/comment/39190450
has comment: http://stackoverflow.com/comment/39228382
type: Answer
has comment: http://stackoverflow.com/comment/39229179
has comment: http://stackoverflow.com/comment/39190208
has comment: http://stackoverflow.com/comment/39229980
has comment: http://stackoverflow.com/comment/39190327

http://stackoverflow.com/q/25089350
type: Question
has answer: http://stackoverflow.com/a/25091142
tagged with: javascript
has comment: http://stackoverflow.com/comment/39039559
has body: I have a div that I want to give a dynamic class with AngularJS. The div is withing an ng-repeat statement where lang.prefix is first en then sv Using the following code works and sets the class to i-flag-en than i-flag-sv, but is it correct? &lt;div class="float-left flag i-flag-{{lang.prefix}}"&gt;&lt;/div&gt; I know there exist a ng-class directive which can be used to dynamically set the class of an element with AngularJS. I think I read somewhere in a book, that the normal class directive not should be used to set the class property dynamically with AngularJS because of the way Angular manipulates the dom. However, the following code does not work: &lt;div class="float-left flag" ng-class="i-flag-{{lang.prefix}}"&gt;&lt;/div&gt; and I rather want to set the class in this way instead of creating another scope variable. Is it bad practice to use the class attribute with AngularJS to dynamically set the class? Does it work all the time even if it would be bad practice?
answer count: 1
downvote count: 0
has title: Using class with angular vs ng-class while using a mixed expression
accepted answer: http://stackoverflow.com/a/25091142
favorite count: 0
tagged with: angularjs
tagged with: css
type: AnsweredQuestion
score: 21
upvote count: 21

http://stackoverflow.com/q/25184495
has comment: http://stackoverflow.com/comment/39215210
score: 0
accepted answer: http://stackoverflow.com/a/25184634
answer count: 2
possible better answer: http://stackoverflow.com/a/25184696
has answer: http://stackoverflow.com/a/25184696
has comment: http://stackoverflow.com/comment/39214998
has comment: http://stackoverflow.com/comment/39214836
tagged with: javascript
has comment: http://stackoverflow.com/comment/39215042
type: AnsweredQuestion
tagged with: object-literal
has title: Undefined function in object literal scroll
has answer: http://stackoverflow.com/a/25184634
tagged with: jquery
has comment: http://stackoverflow.com/comment/39215093
has comment: http://stackoverflow.com/comment/39214867
type: Question
has comment: http://stackoverflow.com/comment/39215132
has body: Hi Im trying to make an image gallery similar to instagram that loads images on scroll. Im trying it as an object literal variable but am getting an undefined method for this.showPics... getMore is called from an ajax success method. Is this a scope issue because of the scroller being called in the .scroll? How should I do this? BTW showPics is defined I just didnt paste it in.. Thanks var Pics{ showPics: function() { //loop thru images } scroller: function() { if ($(window).scrollTop() + $(window).height() == $(document).height()) { this.showPics(); } } getMore: function(){ $(window).scroll(this.scroller); } }

http://stackoverflow.com/comment/39093829
score: 0
comment on: http://stackoverflow.com/q/25093795
type: Comment
type: QuestionComment
has text: i tried that depth * ( i % 3) for x positions

http://stackoverflow.com/a/25122373
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6
score: 6
accepted answer of: http://stackoverflow.com/q/25122284
answers question: http://stackoverflow.com/q/25122284
has body: $('a.list-group-item').attr('href', function(){ return '/' + $(this).text() + '/'; }) jsFiddle example

http://stackoverflow.com/q/25225828
linked to: http://stackoverflow.com/q/7122426
type: Question
tagged with: javascript
answer count: 1
tagged with: jquery
has body: How do I select the quantity of visible items on a jCarousel? I'm using this plugin http://sorgalla.com/jcarousel/ with this template http://sorgalla.com/jcarousel/examples/responsive/ By default a maximum of 3 elements appear no matter how much i change the width of the container, I want to show at least 5 elements.
has title: How to select the quantity of visible items on a responsive jCarousel
has answer: http://stackoverflow.com/a/25225829
tagged with: jcarousel
type: UnansweredQuestion
score: 0

php
tags question: http://stackoverflow.com/q/25206099
tags question: http://stackoverflow.com/q/25221577
tags question: http://stackoverflow.com/q/25077103
tags question: http://stackoverflow.com/q/25128726
tags question: http://stackoverflow.com/q/25121464
tags question: http://stackoverflow.com/q/25227284
tags question: http://stackoverflow.com/q/25128830
tags question: http://stackoverflow.com/q/25187926
tags question: http://stackoverflow.com/q/25102841
tags question: http://stackoverflow.com/q/25187310
tags question: http://stackoverflow.com/q/25124705
tags question: http://stackoverflow.com/q/25153175
tags question: http://stackoverflow.com/q/25155818
tags question: http://stackoverflow.com/q/25221829
tags question: http://stackoverflow.com/q/25219871
tags question: http://stackoverflow.com/q/25124796
tags question: http://stackoverflow.com/q/25223631
tags question: http://stackoverflow.com/q/25122335
tags question: http://stackoverflow.com/q/25207491
tags question: http://stackoverflow.com/q/25145105
tags question: http://stackoverflow.com/q/25197567
tags question: http://stackoverflow.com/q/25189195
tags question: http://stackoverflow.com/q/25079250
tags question: http://stackoverflow.com/q/25078191
tags question: http://stackoverflow.com/q/25086513
tags question: http://stackoverflow.com/q/25092981
tags question: http://stackoverflow.com/q/25145020
tags question: http://stackoverflow.com/q/25139176
tags question: http://stackoverflow.com/q/25210083
tags question: http://stackoverflow.com/q/25154117
tags question: http://stackoverflow.com/q/25096116
tags question: http://stackoverflow.com/q/25130644
tags question: http://stackoverflow.com/q/25217222
tags question: http://stackoverflow.com/q/25093905
tags question: http://stackoverflow.com/q/25119217
tags question: http://stackoverflow.com/q/25103349
tags question: http://stackoverflow.com/q/25133320
tags question: http://stackoverflow.com/q/25172995
tags question: http://stackoverflow.com/q/25106676
tags question: http://stackoverflow.com/q/25201532
tags question: http://stackoverflow.com/q/25129077
tags question: http://stackoverflow.com/q/25123443
tags question: http://stackoverflow.com/q/25145668
tags question: http://stackoverflow.com/q/25173781
tags question: http://stackoverflow.com/q/25141078
tags question: http://stackoverflow.com/q/25097217
tags question: http://stackoverflow.com/q/25177170
tags question: http://stackoverflow.com/q/25084732
tags question: http://stackoverflow.com/q/25106021
tags question: http://stackoverflow.com/q/25097339
tags question: http://stackoverflow.com/q/25122453
tags question: http://stackoverflow.com/q/25108365
tags question: http://stackoverflow.com/q/25156523
tags question: http://stackoverflow.com/q/25120541
tags question: http://stackoverflow.com/q/25204617
tags question: http://stackoverflow.com/q/25226617
tags question: http://stackoverflow.com/q/25107530
tags question: http://stackoverflow.com/q/25106096
tags question: http://stackoverflow.com/q/25194959
tags question: http://stackoverflow.com/q/25107057
tags question: http://stackoverflow.com/q/25201555
tags question: http://stackoverflow.com/q/25163565
tags question: http://stackoverflow.com/q/25193904
tags question: http://stackoverflow.com/q/25094763
tags question: http://stackoverflow.com/q/25215941
tags question: http://stackoverflow.com/q/25103256
tags question: http://stackoverflow.com/q/25167921
tags question: http://stackoverflow.com/q/25112013
tags question: http://stackoverflow.com/q/25170175
tags question: http://stackoverflow.com/q/25155506
tags question: http://stackoverflow.com/q/25174727
tags question: http://stackoverflow.com/q/25101609
tags question: http://stackoverflow.com/q/25122053
tags question: http://stackoverflow.com/q/25135098
tags question: http://stackoverflow.com/q/25211896
tags question: http://stackoverflow.com/q/25072413
tags question: http://stackoverflow.com/q/25189141
tags question: http://stackoverflow.com/q/25104902
tags question: http://stackoverflow.com/q/25119196
tags question: http://stackoverflow.com/q/25119615

http://stackoverflow.com/comment/39029449
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25079840
type: Comment
has text: no errors ,, but i have noted something i manually add a static text as follow:-return $(' ').append( '' + 'statictext!!!!' + item.label + ' ' + . but it was not displayed as part of the autocomplete result, seems there is something preventing my autocomplete from work as defined ,, and only the label is being displayed...

http://stackoverflow.com/q/25122810
accepted answer: http://stackoverflow.com/a/25135567
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39100988
has comment: http://stackoverflow.com/comment/39104679
type: Question
tagged with: javascript
tagged with: ng-grid
has title: ng-grid selectRow is undefined when setting rowTemplate
score: 0
answer count: 1
has body: When I set the rowTemplate on the ngGrid options, all rows selection functions, such as selectRow becomes undefined. This is really strange. For example look here: http://plnkr.co/edit/m4GZftllwZzjYkEvXo3u?p=preview // main.js var app = angular.module('myApp', ['ngGrid']); app.controller('MyCtrl', function($scope) { $scope.myData = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; $scope.gridOptions = { data: 'myData' }; $scope.gridOptions.rowTemplate = 'rowTemplate'; setTimeout(function(){ $scope.gridOptions.selectRow(3, true); },0); }); Selecting a row throws undefined exception. Remove the "rowTemplate" from the ngOptions - and you got this working! Anyone encountered this?
tagged with: angularjs
has answer: http://stackoverflow.com/a/25135567

http://stackoverflow.com/q/25212428
favorite count: 0
has title: Empty variable in a Fiber
tagged with: node.js
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/25212869
possible better answer: http://stackoverflow.com/a/25212532
type: Question
has answer: http://stackoverflow.com/a/25212532
has body: So, I have a fields variable which is correctly initialized. My goal is to use it inside a Fiber. Here is the code : console.log(fields); //&lt;--- Here it's OK Fiber(function () { var qry = Connections.findOne({login:fields[1]}); if (typeof(qry) === 'undefined') { console.log('INSERT'); console.log(fields); //&lt;--- Here, the variable "fields" is empty Connections.insert({ login: fields[1], ip: fields[2], created_at: Date.now(), updated_at: Date.now(), }); } else { console.log("UPDATE"); } }).run(); How can I pass the content of the variable fields into the Fiber? Thanks in advance.
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: meteor
has answer: http://stackoverflow.com/a/25212869

http://stackoverflow.com/comment/39263644
type: QuestionComment
comment on: http://stackoverflow.com/q/25210271
score: 0
has text: `new RegExp(myURL.replace(/\//g,'\\/'), "gi");`
type: Comment

http://stackoverflow.com/a/25227146
accepted answer of: http://stackoverflow.com/q/25226996
answers question: http://stackoverflow.com/q/25226996
type: AcceptedAnswer
has body: This can and should be solved using CSS only, without JavaScript. Example Parent Text Child Text #parent { opacity: .2; transition: .1s opacity; } #parent:hover { opacity: 1; }
type: Answer
score: 0

http://stackoverflow.com/q/25142337
tagged with: javascript
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Dynamically generating components in React-Bootstrap
upvote count: 1
score: 1
tagged with: react-bootstrap
type: Question
tagged with: reactjs
has answer: http://stackoverflow.com/a/25149150
has body: I'm trying to dynamically generate alert components in React-Bootstrap at runtime by instantiating the components from Javascript classes. I'm doing this because there are lots of alerts to show and because Javascript classes are more succinct to create. My attempts to do this are not working. I'm not sure whether the problem generally applies to React or just to React-Bootstrap. However, the error occurs in react.js, which throws the following: TypeError: undefined is not a function The throw occurs in the alert.getComponent() call in the following JSX file: /** @jsx React.DOM */ var Alert = ReactBootstrap.Alert; var AlertDismissible = React.createClass({ getInitialState: function() { return { isVisible: true }; }, render: function() { if(!this.state.isVisible) return null; var message = this.props.message; if(this.props.code !== null) message = message +'(Code '+ this.props.code +')'; return ( {message} ); }, dismissAlert: function() { this.setState({isVisible: false}); } }); function AlertNotice(level, message, code) { this.level = level; this.message = message; this.code = code || null; } AlertNotice.prototype.getComponent = function() { // What should go here? Using React.createClass() doesn't help return ( <AlertDismissible level={this.level} message={this.message} code={this.code} /> ); }; function SuccessAlert(message) { AlertNotice.call(this, 'success', message); } SuccessAlert.prototype = Object.create(AlertNotice); SuccessAlert.prototype.constructor = SuccessAlert; /* ...more kinds of alerts... */ function ErrorAlert(message, code) { AlertNotice.call(this, 'danger', message, code); } ErrorAlert.prototype = Object.create(AlertNotice); ErrorAlert.prototype.constructor = ErrorAlert; var SomethingWithAlerts = React.createClass({ render: function() { var alerts = [ new ErrorAlert("Goof #1", 123), new ErrorAlert("Goof #2", 321) ].map(function(alert) { // react.js throws "TypeError: undefined is not a function" return alert.getComponent(); }); return ( {alerts} …
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/39169069
type: Comment
type: QuestionComment
has text: Android browser does not support drag and drop: http://stackoverflow.com/questions/11670828/html5-drag-and-drop-in-android
score: 0
comment on: http://stackoverflow.com/q/25159850

http://stackoverflow.com/a/25206971
has comment: http://stackoverflow.com/comment/39258085
has comment: http://stackoverflow.com/comment/39258342
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39258154
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39257664
has body: You may try like this: $(document).ready( function() { $('#myId').bind( "contentchange", function(){ alert("Changed"); }); $( "#btn" ).click( function () { $('#myId').html( "Value" ).trigger( "contentchange" ); }); }); JSFIDDLE DEMO
answers question: http://stackoverflow.com/q/25206900
has comment: http://stackoverflow.com/comment/39258189
has comment: http://stackoverflow.com/comment/39257820

http://stackoverflow.com/a/25079068
accepted answer of: http://stackoverflow.com/q/25077170
answers question: http://stackoverflow.com/q/25077170
has comment: http://stackoverflow.com/comment/39019128
has comment: http://stackoverflow.com/comment/39018903
type: Answer
has body: This is weird. I solved the problem by changing the code like this, &lt;% String link; System.out.println("Going inside loop"); for(int i = 0; i &lt; n_row ; i++) { course_name = dbManager.get_course_name(teachers_course_id_list[i]); course_id = teachers_course_id_list[i]; link = "&lt;tr&gt;&lt;td&gt; &lt;a href=\"MarkDistribution1.jsp?course_id_QSParam="+course_id+"\"&gt;"+course_id+": "+course_name+"&lt;/td&gt;&lt;/a&gt;&lt;/tr&gt;"; %&gt; table = '&lt;%=link%&gt;' document.write(table); &lt;% } %&gt; Assigned java variable link inside the java script variable table using single quote. Thanks anyway guys.
type: AcceptedAnswer
score: 0

http://stackoverflow.com/q/25073019
tagged with: java
type: Question
has body: I am reading Detecting Device Type in a web application and just got curious if it would be possible to client to fake the User-Agent when sending the request? Question(s) - user sends request via curl command but fakes it to look as if request is coming from Mobile on the server? is it possible? - Can server detect it? - Can server prevent it? Thanks
tagged with: javascript
score: 0
answer count: 1
has title: Faking User-Agent when sending request to server?
tagged with: curl
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/8515161
tagged with: web-services
tagged with: http
has answer: http://stackoverflow.com/a/25073178

http://stackoverflow.com/q/25077700
has title: Javascript: how to get the value of tag i clicked from other previous page
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25077847
tagged with: http://stackoverflow.com/tag/html
has body: tags are on a table. --HTML-- 1207012097 1207011881 1207011857 What I want to do is view the text value of the clicked < a > tag (example: 1207012097) to the href target page which is "home/nextpage". Can you show me how to do this using JavaScript? TIA
has answer: http://stackoverflow.com/a/25113188
has comment: http://stackoverflow.com/comment/39017558
score: 0
has comment: http://stackoverflow.com/comment/39016448
type: Question
has comment: http://stackoverflow.com/comment/39016501
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/901115
linked to: http://stackoverflow.com/q/298503
tagged with: jquery

http://stackoverflow.com/q/25099636
tagged with: sprockets
tagged with: angularjs
has answer: http://stackoverflow.com/a/25114324
has body: I'm having a difficult time on integrating angularjs to my middleman app. I'm following the phonecatApp tutorial for angularjs and on tutorial 6 about templating and linking images. The output is fine but there's an annoying bug that's displayed on the console. GET http://localhost:4567/images/ 404 (Not Found) Now I read that this problem occurs when putting the angulars expression directly to the src attribute of a image element so it's suggested to put it in ng-src directive, but i'm using a helper on it and it's giving me thsi error. Here's my code: = image_tag nil, "ng-src" =&gt; asset_path(:images, "{{phone.imageUrl}}")
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25114324
has title: Handling assets on angularjs and middleman
answer count: 1
tagged with: middleman
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39112993
has text: or call checkService() again in the timeout function. should work either way.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25129085

http://stackoverflow.com/a/25114503
has body: there was two problems ONE : you need to take off the hide(); from onblur &lt;div class="sug"&gt; &lt;input type="text" id="auto" onkeyup="display(event)" autocomplete="off" /&gt;&lt;!--i changed here to Note the on blur--&gt; &lt;div class="suggestion" id="suggestion"&gt; &lt;/div&gt; &lt;/div&gt; TWO : set the onclick of the div and use hide(); in it &lt;script&gt; var array = new Array(); array.push("heena"); array.push("bhawin"); array.push("aruna"); array.push("mahesh"); array.push("anshul"); array.push("jagruti"); array.push("neha"); array.push("sherry"); array.push("sonali"); var data; var id; function display(e) { if (e.keyCode == 38 || e.keyCode == 40) { selectit(e); } data = ""; id = 0; var state = $('#auto').val(); if (state == "") { $('.suggestion').css({ "display": "none" }); } else { for (var i = 0; i &lt; array.length; i++) { var key = 0; for (j = 0; j &lt; state.length; j++) { if (array[i][j] == state[j]) { key++; } } if (key == state.length) { var bolde = ""; for (var k = 0; k &lt; key; k++) { bolde += "" + array[i][k] + ""; } for (var l = key; l &lt; array[i].length; l++) { bolde += array[i][l]; } id++; data += '&lt;div id="' + id + '" onclick="$(\'#auto\').val(this.innerHTML);hide();" &gt;' + bolde + "&lt;/div&gt;";// i changed here note the on click } } $('.suggestion').html(data); $('.suggestion').css({ "display": "block" }); selectit(e); if (data == "") { $('.suggestion').css({ "display": "none" }); } } } function hide() { $('#suggestion').css({ "display" : "none" }); ; } function selectit(e) { var child = document.getElementById("suggestion").childNodes; for (var i = 0; i &lt; child.length; i++) { if (child[i].id == "1") { child[i].style.color = "red"; } } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39086460
has comment: http://stackoverflow.com/comment/39086680
score: 0
has comment: http://stackoverflow.com/comment/39086419
has comment: http://stackoverflow.com/comment/39085816
answers question: http://stackoverflow.com/q/25113801
type: Answer

http://stackoverflow.com/q/25197693
has body: I want to change the content of Iframe. but when I use document.open in Iframe then my main page get scroll down bottom automatically. d.idoc.open('text/html', 'replace'); d.idoc.write(text); d.idoc.close() This issue is reproducible in safari and chrome mostly.
has answer: http://stackoverflow.com/a/29625372
type: UnansweredQuestion
tagged with: iframe
linked to: http://stackoverflow.com/q/3076414
downvote count: 0
score: 1
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has title: document.open() statement scroll the page automatically
favorite count: 0

http://stackoverflow.com/comment/39269311
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25192762
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58995/discussion-between-dudewad-and-mitchyl).
type: AnswerComment

http://stackoverflow.com/comment/39174008
has text: Joe, for me it's clear how to work with a pre-built menu but it's not clear how to work starting from a menu that has only a menu bar. In my bean I need to reference the menu bar by a variable bound to the UI component: the problem seems to be that bindings between variables in the bean and UI components are accessible only after the page is loaded. I don't know if the use of @PostConstruct could workaround this "limit"...
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25161763
type: AnswerComment

http://stackoverflow.com/comment/39103429
has text: mean it popover should be same ..but it show on star button click..how er can show that
comment on: http://stackoverflow.com/a/25124047
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39159296
comment on: http://stackoverflow.com/a/25154293
has text: Let me check. Thanks for the guidance
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25173432
has body: Sure, just overwrite it Test Content FIDDLE
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25173336
accepted answer of: http://stackoverflow.com/q/25173336
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/39258589
type: AnswerComment
type: Comment
has text: Hi, thanks for the reply. Its not the routing I'm having problems with. its more of a question of organising my data for each page to use. e.g Using json or storing the data in an sqllite database. Thanks
comment on: http://stackoverflow.com/a/25207244
score: 0

http://stackoverflow.com/q/25092929
has comment: http://stackoverflow.com/comment/39057895
has title: Ember js check for key value in array of objects
has answer: http://stackoverflow.com/a/25093186
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39045417
has comment: http://stackoverflow.com/comment/39045392
tagged with: foreach
has comment: http://stackoverflow.com/comment/39045310
has comment: http://stackoverflow.com/comment/39045429
type: Question
answer count: 2
has body: I have an users array which consists of 4 user objects. users: [ { id: 1, user_id: 10116, email: "xx.xx@gmail.com", password: "xx.xx@gmail.com" }, { id: 2, user_id: 10117, email: "yy@gmail.com", password: "yy@gmail.com" }, { id: 4, user_id: 10126, email: "bangalore@aurus.com", password: "bangalore@aurus.com" } ] var myEmail = "xx.xx@gmail.com"; var myPassword = "xx.xx@gmail.com"; What is the shortest way to check wether a particular myEmail &amp; myPassword exists/matches in the given users array. Is there any Ember way of doing this ? I have tried using the forEach loop and trying to check for values. I am looking for an optimal soluton. Thx
tagged with: javascript
favorite count: 0
score: 0
has answer: http://stackoverflow.com/a/25099747

http://stackoverflow.com/q/25195229
tagged with: jquery
has body: Edit: This question is already different from the one that was voted duplicate, How to remove the arrow from a select element in Firefox. That question was referenced in the question from the start - before trying to get your daily limit of close votes, please read the question. I'm using the HtmlService of Google Apps Script to display an HTML form, including jQuery and javascript. Using the recommended stylesheet for Google Doc add-ons, this is how a select box appears in Chrome: Here's the same thing, in Firefox. Note the extra superimposed arrow. How can I get rid of that overlay in Firefox? I've tried the techniques described in How to remove the arrow from a select element in Firefox, but the accepted and highest voted answers stopped working in more recent versions of FF, and didn't work for me. Other solutions involving overflowing the select and hiding the overflow with an enclosing div are interesting, but since they also eliminate the desired "up/down" arrows, they aren't acceptable for this application. HTML Select an option: CSS
has comment: http://stackoverflow.com/comment/39264258
has comment: http://stackoverflow.com/comment/47185804
has answer: http://stackoverflow.com/a/29504346
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/29516494
has comment: http://stackoverflow.com/comment/47188264
has comment: http://stackoverflow.com/comment/47187114
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/47185716
has comment: http://stackoverflow.com/comment/39262940
has title: HtmlService - Suppress Firefox arrow in select element
has comment: http://stackoverflow.com/comment/47167169
tagged with: css
has answer: http://stackoverflow.com/a/29515909
score: 2
type: AnsweredQuestion
type: Question
tagged with: google-apps-script
possible better answer: http://stackoverflow.com/a/29504346
linked to: http://stackoverflow.com/q/5912791
accepted answer: http://stackoverflow.com/a/29516494
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39284420
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25216933
has text: Also I don't really use php so how would I go about implementing what you gave me? @JulienGarcia
type: AnswerComment

http://stackoverflow.com/comment/39088197
comment on: http://stackoverflow.com/q/25115346
score: 0
has text: @AndreiMikhalevich It's like movie1,movie2,movie3 .... movie(N) *(N) tends to number of videos dependent count available in BaseDirectory. Will iteration work or generate number and concatenate with video source?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27647548
downvote count: 0
has body: Take a look at this lesser known method: The Polymer element You can define the styles in an html import file: :host { backgound-color: steelblue; } And then you can use them in more than 1 element: In this well written article you can read more about how to use the technique. However, a disadvantage I can think of is the impossibility of using SASS with this technique, since the styles are defined inside a tag and not inside a element, and there isn't a clear way to import an external stylesheet.
score: 3
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/25211111

http://stackoverflow.com/comment/40784024
type: Comment
has text: Amazing ! That solved my problem... For other people, I should mention that I used puPHPet to create my virtualbox, I defined a different IP for my machine (192.168.100.100) ... So http://localhost:35729/livereload.js doesn't work, but ttp://192.168.100.100:35729/livereload.js does
type: AnswerComment
comment on: http://stackoverflow.com/a/26025076
score: 0

http://stackoverflow.com/q/25222397
score: 5
linked to: http://stackoverflow.com/q/4998908
accepted answer: http://stackoverflow.com/a/25223731
type: AnsweredQuestion
has title: Saving High-resolution HTML5 Canvas Image
tagged with: webgl
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/39286428
has body: I'm making a Perspective Correction Image Filter in HTML5. The algorithm is ready and working fine. But I have issues exporting the image. I use for perspective correction an WebGL Context with Three.js, so I can do things fast on GPU (it actually works VERY fast, doing a 3680x2760 image render in less than half second). So I have two things: A low-res viewport (720x480) that user uses to configure and preview, and a high-res background viewport (the size of the image, just created temporary to render the image and them destroyed, all done inside a RenderHighRes function). But my Google Chrome is crashing when opening the image, probably because the size and the source format. For exporting the image I'm using this code: console.log("Rendering"); vcomposer.render(); console.log("Rendered! Exporting"); var URL = vcomposer.renderer.domElement.toDataURL("image/jpeg"); console.log("Exported! Opening"); window.open(URL); I can get fine to "Exported! Opening" regardless image size. But for bigger images (like 3680x2760 ) the browser crashes when opening URL. I think its because it gets BIG url for a image like that. So the thing is, I dont need to open the image, just make the user download it. How can I do that without getting dataURL to user download? PS: If I remove the window.open line, it doesnt crash anything, so the render is working fine. Also with half resolution of the mentioned image, it works fine, so its just a size issue. I hope I got clear ^^ Thanks! Lucas
upvote count: 5
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25223731
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/q/25135535
linked to: http://stackoverflow.com/q/18333679
tagged with: php
has answer: http://stackoverflow.com/a/25205469
has comment: http://stackoverflow.com/comment/39125567
type: AnsweredQuestion
has body: I'm working on google maps API v3 (with php and mysql) and I'm searching for a solution to open an infowindow from a link. Explanation: I create a google maps with some marker (customer) and I create a list in an another loop directly from my database and I wish to have the possibility to click on the name of my customer to open the infowindow on map. Thanks to @MrUpsidown I found this code and adapt it, but it doesn't work. customer page: &lt;div&gt; &lt;? include('phpsqlajax_map_v5.php');?&gt; &lt;/div&gt; &lt;div&gt; &lt;? $reponseENT = $bdd-&gt;query(' SELECT * FROM client WHERE adresse !="" AND archive = "FAUX" '); while($repE = $reponseENT-&gt;fetchObject()) { ?&gt; &lt;p&gt;&lt;a&gt;&lt;? echo $repE-&gt;Nom." ".$repE-&gt;departement;?&gt;&lt;/a&gt;&lt;/p&gt; &lt;? } ?&gt; &lt;/div&gt; Here myphpsqlajax_map_v5.php (customized name for test) &lt;script type="text/javascript"&gt; //&lt;![CDATA[ var markers = []; function load() { var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(46.70, 2.00), zoom: 6, mapTypeId: 'roadmap' }); var marker, i; var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP file downloadUrl("gen_map_xml2.php",function(data){ var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i &lt; markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var nument = markers[i].getAttribute("nument"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "&lt;b&gt;&lt;a href='reporting_client.php?client=" + nument + "'&gt;" + name +"&lt;/a&gt;&lt;/b&gt;&lt;br/&gt;" + address; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon }); bindInfoWindow(marker, map, infoWindow, h…
has title: Google Maps V3 API link to infowindow
type: Question
tagged with: google-maps
accepted answer: http://stackoverflow.com/a/25205469
tagged with: javascript
has comment: http://stackoverflow.com/comment/39125360
tagged with: google-maps-api-3
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39177977

http://stackoverflow.com/q/25114299
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/39084912
tagged with: javascript
has body: My index page has an error that i dont understand, also one of my pages has gone from 10 errors to 41 and i have no idea why. This is due in for the 11th of August and i really have to pass could anyone help? Here is the code i am using for my index page. It coming up with this error: end tag for "style" omitted, but OMITTAG NO was specified even though the head tag is clearly in the right place. Tunisia Tunisia Things to See Famous People Tunisia is the northernmost country in Africa and, at almost 165,000 square kilometres (64,000 sq mi) in area, the smallest country in the Maghreb region of North Africa. It is bordered by Algeria to the west, Libya to the southeast and the Mediterranean Sea to the north and east. As of 2013, its population is estimated at just under 10.8 million. To find out more information about the beautiful country of Tunisia Visit: ComeToTunisia.com
upvote count: 0
answer count: 1
linked to: http://stackoverflow.com/q/70579
favorite count: 0
type: UnansweredQuestion
score: -3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25114422
tagged with: css
has title: Require assistance with problems in my stylesheet and other issues

http://stackoverflow.com/q/25163379
favorite count: 0
type: Question
has title: Does javascript use some sort of implicit "noop" call?
has comment: http://stackoverflow.com/comment/39176732
has answer: http://stackoverflow.com/a/25163819
upvote count: 2
has comment: http://stackoverflow.com/comment/39176783
has body: This is probably JS 101 but... Can someone with a better understanding of JS engines explain to me why string literals, integers and so forth are 'ignored' by JS or treated as otherwise valid code? JS Hint does give 'unexpected expression' reports however the code remains valid and runs. I've created the following pen to, hopefully, explain what I mean here. http://codepen.io/billythekid/pen/zyGbi/ var span = document.getElementsByTagName('SPAN')[0]; // let's show what I'm trying to say here by way of an expanded example. function foo() { var bar = "something"; } foo(); // does nothing useful, but returns nothing either - valid and understandable; function baz() { return "nothing"; // a string } function zoo() { return 250; // an integer } var a = baz(); // the variable holds the return value. The function is evaluated and the return value is assigned to the variable. span.innerHTML += a+"&lt;br&gt;"; baz(); // produces no error despite the function returning a value. Why doesn't the JS engine see this as the evaluated string "something" and try to run the string as a JS command? span.innerHTML += "this code has run, so the JS didn't break above. Why wasn't the returned string parsed and invalid?&lt;br&gt;"; "something"; // the string literal span.innerHTML += "this code has run, so the JS didn't break above. So why not? How is a string literal valid JS? Why no errors?&lt;br&gt;"; var b = zoo(); span.innerHTML += b+"&lt;br&gt;"; zoo();// produces no error despite the function returning a value. Why doesn't the JS engine see this as the evaluated integer 250 and try to run the string as a JS command? span.innerHTML += "this code has run, so the JS didn't break above. So why not? How is an evaluated integer valid JS? Why no errors?&lt;br&gt;"; 250; // the integer literal span.innerHTML += "this code has run, so the JS didn't break above. So why not? How is an integer literal valid JS? Why no errors?&lt;br&gt;"; eval(250); // the integer literal span.innerHTML += "this…
has comment: http://stackoverflow.com/comment/39176213
answer count: 1
has comment: http://stackoverflow.com/comment/39176612
tagged with: computer-science
has comment: http://stackoverflow.com/comment/39176251
has comment: http://stackoverflow.com/comment/39176461
has comment: http://stackoverflow.com/comment/39177133
accepted answer: http://stackoverflow.com/a/25163819
has comment: http://stackoverflow.com/comment/39176534
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39176651
downvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25176655
type: Answer
answers question: http://stackoverflow.com/q/25176473
has body: You have to decide what type of content you are receiving from the outside, and handle it appropriately before sending it to any browser. If you consider it's text, then: if it's output as part of text within the HTML, you should appropriately escape at least &lt; and &amp; by replacing everything that is necessary with the correct HTML entities if it's output as part of an attribute within the HTML, the same applies plus at least " and '. If you consider it's HTML, that you need to select which elements you accept (for instance &lt;b&gt;, &lt;i&gt;, etc.), and filter out anything else. How you do it depends on the language/framework you are using.
score: 0

http://stackoverflow.com/comment/39223404
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25188375
has text: The `.*?` in the first part is to make the selection non-greedy so it stops after it hits the first digit. If you leave that out and have, for example 3 digits, it will change the second rather than the first.

http://stackoverflow.com/comment/39254872
comment on: http://stackoverflow.com/a/25205606
type: AnswerComment
score: 0
type: Comment
has text: @j08691 ohhhhh sorry about that, but I didn't know typo goes to off-topic.

http://stackoverflow.com/comment/39125564
score: 0
comment on: http://stackoverflow.com/q/25130565
type: Comment
type: QuestionComment
has text: I do want a two-way binding. This is what I am aiming to have. The issue is that have this: jQueryPlugin update => Callback => $setViewValue => $watch. I do not what the $watch to be called in that case (the $setViewValue'd have already performed the binding). But I need it to be called in this scenario: Scope (model) update => watch => jQueryPlugin update.

http://stackoverflow.com/comment/39185798
score: 0
has text: About the feedback look at this [example](https://github.com/google/google-apps-script-samples/tree/master/cursor_inspector)
comment on: http://stackoverflow.com/q/25168185
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39094792
type: Comment
type: QuestionComment
has text: When you press 'no' on for example the first answer after you filled in all the answers with 'yes', I would like the questionnaire to jump back to the first question and remove the later answers.
comment on: http://stackoverflow.com/q/25119381
score: 0

http://stackoverflow.com/comment/39146505
type: AnswerComment
comment on: http://stackoverflow.com/a/25146898
type: Comment
has text: So what doesn't work now? I can't make your jsfiddle work, TWEEN is undefined, so I'm only guessing, what can be wrong.
score: 0

http://stackoverflow.com/comment/39110655
score: 0
type: Comment
type: QuestionComment
has text: Perhaps you should use semicolons instead of colons? this.foo = data; and so on?
comment on: http://stackoverflow.com/q/25127224

http://stackoverflow.com/comment/39142663
has text: This reminds me of short-circuiting.
score: 1
comment on: http://stackoverflow.com/q/25145242
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39050529
has text: I'm not sure what you mean, but the problem is that a value of the `currentIndex` at the time a request is made and in the success callback are different, right?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25095606
score: 0

http://stackoverflow.com/comment/39053580
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25086937
has text: Yes, your answer is true but as you said every list item have the same link text. I don't want same link text. I want to create bundle dynamically, I guess it is not possible for now.

http://stackoverflow.com/comment/39070694
type: QuestionComment
comment on: http://stackoverflow.com/q/25106713
type: Comment
score: 2
has text: This is rather common, browsers often load the last page from cache, and it's usually not an issue

http://stackoverflow.com/a/27077364
score: 2
accepted answer of: http://stackoverflow.com/q/25149267
upvote count: 2
has body: I just verified this to work for the click event: listen :: JSType event =&gt; Elem -&gt; event -&gt; a -&gt; IO Bool listen e event f= jsSetCB e (toJSString event) (mkCallback $! f) Called with listen element "click" doit and doit of type: doit :: Int -&gt; (Int,Int) -&gt; IO () using the perch library: doit i (x,y) = do body &lt;- getBody (flip build) body $ do p i p (x,y) return() listen is unsafe. You must make sure that the event handler have the right types of parameters. The types for the known events are the ones of the used in onEvent
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25149267

http://stackoverflow.com/comment/39186761
score: 0
comment on: http://stackoverflow.com/q/25168735
type: Comment
type: QuestionComment
has text: @user3256132 confused. From what I read you want to click the image, then for details to appear, correct?

audio
tags question: http://stackoverflow.com/q/25157513
tags question: http://stackoverflow.com/q/25096657
tags question: http://stackoverflow.com/q/25147118
type: Tag
tag name: audio
tags question: http://stackoverflow.com/q/25161284
tags question: http://stackoverflow.com/q/25212484
tags question: http://stackoverflow.com/q/25210341
tags question: http://stackoverflow.com/q/25095173
tags question: http://stackoverflow.com/q/25212132
tags question: http://stackoverflow.com/q/25080451
tags question: http://stackoverflow.com/q/25195168
tags question: http://stackoverflow.com/q/25158040

http://stackoverflow.com/comment/39285470
has text: Is this related with the "Caveats of the load event when used with images" described on this jQuery page? http://api.jquery.com/load-event/
comment on: http://stackoverflow.com/a/25221821
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39396401
type: QuestionComment
comment on: http://stackoverflow.com/q/25139600
has text: Yes, or a very fast diashow. I have a bunch of images and absolutely no control to change the format. (It's a set of jpeg images from a surveillance camera and the vendor doesn't implement any ordinary video format.) Thanks for the link, but that didn't work for me. I'm pre-buffering all images and only allow to start the play process after each Image.complete is true. Since the video is only flawed in Firefox, I believe it could be a problem with the DOM and rendering.. I found a similar project, which has the same problem with the Firefox browser: http://vagnervjs.github.io/frame-player/
score: 0
type: Comment

http://stackoverflow.com/comment/39190585
comment on: http://stackoverflow.com/q/25170659
score: 1
type: Comment
type: QuestionComment
has text: When you append it directly to innerHTML it is trying to actually add it to the DOM right away. So, when you first call it - you're appending " " without a closing tag. The browser is forgiving, so it closes the table for you. The next time you call innerHTML, you're trying to add tr's and td's - but at this point your table is already closed, and because the browser is forgiving and sees you putting tr's and td's outside of a table - it strips the markup. Finally, you go to close the table (but its already been closed) and so the browser just ignores it.

http://stackoverflow.com/comment/39081279
comment on: http://stackoverflow.com/q/25112200
score: 0
type: Comment
type: QuestionComment
has text: Is your host system's firewall blocking it?

http://stackoverflow.com/comment/39146729
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25146940
has text: I will edit this post shortly with the updates you need.

http://stackoverflow.com/comment/39069646
has text: @user3364905 Ok I have updated my answer and I hope it fixes the issues you had. Let me know what you think.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25096085

http://stackoverflow.com/q/25214528
linked to: http://stackoverflow.com/q/16214300
tagged with: cordova-plugins
has comment: http://stackoverflow.com/comment/39276178
has body: I am using this phonegap plugin called Screenshot and I am willing to upload the base64 encoded image to facebook. Unfortunately, I get an error from facebook saying that the available formats are only JPG, PNG, GIF and TIFF. So I either have to find a way to change the java code of the plugin (I have never used java before) or come up with a javascript function in my application which converts it, although I don't really know if that is possible/worth it. Here is the java code of the screenshot plugin which encodes the image: else if (action.equals("getScreenshotAsURI")) { final Integer quality = (Integer) args.get(0); super.cordova.getActivity().runOnUiThread(new Runnable() {@Override public void run() { View view = webView.getRootView(); try { view.setDrawingCacheEnabled(true); Bitmap bitmap = Bitmap.createBitmap(view.getDrawingCache()); view.setDrawingCacheEnabled(false); ByteArrayOutputStream jpeg_data = new ByteArrayOutputStream(); if (bitmap.compress(CompressFormat.JPEG, quality, jpeg_data)) { byte[] code = jpeg_data.toByteArray(); byte[] output = Base64.encode(code, Base64.NO_WRAP); String js_out = new String(output); js_out = "data:image/jpeg;base64," + js_out; JSONObject jsonRes = new JSONObject(); jsonRes.put("URI", js_out); PluginResult result = new PluginResult(PluginResult.Status.OK, jsonRes); callbackContext.sendPluginResult(result); js_out = null; output = null; code = null; } jpeg_data = null; } catch (JSONException e) { callbackContext.error(e.getMessage()); } catch (Exception e) { callbackContext.error(e.getMessage()); } } }); return true; } The entire code of the plugin can be found on the github repository in the beginning of my question. I tried changing CompressForma.JPEG to CompressForma.JPG, but had no luck ;(
score: 0
has comment: http://stackoverflow.com/comment/39272219
tagged with: java
tagged with: base64
type: UnansweredQuestion
tagged with: image
has title: Convert base64 encode jpeg image to base64 encoded jpg/png/gif/tiff image?
answer count: 0
tagged with: javascript
type: Question

http://stackoverflow.com/q/25071275
answer count: 3
linked to: http://stackoverflow.com/q/19836090
downvote count: 0
possible better answer: http://stackoverflow.com/a/26647114
favorite count: 0
has answer: http://stackoverflow.com/a/26647114
has comment: http://stackoverflow.com/comment/39025221
has comment: http://stackoverflow.com/comment/39025150
has comment: http://stackoverflow.com/comment/39022350
has answer: http://stackoverflow.com/a/25680681
type: AnsweredQuestion
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39005049
has comment: http://stackoverflow.com/comment/39024138
has comment: http://stackoverflow.com/comment/39005018
has body: Whenever I run my mean.io app, I can see all my functions in the aggregated.js. Is there a way to do plain and simple browser debbuging? This question is for front-end debugging... but it would be great to know how to do backend debugging also.
type: Question
tagged with: mean.io
accepted answer: http://stackoverflow.com/a/25680681
tagged with: javascript
has title: How to debug in a mean.io app?
has answer: http://stackoverflow.com/a/26774461
has comment: http://stackoverflow.com/comment/39004913

http://stackoverflow.com/q/25106247
upvote count: 3
has comment: http://stackoverflow.com/comment/39070110
type: Question
has body: I'm building a tool to join multiple streams by the nearest timestamp. The streams may not be in sync so I store the last n (probably >=500) items in a fixed size circular buffer. I'd like to use a sortedIndex (not search) to find where an item would be place in the buffer. I need this index to find the stream item just before and just after the time stamp. The handling of edge cases of around the corner issues isn't important, I don't care if you return an index outside the array or 0 for the largest value. I was playing around with implementing this last night and couldn't figure out a working implementation. Function contract is below and is based on _.sortedIndex (implementation) /** * Binary search for finding the closest computed (by iterator) value * in some sorted circular array * * @param {Array} array a circular array-like * @param {Object} value to search for an index * @param {Function} iterator to compute the compare value of an item */ function sortedIndex(array, value, iterator) { var low = 0, high = array.length; while (low != high &amp;&amp; iterator(array[low]) &gt; iterator(array[high])) { // The binary search I failed to implement } return low; } Some test cases (again feel free to handle the around a corner cases differently): http://jsbin.com/yusilaba/1/edit function identity(x) { return x; } function property(prop) { return function(x) { return x[prop]; }; } test('sortedIndex should work on simple case', function(t) { var array = [1, 2, 3, 4]; equal(sortedIndex(array, 2, identity), 1, 'equal case sorts towards left'); equal(sortedIndex(array, 2.5, identity), 2); equal(sortedIndex(array, 10, identity), 0); equal(sortedIndex(array, -10, identity), 3); array = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; equal(sortedIndex(array, {a: 2}, property('a')), 1); equal(sortedIndex(array, {a: 2.5}, property('a')), 2); equal(sortedIndex(array, {a: 10}, property('a')), 0); equal(sortedIndex(array, {a: -10}, property('a')), 3); }); test('sortedIndex should work on cir…
answer count: 2
linked to: http://stackoverflow.com/q/18618136
tagged with: javascript
has title: Circular binary index
has comment: http://stackoverflow.com/comment/39070193
score: 3
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39070522
type: UnansweredQuestion
tagged with: node.js
has answer: http://stackoverflow.com/a/25106854
has answer: http://stackoverflow.com/a/25106781

http://stackoverflow.com/comment/39043218
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25080174
has text: @SHT, sorry , forget adout it, just use second approach

http://stackoverflow.com/q/25221872
score: 0
has title: Remove background image at certain width
has comment: http://stackoverflow.com/comment/39286633
answer count: 1
has comment: http://stackoverflow.com/comment/39285621
type: UnansweredQuestion
has body: I'm trying to have my background image change every time the page loads. That function works fine, but I also want to have the background image set to none when screen width is less than 640px for the mobile users. I tried using the screen.width and screen.availWidth, but both did nothing. My background image stays no matter what the screen size is. function changeImg(imgNumber) { var myImages = ["images/bg_images/audi_tt.jpg", "images/bg_images/watercooled.jpg", "images/bg_images/aircooled.jpg"]; var imgShown = document.body.style.backgroundImage; var newImgNumber =Math.floor(Math.random()*myImages.length); var windowWidth = window.screen.availWidth; if (windowWidth &lt;= 640) { document.body.style.backgroundImage = 'none'; } else if (windowWidth &gt; 640) { document.body.style.backgroundImage = 'url('+myImages[newImgNumber]+')'; } } window.onload=changeImg;
tagged with: css
has comment: http://stackoverflow.com/comment/39285672
type: Question
has answer: http://stackoverflow.com/a/25221926
tagged with: javascript
has comment: http://stackoverflow.com/comment/39285476
tagged with: jquery

http://stackoverflow.com/q/25171979
tagged with: angular-ui
tagged with: angularjs
type: UnansweredQuestion
has body: It seems the datepicker uses localized time but I need it to use UTC times when I make calls to the backend. I get around this issue by adjusting the value before posting it to the server using the following function: function adjustDateForTimeOffset(dateToAdjust) { var offsetMs = dateToAdjust.getTimezoneOffset() * 60000; return new Date(dateToAdjust.getTime() - offsetMs); } or simply by wrangling my date in a service. However, I also have some defaults that I want to use on load in my application and I need these dates to be in UTC and be displayed in the datepicker input box. However when I do this, the date is always a day before in the input box because ui-date uses local time. Is there a way to modify ui-date to run on UTC time all the time instead of local time? I've searched around the internet for an answer to this question but just keep finding ways to modify the date-ui but just keep finding ways to change the date before sending it to the server but that doesn't solve my problem.
tagged with: angularjs-directive
type: Question
answer count: 1
tagged with: javascript
has title: Making AngularUI UI-Date datepicker use UTC time
has answer: http://stackoverflow.com/a/25173652
score: 0
tagged with: datepicker

http://stackoverflow.com/comment/39091063
has text: That's a comment, not an answer. Besides: that won't solve the issue... I suspect this isn't even the cause of it
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25117517

http://stackoverflow.com/a/25092149
has comment: http://stackoverflow.com/comment/39043920
answers question: http://stackoverflow.com/q/25092115
type: Answer
accepted answer of: http://stackoverflow.com/q/25092115
score: 1
has comment: http://stackoverflow.com/comment/39044203
upvote count: 1
has comment: http://stackoverflow.com/comment/39044099
has comment: http://stackoverflow.com/comment/39044088
has comment: http://stackoverflow.com/comment/39044178
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39044112
downvote count: 0
has body: You could keep a list of added ids: var addedIds = {}; if(par != $scope.shipper_ref_no){ if (!addedIds[$scope.shipper_ref_no]) { addedIds[$scope.shipper_ref_no] = true; $scope.excludeds.push($scope.shipper_ref_no); } }
has comment: http://stackoverflow.com/comment/39044166

http://stackoverflow.com/comment/39085265
has text: (T.J.Crowder) How can I display the Stored Values in the Array of objects in an another function?
type: Comment
comment on: http://stackoverflow.com/a/25114142
score: 0
type: AnswerComment

http://stackoverflow.com/q/25144476
type: Question
score: 0
answer count: 2
tagged with: javascript
has title: Create now/subtract dates/month with format of "2014-08-04T17:19:00-07:00" in JavaScript
tagged with: date-format
tagged with: datetime
has answer: http://stackoverflow.com/a/25144690
tagged with: momentjs
has answer: http://stackoverflow.com/a/25144672
type: UnansweredQuestion
has body: How do I create the time now and format it to a string with format of "2014-08-04T17:19:00-07:00"? Using moment.js or any other JavaScript? I will also need to create 2 new, one to subtract a week from now, one to subtract a month from now, but also with this format.

http://stackoverflow.com/comment/69586493
type: Comment
comment on: http://stackoverflow.com/q/25120112
score: 0
type: QuestionComment
has text: http://javascriptisnotjava.io

http://stackoverflow.com/q/25145187
has comment: http://stackoverflow.com/comment/39142495
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39142420
has answer: http://stackoverflow.com/a/25145240
tagged with: coffeescript
has body: I'm having a for with a textarea and I want to use jQuery to get the content of a text area. Therefore I've written following coffeescript function submitPost: (e) -> e.preventDefault() form = $('.js-new-post-form') field = form.find(".js-post-text") alert(field.val()) This successfully finds the textarea. Evaluating field in the js console returns ​ ​ However, field.val() always returns "", although there is content in the textarea. What's the error in my code?
downvote count: 1
type: Question
has title: Get value of textarea fails
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/25145617
has comment: http://stackoverflow.com/comment/39142541
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39256853
type: Comment
has text: Thanks @BootstrapThemer - I'll give this a try and get back here (probably after my weekend). Thanks again!
type: AnswerComment
comment on: http://stackoverflow.com/a/25205127
score: 0

http://stackoverflow.com/q/25108648
upvote count: 0
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25109321
answer count: 3
has body: I'm fetching the data from my database through 'fetching' datatype, 'Features' is a row, element in the 'Features' row has Multiline data. eg: Simultaneous HD video and image recording, geo-tagging, touch focus. face and smile detection. image stabilization, HDR. php function mf(){ while($row = mysqli_fetch_array($fetching)){ echo $row['Features']; } } Javascript document.getElementById("idname").innerHTML = "&lt;?php mf(); ?&gt;"; Html &lt;div id="idname"&gt; &lt;/div&gt; Here mf function has Features row element shown in example. When I try to execute, no output in webpage, If I remove new line and write whole element in a single line it works, if it is multiline, then data is not showing up in webpage. Please help me!
favorite count: 0
has title: How to print multiline in document.getElementById("idname").innerHTML
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has answer: http://stackoverflow.com/a/25108724
has answer: http://stackoverflow.com/a/25108763
linked to: http://stackoverflow.com/q/784539
downvote count: 1
type: Question

http://stackoverflow.com/q/25151924
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25153172
has title: How to display sum result on each line of Fibonacci Series using Javascript?
has comment: http://stackoverflow.com/comment/39155582
accepted answer: http://stackoverflow.com/a/25153172
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/25151943
tagged with: fibonacci
has body: I'm doing a fibonacci series using javascript. I've tried to show the result(var3) of var1 + var2 like the one on my code, but it seems that the answer on each line is not correct. Look at the output: and this is what I want to show: I've tried a lot of tricks, but still the result is incorrect. Here's my code on Javascript: function fib() { var var1 = -1; var var2 = 1; var var3; var var4 = 0; var num = prompt("Enter the limit to generate fibonacci no", 0); for (var i = 1; i &lt;= num; i++) { var3 = var1 + var2; var1 = var2; var2 = var3; var4 += var3; document.write(var3 + "---------------&gt; "); document.write(var1 + "+" + var2 + "&lt;br/&gt;"); } document.write("&lt;br/&gt;" + var4); } on HTML: &lt;input type="submit" value="fib" onclick="fib()"/&gt;
has answer: http://stackoverflow.com/a/25151943
tagged with: javascript

http://stackoverflow.com/comment/39300697
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25218338
has text: The problem with your current code is that you're not using the `Math.random` method.
type: AnswerComment

http://stackoverflow.com/a/25240006
type: Answer
answers question: http://stackoverflow.com/q/25219979
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25219979
has body: Solved! JSFiddle function toggle(it) { if ((it.className == "") || (it.className == "rowactive")) { it.className = "rownotactive"; } else { it.className = "rowactive"; } } $(document).ready(function filter() { $('table.detail').each(function () { var $table = $(this); $table.find('.parent').click(function () { $(this).toggleClass('rowactive'); $(this).nextUntil('.parent').toggle(); }); /// Below is toggle on image var $childRows = $table.find('tbody tr').not('.parent').hide(); $("img.pushme").toggle(function funcVis() { $("tr.parent").addClass('rowactive'); $childRows.show(); }, function () { $("tr.parent").removeClass('rowactive'); $childRows.hide(); }); shortcut.add("Alt+N", function () { expandform() }); /// Shortcut functions }); });

http://stackoverflow.com/q/25220621
has answer: http://stackoverflow.com/a/43693707
type: Question
has body: I want to localize a meteor app by detecting browser language, and also a change language option on homepage. To do this, I thought I detect the browser language and set a session value e.g. "current_lang" : "en-US", and have some helper methods that read the texts according to the locale this session value contains. So I would have e.g. a JS object on the client called "Resources" that contains some arrays e.g. "en-US" : [res1key: res1value, res2key: res2Value] and a helper method to retrieve them by key. My question is: is this a good approach to localize a meteor app, or does meteor already have something like this that is done "under-the-hood"?, e.g. I'm sure they thought about localization so far but I just can't find anything in the docs referring to it. Thanks.
accepted answer: http://stackoverflow.com/a/25774175
tagged with: javascript
has answer: http://stackoverflow.com/a/25220674
answer count: 3
downvote count: 0
possible better answer: http://stackoverflow.com/a/25220674
tagged with: meteor
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/25774175
has title: Localizing a Meteor app
type: AnsweredQuestion
score: 1
tagged with: localization

http://stackoverflow.com/q/25095789
has answer: http://stackoverflow.com/a/25095796
favorite count: 0
score: 40
answer count: 5
possible better answer: http://stackoverflow.com/a/42388911
type: AnsweredQuestion
has body: How do i return an object key name only if the value of it is true? I'm using underscore and the only thing i see is how to return keys which is easy, i want to avoid redundant iterations as much as possible: example: Object {1001: true, 1002: false} I want an array with only 1001 in it...
has answer: http://stackoverflow.com/a/42388911
has answer: http://stackoverflow.com/a/25096346
accepted answer: http://stackoverflow.com/a/25095796
tagged with: underscore.js
type: Question
upvote count: 40
tagged with: object
has answer: http://stackoverflow.com/a/67300754
tagged with: javascript
has title: Return an object key only if value is true
has answer: http://stackoverflow.com/a/65603524
downvote count: 0

http://stackoverflow.com/q/25108936
tagged with: xmlhttprequest
tagged with: getjson
has answer: http://stackoverflow.com/a/25109785
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25109785
downvote count: 0
tagged with: javascript
has title: How do I scale multiple images in javascript?
answer count: 1
has body: I have this method that grabs an image before it's saved to a parse.com database and scales it down. Take a look at the code: var Image = require("parse-image"); // module Parse.Cloud.beforeSave("Garments", function(request, response) { Parse.Cloud.httpRequest({ url: request.object.get("image").url() }).then(function(response) { var image = new Image(); return image.setData(response.buffer); }).then(function(image) { // Resize the image. return image.scale({ width: 300, height: 450 }); }).then(function(image) { // Make sure it's a JPEG to save disk space and bandwidth. return image.setFormat("JPEG"); }).then(function(image) { // Get the image data in a Buffer. return image.data(); }).then(function(buffer) { // Save the image into a new file. var base64 = buffer.toString("base64"); var cropped = new Parse.File("image.jpg", { base64: base64 }); return cropped.save(); }).then(function(cropped) { // Attach the image file to the original object. request.object.set("image", cropped); }).then(function(result) { response.success(); }, function(error) { response.error(error); }); }); Question: Is it possible to do above for 5 more images? I have 6 image columns altogether. image, image2, image3, image4, image5, image6 A row will never exist without the "image" column being populated. The other images are optional. So when scaling I need to go ahead and scale "image" and if image2, image3, image4, image5 and image6 don't exist don't throw any errors. If they do exist then scale them down too. I'm sitting here scratching my head trying to come up with an efficient way to code this. I'd really appreciate if a javascript expert could come up with something. I don't feel me repeating this code a few more times is efficient at all. Thanks for your time
favorite count: 0
tagged with: parse-platform

http://stackoverflow.com/a/25191550
has comment: http://stackoverflow.com/comment/39230991
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39228779
has body: You lose context inside firstName method. When this method is invoked by Angular, its execution context is global object. You can fix it for example using Function.prototype.bind method: function User(wo) { ModelBase.call(this, wo); this.firstName = function(value) { if (isDefined(value)) { var oldValue = this.wrappedObject.firstName; this.wrappedObject.firstName = value; //onPropertyChanged(this.wrappedObject, 'firstName', oldValue, value); } else { return this.wrappedObject.firstName; } }.bind(this); }
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25191400
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39228993
answers question: http://stackoverflow.com/q/25191400
has comment: http://stackoverflow.com/comment/39228948
has comment: http://stackoverflow.com/comment/39228825
has comment: http://stackoverflow.com/comment/39239038
has comment: http://stackoverflow.com/comment/39228721
type: Answer

http://stackoverflow.com/comment/39271428
has text: Couldn't simulate the error, anyway my effort and some further explanation is aviable here: [fiddle](http://jsfiddle.net/alejoss/g9jc3ow8/)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25212439

http://stackoverflow.com/q/25120599
has body: so currently within my index I have some collection_select menus which search for the existing values for that field within my database and then list them in a dropdown menu like so &lt;%= collection_select :ansible_job, :status, AnsibleJob.select(:status).uniq.order('status ASC'), :status, :status, {:prompt =&gt; 'Status'},{:name =&gt; "status_search"} %&gt; &lt;%= collection_select :ansible_job, :environment, AnsibleJob.select(:environment).uniq.order('environment ASC'), :environment, :environment, {:prompt =&gt; 'Environment'},{:name =&gt; "environment_search"} %&gt; &lt;%= collection_select :ansible_job, :playbook, AnsibleJob.select(:playbook).uniq.order('playbook ASC'), :playbook, :playbook, {:prompt =&gt; 'Playbook'},{:name =&gt; "playbook_search"} %&gt; I also have a scope method within my controller for filtering my database based on these values, like so @ansible_jobs = AnsibleJob.where(nil) # Anon scope filtering_params(params).each do |key, value| @ansible_jobs = @ansible_jobs.public_send(key, value) if value.present? end private def filtering_params(params) params.slice(:status, :environment, :playbook) end so that I can manually filter my database by posting URL's like http://localhost:3000/?status=COMPLETED Now what I would like to do is that when an user chooses a value from the dropdown menu that would call my filter method and link to a search URL with that chosen value appended to the end so that the database is filtered based on that choice. I'm very new to Rails and web development in general so how might be the best way to go about this? Thanks!
favorite count: 0
accepted answer: http://stackoverflow.com/a/30159058
score: 2
tagged with: ruby
type: AnsweredQuestion
upvote count: 2
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/30159058
has title: Linking collection_select menu choice to a filter method - Ruby on Rails
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25089255
favorite count: 0
possible better answer: http://stackoverflow.com/a/25089357
tagged with: angularjs
has title: How do I format the display of a select from properties of the objects using angular?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25089370
downvote count: 0
accepted answer: http://stackoverflow.com/a/25089370
score: 1
has answer: http://stackoverflow.com/a/25089357
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39038786
has body: $scope.StateList = {"States": [ { "Id": 1, "Code": "AL", "Name": "Alabama" }, { "Id": 2, "Code": "AK", "Name": "Alaska" }, { "Id": 3, "Code": "AZ", "Name": "Arizona" }, { "Id": 4, "Code": "AR", "Name": "Arkansas" }]} And I display the data as follows in an html select: &lt;select ng-model="Address.State" ng-options="state.Code as state.Name for state in StateList.States"&gt;&lt;/select&gt; Right now this will display the full name of the state in the select like "Arizona". What I would like to do is format the display without adding a new property to the object, to use something like (state.Name, state.Code, state.Id). I am trying to use filters of some sort to do this but I have not figured it out yet. Thanks for your suggestions. plunker
upvote count: 1

http://stackoverflow.com/a/25093368
has body: Instead of appendChild, which adds to the end, try insertBefore: body.insertBefore(canvas, body.firstChild);
score: -1
has comment: http://stackoverflow.com/comment/39057325
answers question: http://stackoverflow.com/q/25093330
type: AcceptedAnswer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25093330
has comment: http://stackoverflow.com/comment/39058374
type: Answer
has comment: http://stackoverflow.com/comment/39062338
upvote count: 0

http://stackoverflow.com/q/25173806
accepted answer: http://stackoverflow.com/a/25176466
tagged with: mootools
type: Question
linked to: http://stackoverflow.com/q/22449501
upvote count: 1
tagged with: ios
has title: How to make what the menu will automatically closes?
has body: Need to do so that would be the menu closes when you click to another area of ​​the screen, please help, i'm use mootools functions toggleMenu: function() { if (menuOpened) { $('home-menu').setStyle('-webkit-transform', 'translateX(-50px)'); menuOpened = false; } else { $('home-menu').setStyle('-webkit-transform', 'translateX(0px)'); menuOpened = true; } },
tagged with: javascript
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39197694
has comment: http://stackoverflow.com/comment/39198798
has comment: http://stackoverflow.com/comment/39204373
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25176466

http://stackoverflow.com/comment/39301046
comment on: http://stackoverflow.com/q/25227865
score: 1
has text: You need to include a minimal demo of the view in question and how it is used. A quick demo on jsfiddle.net or jsbin.com would also be helpful.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39231020
has text: So it can't be done? What about javascript?
comment on: http://stackoverflow.com/q/25191970
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39010291
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25074213
type: Comment
has text: I did edit that one but it got buried pretty down and no one was replying back to it! Thanks Suresh, I'll give it a shot!

http://stackoverflow.com/a/25162704
has comment: http://stackoverflow.com/comment/39174927
score: 7
answers question: http://stackoverflow.com/q/25162665
type: AcceptedAnswer
has body: $(document).on('click', function(e) { if ( e.target.id != 'ok' ) { // you clicked something else } }); That would capture any click except on the input, but why would you need it ? To capture only clicks on .hor-minimalist-a and not the entire document, just replace document with that selector in the code above.
upvote count: 7
has comment: http://stackoverflow.com/comment/39174991
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39174854
accepted answer of: http://stackoverflow.com/q/25162665

http://stackoverflow.com/q/25195436
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25195461
has body: I'm planning to build a 3d game using html5 canvas, which is javascipt API. I'm a noob who doesn't know anything about Javascript. From what I heard, every javascript code line will be visible to users like html. Does it mean the entire game that is built using Javascript API such as html5 canvas will necessarily become open source by its nature? I'm worried if someone can copy and paste the core mechanics of my game.
type: Question
answer count: 2
tagged with: canvas
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25195498
accepted answer: http://stackoverflow.com/a/25195498
possible better answer: http://stackoverflow.com/a/25195461
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: is game made with html 5 canvas (javascript API) open source?
has comment: http://stackoverflow.com/comment/39235795
upvote count: 2

http://stackoverflow.com/a/25124706
has body: Simplest method, as mentioned in the comments would be to use an iframe, if possible. Another method would be to have your script make an ajax post to a script on your server, then have the output page make an ajax request at a set interval to check for changes.
score: 0
accepted answer of: http://stackoverflow.com/q/25124333
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25124333
type: Answer

http://stackoverflow.com/comment/39084722
has text: think of JSON as a textual representation of javascript object in memory.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25114040

http://stackoverflow.com/a/25202450
accepted answer of: http://stackoverflow.com/q/25195605
score: 2
answers question: http://stackoverflow.com/q/25195605
downvote count: 0
has comment: http://stackoverflow.com/comment/39256143
has comment: http://stackoverflow.com/comment/39335081
upvote count: 2
has body: You can create an access token using one of the firebase token generators on GitHub (https://github.com/firebase) and the Firebase secret. There are generators in a number of languages and you only need to create one once for each process, then use that to auth instead of the secret. When you do that, you can access any of the data you put in the token when you created it using the auth variable in the security rules. For example, you could make two tokens - one with { "uid": "client" } and one with { "uid": "server" } and then in the rules reference ".write": "auth.uid === 'server'"
type: AcceptedAnswer
type: Answer

typeahead
type: Tag
tags question: http://stackoverflow.com/q/25116635
tags question: http://stackoverflow.com/q/25134705
tag name: typeahead
tags question: http://stackoverflow.com/q/25114911
tags question: http://stackoverflow.com/q/25191154

http://stackoverflow.com/a/55435771
has comment: http://stackoverflow.com/comment/107225060
downvote count: 0
has body: I modified @Vartan's answer to make it work with Bootstrap 4.3. His solution doesn't work anymore with the latest version as target property always returns dropdown's root div no matter where the click was placed. Here is the code: $('.dropdown-keep-open').on('hide.bs.dropdown', function (e) { if (!e.clickEvent) { // There is no `clickEvent` property in the `e` object when the `button` (or any other trigger) is clicked. // What we usually want to happen in such situations is to hide the dropdown so we let it hide. return true; } var target = $(e.clickEvent.target); return !(target.hasClass('dropdown-keep-open') || target.parents('.dropdown-keep-open').length); }); Dropdown button Action Another action Something else here
score: 12
has comment: http://stackoverflow.com/comment/109682495
has comment: http://stackoverflow.com/comment/99365946
upvote count: 12
answers question: http://stackoverflow.com/q/25089297
type: Answer

http://stackoverflow.com/comment/117910472
type: AnswerComment
comment on: http://stackoverflow.com/a/54536243
type: Comment
has text: You are right, external storage like S3 is the correct approach. Referencing an image in a storage location is not only easier to understand and program it eliminates the CPU intensive job of turning a Buffer into an image.
score: 0

http://stackoverflow.com/a/25218415
downvote count: 0
answers question: http://stackoverflow.com/q/25218334
score: 1
has comment: http://stackoverflow.com/comment/39279109
has body: Here's something quick (http://jsfiddle.net/jm2romkv/): function myFunction() { var x = document.getElementById("seltime"); var timeSlotFn = getSlotIncrFn(); // adjust 50 for more/less values for (var i=0; i&lt;50; i++) { var option = document.createElement("option"); var timeSlot = timeSlotFn(); console.log(timeSlot); } } function getSlotIncrFn() { var curr = "00:00"; return function() { var hour_min = curr.split(":"); if (parseInt(hour_min[0]) == 24) { hour_min = ["00", "00"]; } if (hour_min[1] == "00") { hour_min[1] = "30"; } else { hour_min[1] = "00"; var hour = parseInt(hour_min[0]) + 1; hour = hour &lt; 10 ? "0" + hour : hour; hour_min[0] = hour; } curr = hour_min.join(":"); return curr; }; }; myFunction();
type: Answer
upvote count: 1

http://stackoverflow.com/q/25099334
favorite count: 0
has answer: http://stackoverflow.com/a/25101671
has comment: http://stackoverflow.com/comment/39057132
type: UnansweredQuestion
has title: jQuery Spritely plugin not work with jQuery + 1.11
downvote count: 0
has body: I am working with jQuery Spritely plugin for moving cloud animation. This worked with jQuery-1.6.4 but with jquery-1.11+ this plugin doesn't work. JS: $(document).ready(function() { $('#cloud, #cloud3').pan({fps: 30, speed: 2.5, dir: 'right'}); $('#cloud2, #cloud4').pan({fps: 20, speed: 1.5, dir: 'right'}); }); HTML: &lt;div class="box"&gt; &lt;div class="cloud" id="cloud"&gt;&lt;/div&gt; &lt;div class="cloud" id="cloud2"&gt;&lt;/div&gt; &lt;/div&gt; How can I fix this? Demo(Working): http://jsfiddle.net/8GwB5/ (with jQuery 1.6.4) Demo(Not Working) : http://jsfiddle.net/8GwB5/1/ (with jQuery 1.11.0)
score: 1
duplicate of: http://stackoverflow.com/q/14798403
type: Question
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39057150
linked to: http://stackoverflow.com/q/14798403
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css

http://stackoverflow.com/comment/39070253
type: AnswerComment
has text: And how are those data linked up?
type: Comment
comment on: http://stackoverflow.com/a/25103684
score: 0

http://stackoverflow.com/comment/39064194
comment on: http://stackoverflow.com/q/25103292
type: QuestionComment
type: Comment
score: 2
has text: Do you have any specific question?

http://stackoverflow.com/a/25108723
type: Answer
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25108184
score: 3
has body: There are a few ways to get around this problem. One is to put all your shared code (like config.js) in a directory under node_modules (using lib here in case you want to have directories other than config in there): application |- node_modules |----- lib |---------- config |-------------- config.js |- routes |------ api |-----------router.js |- Application.js |- package.json So then you could require config.js using require( 'lib/config/config.js' ). Alternatively, you could create a lib symlink in node_modules and link it to lib in your application directory structure: application |- node_modules |----- lib -&gt; ../../lib |- lib |------ config |---------- config.js |- routes |------ api |-----------router.js |- Application.js |- package.json One other alternative, which unfortunately is discouraged by the node docs, is to use NODE_PATH which lets you specify directories that node's require() algorithm should look into. Following the same pattern as above with lib, you would do: application |- lib |------ config |---------- config.js |- routes |------ api |-----------router.js |- Application.js |- package.json and set NODE_PATH equal to $path_to_application/lib. UPDATE Found this great discussion on the topic which includes the options above as well as a few other ones.
upvote count: 4
has comment: http://stackoverflow.com/comment/39074613
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25108184
has comment: http://stackoverflow.com/comment/39074809

http://stackoverflow.com/comment/39152208
score: 0
has text: This is the first line of my question, `I need a div to be on hover state when the page loads.` How is that confusing to you?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25149979

http://stackoverflow.com/comment/39184739
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25166345
has text: You wait by waiting for your callback to be called. This is the whole paradigm!

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/25092243
tag name: datetimepicker

http://stackoverflow.com/q/25170059
downvote count: 0
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25170710
score: 1
upvote count: 1
type: Question
has body: I want to call a function drawChart() when either my string chartTitle or when any of the properties in my object chartOptions changes. Watching them individually is easy: $scope.$watch('chartTitle', drawChart); $scope.$watchCollection('chartOptions', drawChart); However, I need a way to combine them into one $watch statement (without adding chartTitle as a property of chartOptions. How can I prevent both of these watchers from firing in the same digest cycle. That is, if I change both chartTitle and a property on chartOptions, how can I prevent drawChart from being called twice? Possible approaches: Do a deep watch on chartOptions and chartTitle. Unfortunately chartOptions is an extremely large and complicated object, so doing a deep watch on these properties is infeasible. Is it possible to put a limit on how deep to go? Detect in the chartOptions watcher whether chartTitle has been changed during this digest cycle, and vice versa. Is this even possible? Figure out a watch expression that would capture all the properties on chartOptions and chartTitle.
tagged with: javascript
has answer: http://stackoverflow.com/a/25170118
answer count: 2
has title: How can I prevent to watchers from firing in the same digest cycle?

http://stackoverflow.com/a/25204206
has body: Try calling directly d3.select('#2');
score: -1
answers question: http://stackoverflow.com/q/25204073
downvote count: 1
has comment: http://stackoverflow.com/comment/39251781
type: Answer
upvote count: 0

http://stackoverflow.com/q/25168497
possible better answer: http://stackoverflow.com/a/25168708
has title: How can I change a CSS file permanently so the changes are saved in the actual file on the server?
tagged with: css
has comment: http://stackoverflow.com/comment/39185926
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39186216
has body: I have a back-end admin section for a site i am building and I would like to allow the site owner to change the background image of a particular element on the public page. Is the best/only way to go about this by renaming my style.css file to style.php and then use a php variable to fill in the URL of the background-image style. I could then update that variable from a database. I know this has been asked before but most answers/articles online are from around 2009. Is this the accepted way to do this? Is there a better way to do this yet using javascript/jQuery or having a server side php script that is able to alter the actual CSS file sitting on the server instead of embedding the php in the style sheet.
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/25168708
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39188111
accepted answer: http://stackoverflow.com/a/25168554
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25168554

http://stackoverflow.com/comment/39237611
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25196402
has text: U need to use media queries. Google it
type: Comment

http://stackoverflow.com/comment/39177038
comment on: http://stackoverflow.com/q/25163772
type: Comment
type: QuestionComment
score: 1
has text: How is your input field getting that value in the first place? That's the thing to work on.

http://stackoverflow.com/a/25114111
answers question: http://stackoverflow.com/q/25113055
type: Answer
has body: Just like Rajaprabhu said, wrap that text inside a span and: This is a list header. And I want this text to disappear because this is not a list header! and the js: $('ul li >').filter(':not(strong)').hide();
score: 0

http://stackoverflow.com/q/25122077
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39107271
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39111437
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
score: 0
has body: I just recently inserted a logo as inline-SVG on my tumblr-blog and somehow, because of this, infinite scroll stops working. Tbis is the code for the graphic (inserted after the body tag): <g class="cross" opacity="0.7" fill="none" stroke="{color:Hovered Links}" stroke-width="5"> <line stroke-miterlimit="10" x1="294.928" y1="331" x2="6.99" y2="43.001"/> <line stroke-miterlimit="10" x1="6.99" y1="331" x2="294.928" y2="43.001"/> </g> <g class="characters" opacity="0.7" fill="{color:Links}"> <path d="[loads of vector data]"/> <path d="[more vector data]"/> </g> and this is the Javascript before the body closing tag: I have absolutely no idea why this should break the Javascript I'm using. Also, the Javascript for the Photoset-Grid still works. Could anybody tell me what is going wrong?
has title: Inline SVG breaks JavaScript/Infinite-scroll on Tumblr
tagged with: tumblr

http://stackoverflow.com/a/25214514
answers question: http://stackoverflow.com/q/25203698
score: 0
has body: You can use SVG clip-path= attribute to clip an SVG &lt;image&gt; to arbitrary shapes: &lt;div id="bg"&gt; &lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"&gt; &lt;defs&gt; &lt;clipPath id="my-clip-path-shape"&gt; &lt;path d="... path data ..."/&gt; &lt;/clipPath&gt; &lt;/defs&gt; &lt;image xlink:href="https://i.sstatic.net/tINBm.jpg" clip-path="url(#my-clip-path-shape)" /&gt; &lt;/svg&gt; &lt;/div&gt; Note that SVG is part of HTML 5, so you can embed SVG directly into an HTML5 document or alternatively you can link to an external SVG file with &lt;img&gt; or &lt;object&gt;/&lt;embed&gt; tags. To make creating paths easier, you can use SVG editors like Inkscape. In Inkscape, you can create clip path by selecting the image you want to clip and the path then Object &gt; Clip &gt; Set. View example in JSFiddle It is also possible to reuse an SVG path from a different SVG document or from a different tag embedded in the same HTML document, which may reduce the download size and memory usage if you reuse a path a lot, however this is not very well supported in many browsers. Since embedded SVG is just an element in HTML5 DOM, you can manipulate it with Javascript just like any other HTML5 elements. You can, for example, modify the URL that the &lt;image&gt; is pointing to, or change the shape of the path, or swap between different paths, or move the image around in the path. Imags are public domain image from: 1 2
type: Answer

http://stackoverflow.com/a/25219763
has body: You are defining the variable List as a local variable, thus it will only exist in process(), define it as a global variable removing the private word var, here it is: function process () { List = new Array("a","b","c"); }
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39281639
answers question: http://stackoverflow.com/q/25219741
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39243627
type: AnswerComment
comment on: http://stackoverflow.com/a/25199300
type: Comment
has text: I need more info to help you. Could you show the plugin code ? And the code you use on the server side ? When you say " I can see that it read it inside the plugin", where exactly do you read it ?
score: 0

http://stackoverflow.com/comment/39289427
has text: There's no guarantee, with IEEE-754 double-precision floating point, that dividing a whole number by 100 will only give you two digits to the right of the decimal in the result (because of FP imprecision issues). Whereas the function referenced by the OP, `toFixed`, will. *(Not my dv)*
type: Comment
score: 3
comment on: http://stackoverflow.com/a/25224160
type: AnswerComment

asprepeater
tags question: http://stackoverflow.com/q/25081685
type: Tag
tag name: asprepeater

http://stackoverflow.com/comment/39069015
score: 0
type: AnswerComment
type: Comment
has text: Not that big difference, but definitely faster. However it doesn't really solves collisions... http://jsfiddle.net/WS9dC/4/
comment on: http://stackoverflow.com/a/25105589

http://stackoverflow.com/a/25153571
downvote count: 0
has body: Make sure you set the locale in your host page (in the &lt;head&gt;): &lt;meta name="gwt:property" content="locale=en"&gt;
answers question: http://stackoverflow.com/q/25153396
type: Answer
accepted answer of: http://stackoverflow.com/q/25153396
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39158450
type: AcceptedAnswer

yeoman
tags question: http://stackoverflow.com/q/25222519
tags question: http://stackoverflow.com/q/25165372
tags question: http://stackoverflow.com/q/25166601
tags question: http://stackoverflow.com/q/25223246
tags question: http://stackoverflow.com/q/25216791
tags question: http://stackoverflow.com/q/25097198
type: Tag
tags question: http://stackoverflow.com/q/25101692
tag name: yeoman

http://stackoverflow.com/q/25163216
answer count: 2
has body: I am working on a web project where I have to draw a timeline with rows and information (comparable with a Gantt chart). Basically the following is important: The user can scroll in time (to the left or right). The timeline can be scrolled vertically (scrolling through the rows). The name of the row is always visible on the row itself. To clear things op I've created the following masterpiece art: We can see the timeline with the rows in red, the name of the row is on the left (orange) and items on the rows are colored blue. So scrolling the timeline to the right will result in something like this: The names are still on the same position as we can see and that is exactly the question I have: What is the best practice of keeping items on the same horizontal position within a container that is horizontally and vertically scrollable? Of course when vertically scrolling through the rows, the orange blocks should also scroll along. But hey! What did you try so far? I tried a couple of things but could not find the perfect solution: 1) Changing the left property I tried changing the css left property of the orange blocks with javascript while horizontally moving (changing the position with Translate() did not change much). This works well on chrome but on IE (still don't understand why people use it) it is really slow and the position update is clearly visible. If you take the scroll bar and start scrolling like crazy, you can see the orange boxes flying from left to right. Which brought me to the following idea: 2) YOU! get out! I made a separate container element for the orange boxes and put it outside of the timeline, gave it an absolute position and placed it on top of the timeline so it stays there no matter if the user is scrolling the timeline. Results: No difference in appearance and scrolling to the left and right works perfect because I don't have to set the left position of the orange boxes. BUT... This solution may work for scrolling horizontally, but when sc…
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/39179228
has answer: http://stackoverflow.com/a/59654113
favorite count: 0
has answer: http://stackoverflow.com/a/25193582
has comment: http://stackoverflow.com/comment/39183291
has comment: http://stackoverflow.com/comment/39175910
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
tagged with: css
has comment: http://stackoverflow.com/comment/39177239
downvote count: 0
type: UnansweredQuestion
tagged with: scroll
has title: scrolling inside a timeline that is made with html & css
type: Question
has comment: http://stackoverflow.com/comment/39222868
has comment: http://stackoverflow.com/comment/39182844
has comment: http://stackoverflow.com/comment/39176679
has comment: http://stackoverflow.com/comment/39178927

http://stackoverflow.com/q/25194526
has title: Set cookie using cookie.js
possible better answer: http://stackoverflow.com/a/25196780
upvote count: 0
tagged with: cookies
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39234157
has comment: http://stackoverflow.com/comment/39234126
has answer: http://stackoverflow.com/a/25196780
score: -1
type: Question
answer count: 2
has body: I'm trying to make the page remember the event that was fired by clicking on a radio button using jquery.cookie.js but it's not saving the cookie. Here's my code: HTML: Foo Bar JS: $(document).ready(function () { $('input').change( function () { var closed = $('span').is(":hidden"); if ($(this).val() == "barval") { $('.foo').fadeOut(); $('.bar').fadeIn(); } else { $('.bar').fadeOut(); $('.foo').fadeIn(); } setCookie("open", closed, 365); }); var showsqux = getCookie("open"); if (showqux == "true") { $('.foo').fadeOut(); $('.bar').fadeIn(); } else { $('.bar').fadeOut(); $('.foo').fadeIn(); } }); function setCookie(c_name, value, exdays) { var exdate = new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString()); document.cookie = c_name + "=" + c_value; } function getCookie(c_name) { var i, x, y, ARRcookies = document.cookie.split(";"); for (i = 0; i < ARRcookies.length; i++) { x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("=")); y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1); x = x.replace(/^\s+|\s+$/g, ""); if (x == c_name) { return unescape(y); } } } CSS: .bar { display:none } CodePen DEMO Where am I going wrong?
has answer: http://stackoverflow.com/a/25195163
downvote count: 1
accepted answer: http://stackoverflow.com/a/25195163
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25138873
answer count: 3
tagged with: jquery
favorite count: 0
tagged with: focus
has answer: http://stackoverflow.com/a/25138996
has answer: http://stackoverflow.com/a/25138998
has answer: http://stackoverflow.com/a/25139164
accepted answer: http://stackoverflow.com/a/25138998
tagged with: php
has comment: http://stackoverflow.com/comment/39130490
type: AnsweredQuestion
upvote count: 1
has body: &lt;script type="text/javascript"&gt; setInterval(function(){ $("#reg_id").focus(); }, 1000); &lt;/script&gt; how to disable focus if dialog is opened setInterval(function(){ if($("#dialogadd_participant").dialog("isOpen")){} else { $("#reg_id").focus(); } }, 1000); isn't work, please help
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25138996
tagged with: javascript
linked to: http://stackoverflow.com/q/3313784
has title: How to disable focus if dialog is opened
score: 0

http://stackoverflow.com/q/25111084
downvote count: 1
has answer: http://stackoverflow.com/a/25121313
score: -1
type: Question
tagged with: api
upvote count: 0
tagged with: javascript
tagged with: loopbackjs
answer count: 1
favorite count: 0
tagged with: strongloop
has body: I have just tried to use the StrongLoop API Explorer as explained on http://docs.strongloop.com/display/LB/Use+API+Explorer; I have followed all the steps indicated in the document starting from downloading the sample code from https://github.com/strongloop/loopback-explorer. When I hit "Try it out" I keep getting a JS error (from firebug) TypeError: this.type.split is not a function http://localhost:3000/explorer/lib/shred.bundle.js Line 2034 and the following is the response body that I keep getting { "error": { "name": "ValidationError", "status": 422, "message": "The `Person` instance is not valid. Details: `FirstName` can't be blank; `LastName` can't be blank; `Age` can't be blank; `DOB` can't be blank.", "statusCode": 422, "details": { "context": "Person", "codes": { "FirstName": [ "presence" ], "LastName": [ "presence" ], "Age": [ "presence" ], "DOB": [ "presence" ] }, "messages": { "FirstName": [ "can't be blank" ], "LastName": [ "can't be blank" ], "Age": [ "can't be blank" ], "DOB": [ "can't be blank" ] } }, "stack": "ValidationError: The `Person` instance is not valid. Details: `FirstName` can't be blank; `LastName` can't be blank; `Age` can't be blank; `DOB` can't be blank.\n at D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib\\dao.js:156:16\n at ModelConstructor.&lt;anonymous&gt; (D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib\\validations.js:453:11)\n at ModelConstructor.next (D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib\\hooks.js:66:12)\n at ModelConstructor.&lt;anonymous&gt; (D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib\\validations.js:450:23)\n at ModelConstructor.trigger (D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib\\hooks.js:56:12)\n at ModelConstructor.Validatable.isValid (D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib\\validations.js:430:8)\n at Function.DataAccessObject.create (D:\\explorerAPI\\node_modules\\loopback-datasource-juggler\\lib…
type: UnansweredQuestion
has title: StrongLoop API Explorer returning an error

http://stackoverflow.com/comment/39234196
has text: The script writes properly to canvas as an oninput event, except I've lost the ability to backspace, can that be fixed?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25144975

http://stackoverflow.com/q/25214713
tagged with: backbone.js
has body: I'm trying to loop 10 of sub view in the main view. What I've done Main view : render: function(){ var _itemList = _.template(ItemListTem); $(this.el).html(_itemList); this.itemView = new ItemView(); for(var i=0; i&lt;10; i++){ this.itemView.setElement(this.$(".itemList")).render(); } } mainTemplate.html : &lt;div class="itemList"&gt;&lt;/div&gt; Sub View : render: function(){ var _item = _.template(Item); $(this.el).html(_item) return this; } Problem : The main view contains only a sub view. I don't have too much experience with Backbone.js, so please excuse my ignorance if I've completely missed something here.
type: AnsweredQuestion
has title: Backbone loop sub view in main view
has answer: http://stackoverflow.com/a/25215114
type: Question
has comment: http://stackoverflow.com/comment/39272217
score: 0
accepted answer: http://stackoverflow.com/a/25215114
answer count: 1
has comment: http://stackoverflow.com/comment/39272290
tagged with: javascript

http://stackoverflow.com/q/25186609
has answer: http://stackoverflow.com/a/25187289
has answer: http://stackoverflow.com/a/25187827
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25186988
has comment: http://stackoverflow.com/comment/39219729
score: 2
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39219410
favorite count: 0
has comment: http://stackoverflow.com/comment/39220864
has answer: http://stackoverflow.com/a/25187799
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has title: How to clone an element and not fire events in Chrome?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25187282
upvote count: 2
has body: I am attempting to clone an input element of type="file". In this input element there is an onchange event. The clone method is called in the function that is called from the onchange event. The problem I am having is that when I clone the file upload input, the onchange event is fired again. This only happens in Chrome, but works as intended in IE. &lt;input type="file" id="fileUpLoad" onchange="doFunction();" /&gt; doFunction = function() { var oldEl = $('#fileUpLoad'); var newEl = $(oldEl).clone(); $(oldEl).attr('id','fileUpLoadOLD'); $(oldEl).before(newEl); } I have created a fiddle duplicating this issue. Here is the fiddle. How can I clone this file upload input without firing the onchange event again and again? I am using jQuery 1.7.1. This is actually a simplified a snippet from ajaxfileuploader.js: var oldElement = jQuery('#' + fileElementId); var newElement = jQuery(oldElement).clone(); jQuery(oldElement).attr('id', fileId); jQuery(oldElement).before(newElement); jQuery(oldElement).appendTo(form); UPDATE: fiddle I think this is accomplishing what I need based on @MichaelAngstadt answer. Still testing though. This is what seems to be working for me in the ajaxfileuploader.js extension: var oldElement = jQuery('#' + fileElementId); var oldElEvents = oldElement.data("events"); var newElement = jQuery(oldElement).attr('id', fileId).data("events", null).clone(); jQuery(oldElement).attr('id', fileElementId).before(newElement); jQuery(oldElement).data("events", oldElEvents); jQuery(newElement).appendTo(form);
has comment: http://stackoverflow.com/comment/39220297
tagged with: google-chrome
possible better answer: http://stackoverflow.com/a/25187282
has comment: http://stackoverflow.com/comment/39219629
type: Question
has answer: http://stackoverflow.com/a/25186988
has comment: http://stackoverflow.com/comment/39219544
has comment: http://stackoverflow.com/comment/39222776

http://stackoverflow.com/comment/39291895
comment on: http://stackoverflow.com/a/25221312
has text: @adeneo I agree with you to not listen to C on the subject of "Classical inheritance" but for the exact reason that he creates an instance of Parent to set prototype part of Child (as you advice). Then claims the Parent constructor can't be re used (ahem: Parent.call...) So Bergi is correct that Object.create is better then creating an instance. More on prototype here: http://stackoverflow.com/a/16063711/1641941
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25217841
tagged with: ajax
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25218264
type: UnansweredQuestion
tagged with: php
type: Question
has answer: http://stackoverflow.com/a/25217904
has answer: http://stackoverflow.com/a/25217890
has body: I want to call a function before closing a window. For example I want to call ajax before closing page. I am using following code but its not working. $(window).bind('beforeunload', function(){ $.ajax({ url:'logout.php', type:'POST' }); }); What is the best way to call function before closing the window?
has title: jQuery: How to call a function before unload window
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39820270
comment on: http://stackoverflow.com/a/25414548
type: AnswerComment
type: Comment
has text: I have the same experience as Ron Harlev: non-lagging results are best achieved by setting recognition.continuous = false and restarting the recognition when the onend event occurs.
score: 1

http://stackoverflow.com/comment/39089937
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25115914
type: Comment
has text: It's Working and I bit Updated the code var videos = Directory .GetFiles(AppDomain.CurrentDomain.BaseDirectory) .Where(f => f.EndsWith(".mp4") || f.EndsWith(".ogg") || f.EndsWith(".webM")) .ToList(); As it will deal for multi formats defined in Views. Nice Answer!

http://stackoverflow.com/comment/99014678
comment on: http://stackoverflow.com/a/25150815
type: AnswerComment
type: Comment
score: 2
has text: Generally Lat come first. Mongo should give proper error in simple words.

http://stackoverflow.com/comment/39128488
comment on: http://stackoverflow.com/a/25137379
type: Comment
has text: Could you please elaborate more on how to use those functions to solve the problem? Any pros and cons to use of either? Just names of functions don’t tell much about how you intend to use them in this scenario, how they answer the question. Questions can be closed as “unclear what you’re asking” – this answer is pretty much “unclear what you’re answering”.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25158797
tagged with: javascript
favorite count: 0
tagged with: angularjs
has body: I'm new to Angular JS and struggling to get a factory to return data when my URL has changed. In my app config I have: .state('app.sessionActivity', { url: "/session/:sessionid/activity/:id", views: { 'menuContent' :{ templateUrl: "templates/activity.html", controller: 'SessionActivityCtrl' } } }) My Controller: .controller('SessionActivityCtrl', ['$scope', '$stateParams', 'localJSONData', function($scope, $stateParams, localJSONData) { var activityID = $stateParams.id; var activityVideoURLSRC = null; localJSONData.getJSONData() .success(function(data){ $scope.activityData = data[activityID - 1]; }); }]) My factory: .factory('localJSONData', ['$http', '$stateParams', function($http, $stateParams){ var sessionID = $stateParams.sessionid; return { getJSONData: function(){ if(sessionID == 1){ return $http.get('json/session1_activities.json', {cache:false}); } if(sessionID == 2){ return $http.get('json/session2_activities.json', {cache:false}); } } } }]) This all works when I first load the page and go to the URL (for example) /session/1/activity/1 for the first time. But then when I load the URL (for example) /session/2/activity/2 the data is from session 1. When I debug in chrome, the factory doesn't get called the second time. Am I not getting something conceptually, not using the correct methods, or are there any errors in my code?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25158842
has title: AngularJS - factory not being called when URL changes
upvote count: 1
type: Question
score: 1
accepted answer: http://stackoverflow.com/a/25158842
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25170570
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/30244132
upvote count: 2
tagged with: d3.js
has answer: http://stackoverflow.com/a/30244132
has comment: http://stackoverflow.com/comment/39213953
has answer: http://stackoverflow.com/a/25188909
type: Question
has body: I am working with DC.js and crossfilter. I am trying to use a composite chart to house a bar chart and a line chart. However, when I apply a filter to the data, the bars and line don't update. If I have the charts as standalone bar/line charts, they do update properly. Here are the chart properties Composite Chart var chartScorecardComposite = dc.compositeChart("#regionMarketChart") .width(1002) .height(300) .margins({top: 30, right: 50, bottom: 50, left: 40}) .dimension(chartIssuedJobsCountDim) .yAxisLabel("Issued on Time %") .rightYAxisLabel("Jobs Issued") .shareTitle(false) .x(d3.time.scale().domain([minDate, maxDate])) .y(d3.scale.linear().domain([0, 120])) .xUnits(d3.time.months) .compose([ dc.barChart(chartScorecardComposite) .dimension(chartIssuedJobsCountDim) .group(chartIssuedJobsCountGroup) .valueAccessor(function (d) { return d.value.jobCount; }) .title(function(d) { return (d.key.getMonth() + 1) + "/" + d.key.getFullYear() + "\n# of Jobs: " + d.value.jobCount; }) .renderTitle(true) .centerBar(true) .gap(5) .useRightYAxis(true) .colors(["#79BAEC"]), dc.lineChart(chartScorecardComposite) .dimension(chartIssuedJobsCountDim) .group(chartIssuedOnTimeGroup) .valueAccessor(function (d) { return d.value.onTimePercent; }) .title(function(d) { return (d.key.getMonth() + 1) + "/" + d.key.getFullYear() + "\n% of Jobs Issued on Time: " + d.value.onTimePercent + "%"; }) .renderTitle(true) .colors(["#808080"]) ]) .elasticY(true) .renderHorizontalGridLines(true) .brushOn(false) .renderlet(function (chart) { // Rotate the x-axis labels 45 degrees chart.selectAll("g.x text") .attr('dx', '-25') .attr('dy', '7') .attr('transform', "rotate(-45)"); }) .xAxis().ticks(d3.time.months).tickFormat(function(d) { return (d.getMonth() + 1) + "/" + d.getFullYear() }) Bar Chart (commented out when compositeChart is rendered) var issuedJobsBarChart = dc.barChart("#regionMarketChart") .yAxisLabel("Jobs Issued") .dimension(chartIssuedJobsCountDim) .group(chartIssuedJobsCountGroup) .valueA…
tagged with: javascript
tagged with: dc.js
has title: DC.js composite chart not updating when filter is applied
tagged with: crossfilter
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39190842
accepted answer: http://stackoverflow.com/a/25188909
favorite count: 0
has comment: http://stackoverflow.com/comment/39214533

http://stackoverflow.com/a/25202184
has body: "contacttype" field missing in ajax post var dataString = 'name='+ name + '&amp; email=' + email + '&amp; phone=' + phone + '&amp; comment=' + comment+'&amp; contacttype=' + contacttype ; missing "id" attribute in these fields &lt;input type="text" name="name" placeholder="Name" id='name'&gt;&lt;br&gt; &lt;input type="text" name="email" placeholder="Email" id='email'&gt;&lt;br&gt; &lt;input type="text" name="phone" placeholder="Phone" id='phone'&gt;&lt;br&gt; &lt;textarea name="comment" placeholder="Comment" id='comment'&gt;&lt;/textarea&gt;&lt;br&gt; May be type, name, email, phone, comment sql field datatype is varchar mysql_query("insert into `contact_form` (`type`, `name`, `email`, `phone`, `comment`) VALUES ('$contacttype','$name','$email','$phone','$comment')"); if " phone " datatype is INT u can use ('$contacttype','$name','$email',$phone,'$comment')
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25201312
score: 1
upvote count: 1

http://stackoverflow.com/a/25116640
has body: Assign "z-index" css properties both for map and for menu containers, and the menu's one must be greater than map's one, e.g. 100 for menu and 99 for map.
upvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25116601
downvote count: 1
score: -1

http://stackoverflow.com/comment/39006066
has text: actually for (i=0; i < 30; i++){ seems to continue a loop as well
comment on: http://stackoverflow.com/a/25069974
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25152247
score: 0
has body: $("#result").on( "click",".remove_pict",function(){ $(this).parent().remove(); }); This may be help you
type: Answer
has comment: http://stackoverflow.com/comment/39156632
has comment: http://stackoverflow.com/comment/39156789
answers question: http://stackoverflow.com/q/25152047

http://stackoverflow.com/q/25200867
tagged with: gridview
score: 1
has comment: http://stackoverflow.com/comment/39245993
upvote count: 1
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/39245989
tagged with: javascript
has comment: http://stackoverflow.com/comment/39246488
has title: How to get html tag in Asp.Net Gridview with javascript?
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39246182
has comment: http://stackoverflow.com/comment/39249901
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25201025
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I want to get a select tag in my Gridview with javscript. E.g : <asp:GridView ID="GridView1" runat="server"> </asp:GridView> I want to fill my select tag with Javascript. I have this : function fillSelectTag(pageNumber) { var sel = document.getElementById('Select'); for (var i = 0; i < pageNumber; i++) { var opt = document.createElement('option'); opt.innerHTML = i; opt.value = i; sel.appendChild(opt); } sel.selectedIndex = 0; } The problem is I have null for document.getElementById('Select');. How to get the select tag?

http://stackoverflow.com/comment/39046133
type: QuestionComment
has text: Could you show the code of what you've tried?
score: 0
comment on: http://stackoverflow.com/q/25093363
type: Comment

http://stackoverflow.com/q/25161240
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25165168
type: AnsweredQuestion
upvote count: 2
score: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25165168
has body: I am drawing a path using the canvas element and JavaScript The path has a fill, and a stroke. I however would only want to apply the stroke to parts of the path. I have created a JSFiddle which shows the shape I have been drawing, with comments explaining which parts should or should not be stroked. http://jsfiddle.net/DanielApt/22973/ How can I make parts of the path have no stroke? I have been using: function draw() { var canvas = document.getElementById("canvas"); var ctx = canvas.getContext("2d"); ctx.strokeStyle = 'red'; ctx.lineWidth = 3; ctx.fillStyle = 'blue'; ctx.moveTo(10, 200); // the starting point ctx.lineTo(10, 150); // I want this to have no stroke ctx.lineTo(110, 30); // stroked line ctx.lineTo(210, 50); // stroked line ctx.stroke(); // end our stroke here ctx.lineTo(210, 200); // line without a stroke ctx.fill(); } draw(); Thank you in advance for your help.
tagged with: canvas
answer count: 1
tagged with: javascript
has title: Draw part of path without stroke, part with stroke

http://stackoverflow.com/comment/39176331
type: Comment
comment on: http://stackoverflow.com/a/25162952
score: 0
type: AnswerComment
has text: Thanks a lot, this works. Unfortunately the randomise_colours function doesn't appear to be picking up on the newly added content but I guess this is a separate issue.

http://stackoverflow.com/q/25179900
type: UnansweredQuestion
tagged with: css
type: Question
tagged with: kendo-grid
tagged with: javascript
has body: when I filtering kendo grid I need to change color of "watering can" that showing above columns. So I found way to run my code on filtering event: var originalFilter = self.object.data("kendoGrid").dataSource.filter; self.object.data("kendoGrid").dataSource.filter = function(e) { if(e != undefined &amp;&amp; e != null) { var selector = 'th[data-field=' + e.filters[0].field + '] &gt; a &gt; span.k-filter'; $(selector).css('background-color', 'red'); return originalFilter.apply(this, arguments); } } So, in such way I can change background color of icon. But I have two problems: 1) After filtering value disappear. 2) I need to change b-color on red when some value interred in filter input, and white b-color when value is empty. So, could you please give me example of code that will change color of filter icon.
has title: How to change icon or icon color on kendo ui grid filter?
score: 0
has answer: http://stackoverflow.com/a/25187255
answer count: 1
tagged with: jquery
tagged with: kendo-ui

http://stackoverflow.com/comment/39237437
comment on: http://stackoverflow.com/a/25184478
type: AnswerComment
score: 0
type: Comment
has text: No, Here only i gave a wrong variable name but in my actual code it was correct, that's i edited my above code.

http://stackoverflow.com/comment/39252835
has text: Ok, have you tried to force repaint of the box, i.e. `var dynbox = $('#dynbox'); dynbox.css("display", "none"); var redraw = dynbox.offsetHeight; dynbox.css("display", "block");`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25201113

http://stackoverflow.com/a/25133285
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25132681
answers question: http://stackoverflow.com/q/25132681
type: Answer
has body: You have an illegal invisible character after your toggle function. When pasted into jsfiddle it's visible: http://jsfiddle.net/7m5Sb/ It's right after the last }
upvote count: 2
has comment: http://stackoverflow.com/comment/39120453
score: 2

http://stackoverflow.com/comment/39219670
has text: it says it just returns test. Console.log typeof says it's an object.
score: 0
comment on: http://stackoverflow.com/q/25186862
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25111087
score: 14
type: AnsweredQuestion
has title: Why is a function declaration within a condition block hoisted to function scope in Chrome but not Firefox?
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39079130
tagged with: firefox
has answer: http://stackoverflow.com/a/25111212
accepted answer: http://stackoverflow.com/a/25111212
answer count: 1
has comment: http://stackoverflow.com/comment/39079366
tagged with: javascript
upvote count: 14
has comment: http://stackoverflow.com/comment/39079222
has body: Why the following codes output different results between Chrome and Firefox? f = function() {return true;}; g = function() {return false;}; (function() { if (g() &amp;&amp; [] == ![]) { f = function f() {return false;}; function g() {return true;} } })(); console.log(f()); In Chrome: the result is false. However, in Firefox, it is true. The key line of the above codes is line 4, and base on my knowledge of function name hoisting, the function g should be in line 6, namely the line 2 is overridden by line 6. IMO, the behavior of Chrome is correct. Am I right on this? if so, why Firefox outputs different results?
favorite count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/39079258

http://stackoverflow.com/comment/39284340
type: QuestionComment
has text: Well, `window.setTimer` doesn't exist, so it's not that surprising that it didn't work. Before you try anything, read the documentation of the function you are trying to call. If you can't find documentation than the function might not exist.
comment on: http://stackoverflow.com/q/25221243
score: 0
type: Comment

http://stackoverflow.com/comment/39210166
score: 0
type: Comment
has text: Such a simple (but mind-crazy) solution. I thought I checked this a bunch of times before realizing all my elements were in a 'form' element I wasn't declaring. Thanks!
comment on: http://stackoverflow.com/a/25169717
type: AnswerComment

http://stackoverflow.com/q/25109493
has comment: http://stackoverflow.com/comment/39076320
tagged with: node.js
has answer: http://stackoverflow.com/a/25147830
accepted answer: http://stackoverflow.com/a/25147830
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39077027
downvote count: 0
score: 1
tagged with: queue
tagged with: timing
type: Question
has answer: http://stackoverflow.com/a/42667748
has comment: http://stackoverflow.com/comment/39075986
tagged with: javascript
has comment: http://stackoverflow.com/comment/39076137
answer count: 2
has comment: http://stackoverflow.com/comment/39147442
upvote count: 1
tagged with: events
favorite count: 0
has body: I need to call a function multiple times from different contexts, but i need that each call fires not before that one second has passed after the previous call started. i'll make an example: var i = 0; while(i&lt;50) { do_something(i) i++ } function do_something(a) { console.log(a) } I want that this log: '1', then after a second '2', then after a second '3', then after a second '4'... I can't use simple setInterval or setTimeout because this function 'do_something(param)' can be called in the same moment from different sources cause i am working with async function in nodejs. I want that the order of calls is kept, but that they fires with minimum delay of one second. I think i should add these calls to a queue, and then each second a call is dequeued and the function fires, but i really don't know how to do it in nodejs. Thank you in advance
has title: Call function multiple times in the same moment but execute different calls with delay in nodejs
possible better answer: http://stackoverflow.com/a/42667748
linked to: http://stackoverflow.com/q/42651439

http://stackoverflow.com/a/25070412
score: 4
upvote count: 4
downvote count: 0
has body: PHP is a server-side language, the web browser never sees the code. JavaScript and HTML are client-side, so the code is replicated and ran on the browser instead. If you have this on a webpage: &lt;?php echo "hello"; ?&gt; The user will not see the code, they will only see "hello" (minus the quotes).
has comment: http://stackoverflow.com/comment/39003401
has comment: http://stackoverflow.com/comment/39003352
has comment: http://stackoverflow.com/comment/39003556
type: Answer
has comment: http://stackoverflow.com/comment/39003666
answers question: http://stackoverflow.com/q/25070397

http://stackoverflow.com/a/25098611
accepted answer of: http://stackoverflow.com/q/25098022
answers question: http://stackoverflow.com/q/25098022
has comment: http://stackoverflow.com/comment/39056185
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39056245
type: Answer
has body: The concurrency limited solution option is the approach I would take but, instead of implementing that myself, I'd just use the async module. Specifically, the queue method. Something like: var dbQueue = async.queue(function(tick, callback) { db.set(tick.date, tick, function(err, result) { console.log(result); callback(err, result); }); }, 3); // the last arg (3) is the concurrency level; tweak as needed parser._transform = function(data, encoding, done) { //push data rows var tick = this._parseRow(data); dbQueue.push(tick); this.push(tick); done(); }; That will limit your db operations to 3 at a time. Additionally, you can use the queue's saturated and empty events to pause/resume your stream to keep things even more limited in terms of resource use (which will be nice if you're reading really large files). That would look something like: dbQueue.saturated = function() { parser.pause(); } dbQueue.empty = function() { parser.resume(); }
downvote count: 0
score: 2

http://stackoverflow.com/comment/39596336
has text: Thanks Laurens Kling, your solution seems to work, using min-height and also max-height in my .col4!
type: Comment
comment on: http://stackoverflow.com/a/25348616
type: AnswerComment
score: 0

http://stackoverflow.com/q/25125967
favorite count: 0
has title: Store canvas coordinates of drawing
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has body: I'm just screwing around a bit and so I made this Android unlock style thingy. It uses to let someone draw and then colors in the dots accordingly. However, what I want to do now is store the coordinates of the drawing in a table. So, next time the drawing can be checked against the one stored. Codepen: http://codepen.io/anon/pen/xugav Code: Console.log
tagged with: css
accepted answer: http://stackoverflow.com/a/25146632
type: AnsweredQuestion
score: 2
upvote count: 2
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25146632
tagged with: canvas
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25133533
upvote count: 4
downvote count: 0
score: 4
type: AcceptedAnswer
type: Answer
has body: Just make both strings either lowercase or uppercase to make the search case insensitive: function searchAccoms() { var searchString = $('#searchval').val(); $('span.acc-head').each(function(){ var spanString = $(this).text(); if (spanString.toLowerCase().search(searchString.toLowerCase()) == 1) { console.log('found'); } else { console.log('Not Found'); } }); } Another option would be to construct a regex, something like var searchString = $('#searchval').val(); var regex = new RegExp(searchString, 'i'); ... if(spanString.search(regex) == 1) but just making the strings the same case seems a lot easier
answers question: http://stackoverflow.com/q/25133495
accepted answer of: http://stackoverflow.com/q/25133495

http://stackoverflow.com/q/25113801
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39089767
answer count: 1
tagged with: jquery
has title: auto complete textbox from scratch
has body: I am writing autocomplete input control from scratch using javascript and jquery. I know I can use the jquery autocomplete. But then there won't be any fun. The autocomplete I have so far shows suggestions but I am not able to select the suggestions using mouse. How can I do this? The code I have so far is following html, and following is the style sheet and my javascript code is following Thanks
has comment: http://stackoverflow.com/comment/39084082
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39084062
tagged with: css
has comment: http://stackoverflow.com/comment/39084055
has comment: http://stackoverflow.com/comment/39084101
has answer: http://stackoverflow.com/a/25114503
type: Question
has comment: http://stackoverflow.com/comment/39084127

http://stackoverflow.com/comment/39279480
has text: I was trying with the id only select2('val', '1') but it wasn't work.. Thanks
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25217310
score: 2

http://stackoverflow.com/a/25203390
has comment: http://stackoverflow.com/comment/39255538
type: AcceptedAnswer
downvote count: 0
has body: Find the target element using the .filter() method and then use its .offset()(to find its position in the document) and .animate() the scrollTop property of the page $('#example').bind('click',function(e) { e.preventDefault(); var target = $('h1').filter(function(){ return $(this).text() == 'test' ;}); $('html,body').animate( { scrollTop: target.offset().top }); }); Demo at http://jsfiddle.net/Lc8gg7pm/1/
type: Answer
accepted answer of: http://stackoverflow.com/q/25203049
upvote count: 1
answers question: http://stackoverflow.com/q/25203049
score: 1

http://stackoverflow.com/q/25091761
has answer: http://stackoverflow.com/a/54536243
favorite count: 0
upvote count: 2
has body: I've been trying to work with images in mongodb for the past while now. Every where I keep looking just says use GridFS due to the 16mb size restraint per document. However, each document Id like to store is &lt;16mb. I currently stored it like this var testChamp = new Champion ({ name: "Aatrox", img: fs.readFileSync("D:/CounterMe/Aatrox_0.jpg"), contentType: "jpg" }); testChamp.save(function() { console.log("Saved"); }) In my schema: name: String, img: Buffer, contentType: String ` Finding this information in the mongoshell brings a HUGE amount of lines in cmd, so Im not sure if im even storing it correctly. If I am, I have no clue how to insert it into my html. I know how to retrieve the name, pass it in as an object: app.get("/", function(req, response) { Champion.find(function(err, champs) { response.render("index", { champ: champs[0] }); }); }); However, once I retrieve champs[0].img, im not sure what to do with it. How am I supposed to pass the img into my HTML? Any help would be appreciated, I am very stumped currently.
has answer: http://stackoverflow.com/a/25092001
tagged with: node.js
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25092001
accepted answer: http://stackoverflow.com/a/54536243
type: Question
tagged with: mongodb
tagged with: javascript
has title: Retrieving/Posting Images From MongoDB (mongoose)
answer count: 2
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39043663

http://stackoverflow.com/a/25131996
accepted answer of: http://stackoverflow.com/q/25131939
answers question: http://stackoverflow.com/q/25131939
has comment: http://stackoverflow.com/comment/39138979
has body: Never use synchronous function like this. Because if you have 100 concurrent requests and within one of them sync function is used, other 99 clients will wait till this function ends. Instead use async analogs: fs.readFile(temppath + id + ".sequence", "utf8", function(err, sequence) { fs.readFile(temppath + id + ".refseq", "utf8", function(err, refseq) { fs.readFile(temppath + id + ".coverage.txt", "utf8", function(err, coverage) { res.render('results', { title: 'Results', sequence: sequence, refseq:refseq, coverage: coverage}); }); }); });
has comment: http://stackoverflow.com/comment/39118023
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39118254
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39117938

http://stackoverflow.com/q/25100318
has title: Bring single item to top of list
tagged with: angularjs
score: 0
has answer: http://stackoverflow.com/a/25106474
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25106474
has body: Given an arbitrary list of items, in a ul or set of divs, I would like to use the angular way to bring the selected item to the top of a list/display. $scope.items = [{name: "Garfield", id: 1}, {name: "Simon", id: 2}, {name: "Whatever", id: 3}] $scope.model = {selectedItemId: 3} In the view, using ng-repeat ul.items li.item ng-repeat="item in items" ng-class="{selected: model.selectedItemId == item.id" div {{item.name}} I would like the selected item to be filtered or sorted to the top of the list while leaving remaining order in tact using AngularJS approach.
answer count: 1
tagged with: javascript
tagged with: angularjs-ng-repeat

http://stackoverflow.com/comment/39184060
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25167283
has text: I'm basically trying to mimic the html input type=file functionality, but with the file name coming from the URLs query string, not an input tag. Here is a stackoverflow question where the developer gave up and said it wasn't possible, but there isn't any confirmation from the community: https://stackoverflow.com/questions/15037729/javascript-make-a-file-object-with-file-path

http://stackoverflow.com/a/25212869
downvote count: 0
type: Answer
upvote count: 3
score: 3
has body: This one should work: var fields = /* whatever */; Fiber(function (fields) { // ... }).run(fields); If you want to read more about this look here.
answers question: http://stackoverflow.com/q/25212428
has comment: http://stackoverflow.com/comment/39268822
accepted answer of: http://stackoverflow.com/q/25212428
type: AcceptedAnswer

http://stackoverflow.com/a/25094929
score: -1
has body: you may use Caridi
answers question: http://stackoverflow.com/q/25094818
type: Answer
has comment: http://stackoverflow.com/comment/39049327
upvote count: 0
downvote count: 1

http://stackoverflow.com/a/25095449
has comment: http://stackoverflow.com/comment/39049936
upvote count: 3
has comment: http://stackoverflow.com/comment/39049845
accepted answer of: http://stackoverflow.com/q/25095354
score: 3
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25095354
has body: The onlick="javascript:audioPlayer('Band name', 'Album name', 'Track name');" code within the li is set up to provide these parameters, but it's not spelled correctly onlick should be onclick. And there is also a click event listener which is executed outside of that onclick function so it doesn't get any parameters. One solution would be to change your li's to use data-attributes: &lt;li class="song" data-band="Band name" data-album="Album name" data-track="Track name"&gt;&lt;/li&gt; then modify the click listener as follows: $('.song').click(function() { $('.footer').show('easeInExpo'); var data = $(this).data(); audioPlayer(data.band, data.album, data.track); });
type: Answer

http://stackoverflow.com/comment/39055436
type: QuestionComment
comment on: http://stackoverflow.com/q/25071805
score: 0
has text: Where is the original file located? I think you can use github.com/SheetJS/js-xlsx, which appears to be pure JS and HTML and can open and save files
type: Comment

http://stackoverflow.com/comment/39015966
comment on: http://stackoverflow.com/q/25077282
score: 0
type: Comment
type: QuestionComment
has text: As for the actual question itself: I don't want to jump the gun but this smells like a bug in the driver. I'm assuming there is an issue tracker for it somewhere, did you check if this is perhaps a known bug?

http://stackoverflow.com/q/25080314
score: 0
has title: How to style data-icons dynamically in jquery mobile 1.4.2?
linked to: http://stackoverflow.com/q/24578278
has answer: http://stackoverflow.com/a/25081607
type: UnansweredQuestion
has body: I have just updated my jquery mobile code from 1.3.1 to 1.4.2 in my Framework. The challenge I am facing is to style my data-icons conditionally based on developer's parameters. code for 1.3.1, myButton.find('.ui-icon').css('background-color',iconColor); in 1.4.2 jQuery uses pseudo class :after for the icons and since its not a part of the DOM it is inaccessible by JavaScript. I can achieve it(but don't want to do it for the performance) by changing the DOM of the icon element? Is there any other way?
has comment: http://stackoverflow.com/comment/39022037
type: Question
answer count: 1
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39172053
score: 0
comment on: http://stackoverflow.com/q/25161312
type: QuestionComment
has text: What is the bug with `$watch`..? The `ng-grid` library youre using is causing an error on the different angular version, what do you expect `$watch` to behave like? Do you know what's going wrong within the library and what it does on errors?
type: Comment

http://stackoverflow.com/q/25135598
tagged with: javascript
has body: I'm new to casperjs and playing around with it, but I can't get its evaluate() functionality to work. This is my example var casper = require('casper').create(); casper.echo('started...'); casper.start('http://www.google.de/'); casper.then(function() { this.echo(this.getTitle()); }); casper.then(function() { this.evaluate(function() { this.echo('test'); }); }); casper.run(); I'm executing it with casperjs sample.js After started... and Google nothing happens in console output. The closure function given in the evaluate method is not executed. I don't even get further informations by console with --verbose. What am I doing wrong?
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25136774
favorite count: 0
tagged with: casperjs
linked to: http://stackoverflow.com/q/24216243
has title: Message does not appear when called from evaluate method
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25136774
type: Question

http://stackoverflow.com/comment/39186495
type: AnswerComment
comment on: http://stackoverflow.com/a/25165398
score: 0
type: Comment
has text: But this doesn't solve my problem: I am not able to scroll the table with the scroll-bar of the window (which is always at the bottom of the window), it makes it necessary to scroll with the bar of the div, which is unfortunately at the bottom of the page...

http://stackoverflow.com/comment/39210922
type: AnswerComment
comment on: http://stackoverflow.com/a/25182058
type: Comment
has text: -1 I wouldn't do this since you're creating global javascript varaibles here, just because you can doesn't mean you should. I would open an endpoint and deliver this list as json.
score: 0

http://stackoverflow.com/comment/39239368
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25195580
has text: Please clarify "cannot work" for the people trying to help you. Since this is client-side code you should probably include any errors that are printed in the javascript console of your browser.

http://stackoverflow.com/a/25200353
has body: Simply create the circle and define its center using the same coordinates than your marker. // Define circle options var circleOptions = { strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35, map: map, center: latlng, radius: 20 }; // Add the circle to the map. var markerCircle = new google.maps.Circle(circleOptions); That's it. JSFiddle demo
has comment: http://stackoverflow.com/comment/39256096
answers question: http://stackoverflow.com/q/25192737
accepted answer of: http://stackoverflow.com/q/25192737
score: 3
downvote count: 0
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/39257702
has comment: http://stackoverflow.com/comment/39258942
has comment: http://stackoverflow.com/comment/39258976
type: Answer

http://stackoverflow.com/comment/39040132
has text: I don't see a CSS class for "absolute", which is the class you are adding when the user has scrolled past 50 px from the top. Also, you are only removing the 'fixed' class when the user scrolls to the top, but you never add it back in.
type: Comment
comment on: http://stackoverflow.com/q/25089603
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39151639
score: 0
type: Comment
has text: If I understood correctly you just wanted for "Subscribe" to show. I've updated the code: http://jsfiddle.net/r8M8w/11/
comment on: http://stackoverflow.com/a/25126606
type: AnswerComment

http://stackoverflow.com/comment/39286710
score: 0
type: AnswerComment
type: Comment
has text: how i can use this `&nbsp;&nbsp;&nbsp;&nbsp; Get Access Now! &nbsp; &nbsp; ` as a submit button to work?
comment on: http://stackoverflow.com/a/25221001

http://stackoverflow.com/comment/39117540
type: Comment
has text: Thank you so much. I'm getting the expected results. thanks again
comment on: http://stackoverflow.com/a/25114866
type: AnswerComment
score: 0

http://stackoverflow.com/a/25086068
answers question: http://stackoverflow.com/q/25085969
score: 0
has body: Have you tried to dispatch the events manually i.e. pure js var input = $('#plan_selection-1')[0]; var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); input.dispatchEvent(evt); Explanation: this is the way you would trigger the event in pure js. Also you don't need to recreate the mouse evet you can dispatch the same one multiple times to different elements so if this works, you can create one mouse event and just replace every $('#plan_selection-1').trigger("click") with $('#plan_selection-1')[0].dispatchEvent(evt) in order to get your code to work.
type: Answer

http://stackoverflow.com/comment/39021468
type: QuestionComment
has text: http://stackoverflow.com/questions/14849544/temporarily-disable-all-currently-active-jquery-event-handlers
score: 0
comment on: http://stackoverflow.com/q/25080120
type: Comment

http://stackoverflow.com/comment/39097839
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25121193
has text: Just use .helptext .arrow if you want to to apply to any element. You could use div.helptext .arrow, span.helptext .arrow if you want to constrain to DIV/SPAN's
score: 0

http://stackoverflow.com/comment/39129057
has text: arr2 = arr.slice(0); would create a copy instead of a reference
type: QuestionComment
comment on: http://stackoverflow.com/q/25137959
score: 0
type: Comment

video
tags question: http://stackoverflow.com/q/25221480
tags question: http://stackoverflow.com/q/25217965
type: Tag
tags question: http://stackoverflow.com/q/25149400
tags question: http://stackoverflow.com/q/25117464
tags question: http://stackoverflow.com/q/25146762
tags question: http://stackoverflow.com/q/25196441
tags question: http://stackoverflow.com/q/25159235
tags question: http://stackoverflow.com/q/25213030
tags question: http://stackoverflow.com/q/25213571
tags question: http://stackoverflow.com/q/25109188
tag name: video
tags question: http://stackoverflow.com/q/25226070
tags question: http://stackoverflow.com/q/25166047

twitter-bootstrap
tags question: http://stackoverflow.com/q/25186048
tags question: http://stackoverflow.com/q/25194622
tags question: http://stackoverflow.com/q/25143556
tags question: http://stackoverflow.com/q/25116635
tags question: http://stackoverflow.com/q/25089098
tags question: http://stackoverflow.com/q/25124222
tags question: http://stackoverflow.com/q/25147188
tags question: http://stackoverflow.com/q/25146223
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/25194584
tags question: http://stackoverflow.com/q/25095260
tags question: http://stackoverflow.com/q/25134705
tags question: http://stackoverflow.com/q/25182759
tags question: http://stackoverflow.com/q/25090334
tags question: http://stackoverflow.com/q/25146646
tags question: http://stackoverflow.com/q/25227051
tags question: http://stackoverflow.com/q/25081449
tags question: http://stackoverflow.com/q/25196155
tags question: http://stackoverflow.com/q/25178392
tags question: http://stackoverflow.com/q/25174972
tags question: http://stackoverflow.com/q/25217128
tags question: http://stackoverflow.com/q/25189263
tags question: http://stackoverflow.com/q/25225515
tags question: http://stackoverflow.com/q/25078385
tags question: http://stackoverflow.com/q/25150768
tags question: http://stackoverflow.com/q/25116059
tags question: http://stackoverflow.com/q/25103743
tags question: http://stackoverflow.com/q/25109115
tags question: http://stackoverflow.com/q/25094279
tags question: http://stackoverflow.com/q/25187556
tags question: http://stackoverflow.com/q/25126392
tags question: http://stackoverflow.com/q/25089813
tags question: http://stackoverflow.com/q/25095974
tags question: http://stackoverflow.com/q/25183200
tags question: http://stackoverflow.com/q/25189565
tags question: http://stackoverflow.com/q/25184073
tags question: http://stackoverflow.com/q/25149778
tags question: http://stackoverflow.com/q/25207528
tags question: http://stackoverflow.com/q/25150604
tags question: http://stackoverflow.com/q/25164494
tags question: http://stackoverflow.com/q/25080473
tags question: http://stackoverflow.com/q/25146550
tags question: http://stackoverflow.com/q/25114911
tags question: http://stackoverflow.com/q/25143083
tags question: http://stackoverflow.com/q/25203898
tags question: http://stackoverflow.com/q/25195755
tags question: http://stackoverflow.com/q/25142337
tags question: http://stackoverflow.com/q/25130391
tags question: http://stackoverflow.com/q/25196161
tags question: http://stackoverflow.com/q/25155236
tags question: http://stackoverflow.com/q/25129041
tags question: http://stackoverflow.com/q/25196588
tags question: http://stackoverflow.com/q/25085700
tags question: http://stackoverflow.com/q/25216283
tags question: http://stackoverflow.com/q/25083391
tags question: http://stackoverflow.com/q/25149978
tags question: http://stackoverflow.com/q/25191154
tags question: http://stackoverflow.com/q/25087883
tags question: http://stackoverflow.com/q/25097554
tags question: http://stackoverflow.com/q/25122596
tags question: http://stackoverflow.com/q/25116766
tags question: http://stackoverflow.com/q/25170282
type: Tag
tags question: http://stackoverflow.com/q/25144008
tags question: http://stackoverflow.com/q/25076069
tags question: http://stackoverflow.com/q/25221829
tags question: http://stackoverflow.com/q/25182520
tags question: http://stackoverflow.com/q/25156551
tags question: http://stackoverflow.com/q/25107297
tags question: http://stackoverflow.com/q/25118252
tags question: http://stackoverflow.com/q/25186506
tags question: http://stackoverflow.com/q/25221749
tags question: http://stackoverflow.com/q/25125901
tags question: http://stackoverflow.com/q/25220220
tags question: http://stackoverflow.com/q/25173306
tags question: http://stackoverflow.com/q/25144264
tags question: http://stackoverflow.com/q/25171629
tags question: http://stackoverflow.com/q/25124805
tags question: http://stackoverflow.com/q/25181030
tags question: http://stackoverflow.com/q/25110558

http://stackoverflow.com/q/25214206
tagged with: javascript
score: 1
favorite count: 0
tagged with: google-maps-api-3
has title: How to reattach google maps object to DOM?
type: UnansweredQuestion
upvote count: 1
has body: I'm not sure the correct lingo for this, so feel free to edit the title of this post if necessary. Basically, I'm creating a Google map object and adding a bunch of overlays, markers, etc. This is how I create the map: map = new google.maps.Map(document.getElementById("map"), mapOptions) But then, navigating through the side, I may land on a url where the map DOM element is destroyed, but the map object still exists in my web app. When I go back to the url that displays the map, I'd like to reattach the map to the DOM element as opposed to recreating the map. Any ideas how to do this? EDIT: To be more specific, I have a bunch of markers and overlays on the map Map = map: null markers:[] icons: {} init: -&gt; mapOptions = center: new google.maps.LatLng(34.0500, -118.2500) zoom: 9 @map = new google.maps.Map(document.getElementById("map"), mapOptions) @icons.default = path: google.maps.SymbolPath.CIRCLE strokeColor: '#DD0000' fillColor: '#DD0000' fillOpacity: 0.6 scale:8 strokeWeight: 2 addMarker: (post) -&gt; gLatLng = new google.maps.LatLng post.location.lat, post.location.lng gMarker = new google.maps.Marker position: gLatLng map: @map icon: @icons.default animation: google.maps.Animation.DROP marker = post: post gMarker: gMarker @markers.push marker I suppose I could create a new map and attach all the markers to the new map, but this seems unnecessary because I may have many other overlays on the map
has answer: http://stackoverflow.com/a/25220256
tagged with: dom
type: Question
answer count: 2
tagged with: google-maps
has answer: http://stackoverflow.com/a/25224458
downvote count: 0

http://stackoverflow.com/q/25182912
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25182964
score: 0
answer count: 1
favorite count: 0
tagged with: backbone.js
has title: How can I get Backbone data from nested JSON key?
has body: I use Backbone.js library, but my server return data in format: { "status":"OK", "message":"", "data":{"table":{"id":"4","name":"\u0421\u0442\u043e\u043b 1","tableType":"0","chairNumber":"0","posX":"0","posY":"0","width":"0","height":"0","angle":"0","plan":"0"}} } Backbone expected only data: {"table":{"id":"4","name":"\u0421\u0442\u043e\u043b 1","tableType":"0","chairNumber":"0","posX":"0","posY":"0","width":"0","height":"0","angle":"0","plan":"0"}} How can I use nested level data for backbone?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25182964

http://stackoverflow.com/q/25117363
has comment: http://stackoverflow.com/comment/39091696
type: AnsweredQuestion
has body: I have this code, and eberything works fine, and also add the active class like I want. However, it's possible when i click on href='#tab58', add active in the first three classes at once? If I click in I Want to add active in this first class at once If I click on another href, work fine (only that item add active class) Code EXAMPLE Here $(document).ready(function () { $('ul.prov').each(function(){ // For each set of tabs, we want to keep track of // which tab is active and it's associated content var $active, $content, $links = $(this).find('a'); // If the location.hash matches one of the links, use that as the active tab. // If no match is found, use the first link as the initial active tab. $active = $($links.filter('[href="'+location.hash+'"]')[0] || $links[0]); $active.addClass('active'); $content = $($active.attr('href')); // Hide the remaining content $links.not($active).each(function () { $($(this).attr('href')).hide(); }); // Bind the click event handler $(this).on('click', 'a', function(e){ // Make the old tab inactive. $active.removeClass('active'); $content.hide(); // Update the variables with the new link and content $active = $(this); $content = $($(this).attr('href')); // Make the tab active. $active.addClass('active'); $content.show(); // Prevent the anchor's default click action e.preventDefault(); }); }); TEXT1 TEXT2 TEXT3 TEXT4 TEXT4 TEXT4 TEXT4 I update this code My Updated code It's possible, when I click in "About MHG", "Workout Programs" OR "Fitness Tips". All of them , stay active at once. (you click in one of them, and all 3 stay active). I only want that for "About MHG", "Workout Programs" OR "Fitness Tips" Anyone could help me please? About MHG Workout Programs Fitness Tips Contact Us Read Our Blog
has comment: http://stackoverflow.com/comment/39095499
score: 1
has answer: http://stackoverflow.com/a/25136546
has title: Add 3 active class at once with javascript
upvote count: 1
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25122259
has comment: http://stackoverflow.com/comment/39091044
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25122259
accepted answer: http://stackoverflow.com/a/25136546
has comment: http://stackoverflow.com/comment/39090555
favorite count: 0
tagged with: tabs
has comment: http://stackoverflow.com/comment/39097968

http://stackoverflow.com/a/25203836
type: Answer
has body: You may use an Immediately-invoked function &lt;script&gt; (function() { eval(pnlTest.MoveSeparator('right')); }()); &lt;/script&gt; But please remember that eval is evil. You should try to avoid using it.
has comment: http://stackoverflow.com/comment/39251607
accepted answer of: http://stackoverflow.com/q/25203766
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25203766
has comment: http://stackoverflow.com/comment/39255612
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/61464491
comment on: http://stackoverflow.com/q/25081445
has text: Define "SSL certificate problems." Do you mean if the site is using a certificate not from a valid CA? Like a self-signed certificate for testing purposes? This would be site specific anyway and so all users would get same warning. Please clarify.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25167659
downvote count: 0
has comment: http://stackoverflow.com/comment/39184622
score: 3
accepted answer of: http://stackoverflow.com/q/25167257
upvote count: 3
answers question: http://stackoverflow.com/q/25167257
type: AcceptedAnswer
has body: input.name.toLowerCase().indexOf("auth")==-1 means that the input name does not include the character sequence auth at all (otherwise the index would be a non-negative number).
type: Answer

http://stackoverflow.com/a/25088060
has body: document.getElementByID should be document.getElementById. I'm not sure that's the only problem, but it surely is a problem.
has comment: http://stackoverflow.com/comment/39036473
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39036540
accepted answer of: http://stackoverflow.com/q/25088039
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25088039

http://stackoverflow.com/comment/39012644
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25075681
has text: you can't disable close button through javascript

http://stackoverflow.com/q/25138574
type: Question
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25138813
tagged with: javascript
has title: Running Node.js on a server
has body: So I have Node.js installed on my server. However, I'm a little confused about the next bit. I've spent a few hours researching about Node.js but I can't seem to find any clearly-laid out info on what I'm looking for. On my host PC, I can run Node.js through the command prompt and loading up localhost:port in the browser. This works fine. However, I can't figure out how this would translate onto using Node.js on my VPS. As I mentioned, it's installed. But how would I use physically use Node.js in my programs, and be able to access it on the pages when needed? I'm usually a PHP developer but I'm using this chance to dive into the world of Node and pick it up, and begin using it instead of PHP. Thank you for the help.
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39129957
accepted answer: http://stackoverflow.com/a/25138813
has comment: http://stackoverflow.com/comment/39130665

http://stackoverflow.com/comment/39238054
comment on: http://stackoverflow.com/q/25196643
has text: @CodeHater Oh wow ..yes it is the case..can you please tell me why it should not use `{{ }}` in this case, as I supposed to get values in jade template we need to add this
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25217461
downvote count: 0
has body: sku_output = "'" + txtArray.join("','") + "'" should give the output you search. You could make an Array extension for it Array.prototype.toSingleQuotedString = function () { return "'" + this.join("','") + "'"; } //=&gt; sku_output = txtArray.toSingleQuotedString(); Another angle is using Array.map (see MDN) sku_output = txtArray.map( function (a) { return "'"+a+"'"; } ).join(',');
type: Answer
answers question: http://stackoverflow.com/q/25217435
accepted answer of: http://stackoverflow.com/q/25217435
upvote count: 2
has comment: http://stackoverflow.com/comment/39277785
score: 2
type: AcceptedAnswer

angular-strap
tag name: angular-strap
tags question: http://stackoverflow.com/q/25218896
tags question: http://stackoverflow.com/q/25132657
type: Tag
tags question: http://stackoverflow.com/q/25215876
tags question: http://stackoverflow.com/q/25227087
tags question: http://stackoverflow.com/q/25227719

http://stackoverflow.com/q/25173781
has body: I have to button for click on ID that each ID id get values from database to show and hide it by i using fadeIn and fadeOut.When I click on button HIDE, I want it hide and show the button SHOW , Than I click button SHOW it's hide and show button HIDE back. This is my HTML code: &lt;tr&gt; &lt;td&gt;&lt;button value ="HIDE" onclick="morefild(this);" id="show-more&lt;?php echo $row_com_info['com_tin'];?&gt;" /&gt;&lt;button value ="SHOW" id ="hid-detail&lt;?php echo $row_com_info['com_tin'];?&gt;" style="display:none" onclick="hidefild(this);" /&gt; &lt;/td&gt; &lt;/tr&gt; This is my JS: function morefild(item){ var ids = $(item).attr("id"); $('#'+ids).fadeOut(); $('#hid-detail100077188').fadeIn(); } function hidefild(idhid){ var idhid = $(idhid).attr("id"); $('#'+idhid).fadeOut(); $('#show-more100077188').fadeIn(); } *Note: My code can run for static value i pass to it but i want it work all each row. Please help me to correct it, Any command if you don't understand what i mean, thanks !!
has title: How to pass two variables from two ID on click event
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25173859
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39196018
type: UnansweredQuestion
score: -3
tagged with: php
downvote count: 4
type: Question
has comment: http://stackoverflow.com/comment/39196089
has comment: http://stackoverflow.com/comment/39196058

http://stackoverflow.com/comment/39266115
type: AnswerComment
has text: Never knew about slice, nice!
comment on: http://stackoverflow.com/a/25211603
score: 0
type: Comment

http://stackoverflow.com/comment/39099517
type: Comment
score: 0
has text: Ah ok, So how do I reliably test for a valid date in UK format?!
type: AnswerComment
comment on: http://stackoverflow.com/a/25122070

http://stackoverflow.com/comment/39078977
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25110323
has text: Validation I'm using is jquery validate.
score: 0

http://stackoverflow.com/q/25104179
downvote count: 0
tagged with: webrtc
has body: I am working with Asterisk 12 and sip.js . I am trying to call chrome browser from zoiper (android phone ) my pears are [6004] context=default secret=6004 type=friend host=dynamic [1060] ; This will be WebRTC client type=friend username=1060 ; The Auth user for SIP.js host=dynamic ; Allows any host to register secret=1060 ; The SIP Password for SIP.js encryption=yes ; Tell Asterisk to use encryption for this peer avpf=yes ; Tell Asterisk to use AVPF for this peer icesupport=yes ; Tell Asterisk to use ICE for this peer context=default ; Tell Asterisk which context to use when this peer is dialing directmedia=no ; Asterisk will relay media for this peer transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11 videosupport=no nat=force_rport,comedia and My JS code is var session; var mediaStream; var audio = new Audio('ring.mp3'); var config = { // Replace this IP address with your Asterisk IP address uri: 'sip:1060@XXX:9091', // Replace this IP address with your Asterisk IP address, // and replace the port with your Asterisk port from the http.conf file ws_servers: 'ws://XXX:9092/ws', // Replace this with the username from your sip.conf file authorizationUser: '1060', // Replace this with the password from your sip.conf file password: '1060', // HackIpInContact for Asterisk hackIpInContact: true }; var ua = new SIP.UA(config); ua.on('invite', function(incomingSession) { session = incomingSession; audio.play(); prepareToanswer(); }); I can get invite but when I accept it , i can not get audio stream. Can anybody help me?
favorite count: 0
has comment: http://stackoverflow.com/comment/39161475
type: UnansweredQuestion
score: 3
has title: Asterisk sip.js remote call
has answer: http://stackoverflow.com/a/26934586
upvote count: 3
tagged with: asterisk
type: Question
tagged with: sip
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/25218683
has comment: http://stackoverflow.com/comment/39280729
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39280658
tagged with: php
has comment: http://stackoverflow.com/comment/39280385
has body: I was trying to check for a user in the database through ajax. On success it should return a link with the username as the name of the link. Earlier without the link portion everything was working fine but now it displays 'undefined'. Also i know that I am using deprecated mysql_* functions and my code is prone to sql injection, but my concern is the above mentioned problem. This is the php code which is returned through AJAX. &lt;?php header('Content-Type: text/xml'); echo '&lt;?xml version="1.0" encoding="UTF-8" standalone="yes" ?&gt;'; require_once("includes/connection.php"); echo '&lt;response&gt;'; $user=$_GET['user']; if($user==""){ echo "type the username"; } else{ $query="SELECT email_id FROM users WHERE email_id='{$user}' "; $user_result = mysql_query($query,$connection); if(mysql_num_rows($user_result)&gt;0){ echo "&lt;a href='friend.php?friend_id=1'&gt; {$user} &lt;/a&gt; exists"; } else{ echo "no such user as {$user} exists"; } } echo '&lt;/response&gt;'; ?&gt; I have not included the function creating the xmlHTTP object but this is the rest of the AJAX code: function start() { if(xmlHttp){ try{ if(xmlHttp.readyState==0 || xmlHttp.readyState==4) { user= encodeURIComponent(document.getElementById("user_input").value); xmlHttp.open("GET","search.php?user="+user,true); xmlHttp.onreadystatechange = mainFunctionHandler; xmlHttp.send(null); }else{ setTimeout('start()',1000); } }catch(e){ alert(e.toString()); } } } function mainFunctionHandler() { if(xmlHttp.readyState==4){ if(xmlHttp.status==200){ xmlResponse = xmlHttp.responseXML; xmlDocumentElement = xmlResponse.documentElement; message = xmlDocumentElement.firstChild.data; document.getElementById("divD").innerHTML=message; setTimeout('start()',1000); }else{ alert("something went wrong"); } } }
has title: Sending link through AJAX
type: Question
answer count: 1
tagged with: javascript
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39280387
has answer: http://stackoverflow.com/a/25219300

http://stackoverflow.com/a/25225330
has comment: http://stackoverflow.com/comment/39299532
has comment: http://stackoverflow.com/comment/39299639
downvote count: 0
score: 1
upvote count: 1
type: Answer
has body: I feel like the { } in the params should be [ ] instead. The g:remoteFunction is a GSP tag and the params should be a map. &lt;g:remoteFunction controller="customer" action="saveModifiedIndividualRecord" params='[uniqueId: uniqueId, secondaryId: secondaryId, yellowIssuesRemoved: removedYellowIssues, redIssuesRemoved: removedRedIssues]'/&gt; However, you really shouldn't use that tag (I think it is deprecated in the latest versions). You should just do an a post via jQuery: $.post("${g.createLink(action: 'saveModifiedIndividualRecord')", {uniqueId: uniqueId, ...}, function(result) { ... });
has comment: http://stackoverflow.com/comment/39336864
answers question: http://stackoverflow.com/q/25222727

http://stackoverflow.com/q/25206900
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/25207486
upvote count: 2
type: UnansweredQuestion
has title: How to detect when content of a span element changes
score: 2
tagged with: dom
has answer: http://stackoverflow.com/a/25206971
linked to: http://stackoverflow.com/q/7690817
type: Question
has answer: http://stackoverflow.com/a/25207246
has comment: http://stackoverflow.com/comment/39258550
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: Lets say I have span as follows content before change I need an event something like $('#myId').contentChanged(function(){ alert( 'New content: ' + $(this).text() ) }) So when I change the content of the span as follows $('#myId').text('content after change') the contentChanged event above fires. It should be rather efficient performance wise, because in my case there could be hundreds of them being monitored.

http://stackoverflow.com/q/25135626
upvote count: 0
has comment: http://stackoverflow.com/comment/39124851
has answer: http://stackoverflow.com/a/25139436
has comment: http://stackoverflow.com/comment/39124886
has comment: http://stackoverflow.com/comment/39124621
has comment: http://stackoverflow.com/comment/39124794
type: Question
has title: JavaScript disabled on Firefox meaning my buttons don't work, is there a way to write the buttons such that they will work?
answer count: 2
has comment: http://stackoverflow.com/comment/39131570
has comment: http://stackoverflow.com/comment/39124625
has body: So I have written a basic page which has buttons: &lt;button type="button" onclick="minus()"&gt; &lt;/button&gt; with the script: function minus() { if (&lt;?php echo $number ?&gt; &gt; 1){ var num = &lt;?php echo $number; ?&gt; - 1; var number=num; window.location.href = "page2.php?w1=" + number;} }; So this just subtracts 1 off of a PHP variable and it works perfectly well in Chrome, IE and Safari, but in Firefox it doesn't work at all. Is this a security thing is this code particularly insecure?. Is there any way in which I can write a button to change this PHP variable without using JavaScript as to make it work on Chrome, IE, Safari + Firefox? Many thanks
score: -2
tagged with: firefox
linked to: http://stackoverflow.com/q/8379058
tagged with: button
tagged with: javascript
has comment: http://stackoverflow.com/comment/39124742
linked to: http://stackoverflow.com/q/275092
downvote count: 2
has comment: http://stackoverflow.com/comment/39124861
has comment: http://stackoverflow.com/comment/39126297
has comment: http://stackoverflow.com/comment/39125063
favorite count: 0
has answer: http://stackoverflow.com/a/25138567
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39124623

http://stackoverflow.com/q/25094581
has body: I am using jQuery but its not working in my webpage. jquery-1.10.2.min.js is used for TAB and jquery.lightbox-0.5.js" is used for Photo gallery with jquery.js scripting file. Now though it shows the tab buttons and the thumbnails of the gallery, when I click on the tabs the tab doesn't work and photo gallery doesn't work too. &lt;script type="text/javascript" src="js/jquery-1.10.2.min.js"&gt;&lt;/script&gt; &lt;script src="js/jquery.opacityrollover.js" type="text/javascript"&gt;&lt;/script&gt; &lt;!--[if lt IE 7]&gt; &lt;div style=' clear: both; text-align:center; position: relative;'&gt; &lt;a href="http://www.microsoft.com/windows/internet-explorer/default.aspx?ocid=ie6_countdown_bannercode"&gt;&lt;img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" alt="" /&gt;&lt;/a&gt; &lt;/div&gt; &lt;![endif]--&gt; &lt;!--[if lt IE 9]&gt; &lt;script type="text/javascript" src="js/html5.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="css/ie.css" type="text/css" media="screen"&gt; &lt;![endif]--&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt; &lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery.lightbox-0.5.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" /&gt; &lt;!-- / fim dos arquivos utilizados pelo jQuery lightBox plugin --&gt; &lt;!-- Ativando o jQuery lightBox plugin --&gt; &lt;script type="text/javascript"&gt; $(function() { $('#photog a').lightBox(); }); &lt;/script&gt; &lt;style type="text/css"&gt; /* jQuery lightBox plugin - Gallery style */ &lt;/head&gt; &lt;body id="page1"&gt; &lt;!--==============================header=================================--&gt; &lt;header&gt; &lt;div class="row-2"&gt; &lt;div class="main"&gt; &lt;div class="container_12"&gt; &lt;div class="grid_9"&gt; &lt;div id="logom"&gt; &lt;img src="images/logo-iie.png" width="43…
has comment: http://stackoverflow.com/comment/39048325
downvote count: 2
has comment: http://stackoverflow.com/comment/39048329
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39048238
has answer: http://stackoverflow.com/a/25094629
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39048240
type: UnansweredQuestion
has title: jQuery is not working in webpage?

forms
tags question: http://stackoverflow.com/q/25104514
tags question: http://stackoverflow.com/q/25193082
tags question: http://stackoverflow.com/q/25139922
tags question: http://stackoverflow.com/q/25221749
tags question: http://stackoverflow.com/q/25147507
tags question: http://stackoverflow.com/q/25221674
tags question: http://stackoverflow.com/q/25177742
tags question: http://stackoverflow.com/q/25169974
tags question: http://stackoverflow.com/q/25118481
tags question: http://stackoverflow.com/q/25143988
type: Tag
tags question: http://stackoverflow.com/q/25214916
tags question: http://stackoverflow.com/q/25082279
tags question: http://stackoverflow.com/q/25215864
tags question: http://stackoverflow.com/q/25179722
tags question: http://stackoverflow.com/q/25153706
tags question: http://stackoverflow.com/q/25228386
tags question: http://stackoverflow.com/q/25224120
tags question: http://stackoverflow.com/q/25224653
tags question: http://stackoverflow.com/q/25077775
tags question: http://stackoverflow.com/q/25208481
tags question: http://stackoverflow.com/q/25079730
tags question: http://stackoverflow.com/q/25170749
tags question: http://stackoverflow.com/q/25215757
tags question: http://stackoverflow.com/q/25087908
tags question: http://stackoverflow.com/q/25225429
tags question: http://stackoverflow.com/q/25163030
tags question: http://stackoverflow.com/q/25207028
tags question: http://stackoverflow.com/q/25119704
tags question: http://stackoverflow.com/q/25108896
tags question: http://stackoverflow.com/q/25128527
tags question: http://stackoverflow.com/q/25104137
tags question: http://stackoverflow.com/q/25177140
tags question: http://stackoverflow.com/q/25218565
tags question: http://stackoverflow.com/q/25122340
tags question: http://stackoverflow.com/q/25216543
tags question: http://stackoverflow.com/q/25143480
tags question: http://stackoverflow.com/q/25084390
tags question: http://stackoverflow.com/q/25096552
tags question: http://stackoverflow.com/q/25072961
tags question: http://stackoverflow.com/q/25214115
tags question: http://stackoverflow.com/q/25198398
tags question: http://stackoverflow.com/q/25206802
tags question: http://stackoverflow.com/q/25142061
tags question: http://stackoverflow.com/q/25186377
tags question: http://stackoverflow.com/q/25151098
tags question: http://stackoverflow.com/q/25214650
tags question: http://stackoverflow.com/q/25208699
tags question: http://stackoverflow.com/q/25079054
tags question: http://stackoverflow.com/q/25186071
tags question: http://stackoverflow.com/q/25222715
tags question: http://stackoverflow.com/q/25152867
tags question: http://stackoverflow.com/q/25195755
tags question: http://stackoverflow.com/q/25096125
tags question: http://stackoverflow.com/q/25089199
tags question: http://stackoverflow.com/q/25183953
tags question: http://stackoverflow.com/q/25144816
tags question: http://stackoverflow.com/q/25204834
tags question: http://stackoverflow.com/q/25163978
tags question: http://stackoverflow.com/q/25228672
tags question: http://stackoverflow.com/q/25206102
tags question: http://stackoverflow.com/q/25101785
tags question: http://stackoverflow.com/q/25118325
tags question: http://stackoverflow.com/q/25122978
tags question: http://stackoverflow.com/q/25172979
tags question: http://stackoverflow.com/q/25221297
tags question: http://stackoverflow.com/q/25110596
tags question: http://stackoverflow.com/q/25097323
tags question: http://stackoverflow.com/q/25189195
tags question: http://stackoverflow.com/q/25220277
tag name: forms
tags question: http://stackoverflow.com/q/25188149
tags question: http://stackoverflow.com/q/25117604
tags question: http://stackoverflow.com/q/25215243
tags question: http://stackoverflow.com/q/25095877
tags question: http://stackoverflow.com/q/25192111
tags question: http://stackoverflow.com/q/25218664
tags question: http://stackoverflow.com/q/25192274
tags question: http://stackoverflow.com/q/25094763
tags question: http://stackoverflow.com/q/25208284

http://stackoverflow.com/comment/39214868
comment on: http://stackoverflow.com/a/25144975
has text: http://jsbin.com/gaxewatu/22/edit?html,js,output there's the new code. You use the function test() and then add onkeyup="test()" to the input you want to carry this method on.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25125597
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39108226
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25125255
has body: my $_pCombos = [ [{row =&gt; 9,col =&gt; 0},{row =&gt; 1,col =&gt; 9},{row =&gt; 1,col =&gt; 2},{row =&gt; 1,col =&gt; 3},{row =&gt; 1,col =&gt; 4}], [{row =&gt; 0,col =&gt; 0},{row =&gt; 0,col =&gt; 1},{row =&gt; 0,col =&gt; 2},{row =&gt; 0,col =&gt; 3},{row =&gt; 0,col =&gt; 4}], [{row =&gt; 2,col =&gt; 0},{row =&gt; 2,col =&gt; 1},{row =&gt; 2,col =&gt; 2},{row =&gt; 2,col =&gt; 3},{row =&gt; 2,col =&gt; 4}], [{row =&gt; 0,col =&gt; 0},{row =&gt; 1,col =&gt; 1},{row =&gt; 2,col =&gt; 2},{row =&gt; 1,col =&gt; 3},{row =&gt; 0,col =&gt; 4}], ]; print $_pCombos-&gt;[0][0]{row}, "\n"; print $_pCombos-&gt;[0][1]{col}, "\n"; will print 9 9 if you want to maintain the javascript syntax, you can use json, like this: use JSON::XS; my $_pCombos_JSON_normalized = &lt;&lt;'END'; [ [{"row":9,"col":0},{"row":1,"col":9},{"row":1,"col":2},{"row":1,"col":3},{"row":1,"col":4}], [{"row":0,"col":0},{"row":0,"col":1},{"row":0,"col":2},{"row":0,"col":3},{"row":0,"col":4}], [{"row":2,"col":0},{"row":2,"col":1},{"row":2,"col":2},{"row":2,"col":3},{"row":2,"col":4}], [{"row":0,"col":0},{"row":1,"col":1},{"row":2,"col":2},{"row":1,"col":3},{"row":0,"col":4}] ] END my $_pCombos = decode_json($_pCombos_JSON_normalized); print $_pCombos-&gt;[0][0]{row}, "\n"; print $_pCombos-&gt;[0][1]{col}, "\n"; will also print 9 9
answers question: http://stackoverflow.com/q/25125255

http://stackoverflow.com/q/25138116
tagged with: profiling
answer count: 1
tagged with: node.js
has title: node.js: tools/linux-tick-processor v8.log does not work
type: UnansweredQuestion
tagged with: v8
has answer: http://stackoverflow.com/a/26262082
tagged with: javascript
type: Question
score: 0
has body: Does anyone know why "node --prof test.js" not work ? What I did are followings: git clone https://github.com/joyent/node.git ./configure make sudo make install cd node/deps/v8/ make dependencies make native vim test.js node --prof test.js tools/linux-tick-processor v8.log The results are: Statistical profiling result from v8.log, (0 ticks, 0 unaccounted, 0 excluded).

http://stackoverflow.com/a/25150617
answers question: http://stackoverflow.com/q/25148198
upvote count: 4
type: Answer
has comment: http://stackoverflow.com/comment/54271783
has body: You cannot change the data type of a column once it has been created. There are two ways around this problem: either add a new column to the DataTable of the appropriate type, fill it with data, and delete the old column; or use a DataView to convert the strings to numbers on the fly. Here's how you would add a new column: // assumes you want to convert column 0 of DataTable "data" to type "number" // insert a new column at the desired index; this bumps all columns at or after the chosen index up by 1 (so column 0 becomes column 1, 1 becomes 2, etc) data.insertColumn(0, 'number', data.getColumnLabel(0)); // copy values from column 1 (old column 0) to column 0, converted to numbers for (var i = 0; i &lt; data.getNumberOfRows(); i++) { var val = data.getValue(i, 1); if (val != '' &amp;&amp; val != null) { data.setValue(i, 0, new Number(val).valueOf()); } } // remove column 1 (the old column 0) data.removeColumn(1); And here's an example of using a DataView: // convert the first column to type "number" var columns = [{ type: 'number', label: data.getColumnLabel(0), calc: function (dt, row) { var val = dt.getValue(row, 1); return (val != '' &amp;&amp; val != null) ?new Number(val).valueOf() : null; } }]; // fill in the rest of the columns for (var i = 1; i &lt; data.getNumberOfColumns(); i++) { columns.push(i); } var view = new google.visualization.DataView(data); view.setColumns(columns); You would draw your visualization(s) using the DataView instead of the DataTable.
downvote count: 0
score: 4

http://stackoverflow.com/a/25141693
type: Answer
has body: You could add logic to the handler to store the download progress in the session and then create another ajax method to query for that status from the download page on a timer. When the download status changes to "complete" your ajax method will be able to trigger the popup.
answers question: http://stackoverflow.com/q/25141622
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25141622

http://stackoverflow.com/comment/39295286
has text: Okay thank you for this. So I can't use the "default" buttons and bind something to them without to create new template tag?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25227272
type: AnswerComment

http://stackoverflow.com/a/25122750
has comment: http://stackoverflow.com/comment/39100920
answers question: http://stackoverflow.com/q/25122586
has comment: http://stackoverflow.com/comment/39121943
has body: I might be missing something, but it seems a much simpler approach is to include the script via a script tag, as in &lt;script src="http://test.localhost/blabla.js"&gt;&lt;/script&gt; But actually you probably should copy the script's contents so that you can include it from your own server. And since you're making the XHR call immediately, you might even include the said script's contents in your page for fast loading times.
score: 0
has comment: http://stackoverflow.com/comment/39100875
type: Answer

http://stackoverflow.com/comment/71840472
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25269661
type: Comment
has text: If anything, the error message was super unhelpful. It's quite possible that it was a server error that lasted 2 days, but i'd be surprised. I'll add it to the tracker if I run into it again!

http://stackoverflow.com/comment/39129252
comment on: http://stackoverflow.com/q/25138102
type: Comment
type: QuestionComment
has text: you have to add the element via JavaScript, for example with jquery append method. You have tu put the script code in the success function in the Ajax request.
score: 0

http://stackoverflow.com/a/25204748
score: 1
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25204575
has body: try to JSON-decode the posted data uuids = json.loads(request.POST.get('uuids')) that is if you loaded some json module before, e.g. import simplejson as json

http://stackoverflow.com/q/25216111
has answer: http://stackoverflow.com/a/25216170
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25216303
type: Question
tagged with: function
possible better answer: http://stackoverflow.com/a/25216170
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25216497
tagged with: jquery
score: 0
answer count: 3
has body: I want to create a function for showing pop or status when user typing something in field, I want to do it without submitting form, I have try following function but its not working properly can anyone let me know where the problem..........? Javascript &lt;script type="text/javascript"&gt; document.getElementById('confirm').addEventListener('change', checkFile, false); approveletter.addEventListener('change', checkFile, false); function checkFile(e) { if ($('#confirm').val().length &gt; 0) { alert("txt"); } } &lt;/script&gt; HTML &lt;input type="text" name="text" id="confirm"&gt;
tagged with: validation
has answer: http://stackoverflow.com/a/25216497
has title: How can show pop when user typing using javascript?

http://stackoverflow.com/comment/39028884
score: 0
type: AnswerComment
has text: the _renderItem is working well as i try using static text and it was displayed well... and i cleared the cache also but nothing solve the issue. one thing is that i am using a web template from this link usman.it/free-responsive-admin-template/ but i do not think the problem is inside the templete
comment on: http://stackoverflow.com/a/25079840
type: Comment

http://stackoverflow.com/q/25216747
answer count: 1
downvote count: 0
has title: How to make toJSON wait for find before returning the object in Sails.js?
favorite count: 0
has body: I'm running a find inside the following toJSON in the model but it return returns the object before the find completes. How can I wait until the find completes before firing the return? toJSON: function() { var obj = this.toObject(); Comment.find({ postID: obj.id }).limit(2).sort('createdAt DESC').exec(function(err, comments) { obj.comments = comments; //this is not reflected in return obj if (obj.isTrue) { //yes } else { //no } }); return obj; // obj.comments not reflected :( } The goal is for obj.comments to be in obj when it is returned.
tagged with: node.js
type: AnsweredQuestion
score: 3
type: Question
tagged with: sails.js
tagged with: javascript
tagged with: express
upvote count: 3
has answer: http://stackoverflow.com/a/26311301
accepted answer: http://stackoverflow.com/a/26311301

http://stackoverflow.com/comment/39422925
comment on: http://stackoverflow.com/a/25165945
type: AnswerComment
score: 0
type: Comment
has text: I confirmed your answer. I will have to look up event listeners. Do you have a link that might be close to what I'm looking to do?

http://stackoverflow.com/q/25181877
has title: Can we zoom to a KML placemark object using the KML object ID in google earth plugin API?
favorite count: 0
tagged with: google-earth-plugin
accepted answer: http://stackoverflow.com/a/25224542
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25224542
tagged with: javascript
has body: Can we zoom to a KML placemark object's (polygon/line/point) extent using the object ID in google earth plugin API? We can change the style of the KML object using it's ID, in the same way is it possible to zoom to that KML object's extent? Regards, Shiva

http://stackoverflow.com/a/25135779
has body: You need to define a center point when creating the map object. Do not use a &lt;form&gt; and a submit button but bind an event listener to your button. For example: var button = document.getElementById("panButton"); button.addEventListener("click", pan); Working example: JSFiddle demo Hope this helps.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25131997
accepted answer of: http://stackoverflow.com/q/25131997
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/comment/39290372
has text: |What version of jquery are you using?
comment on: http://stackoverflow.com/q/25224666
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39177285
has text: @Aragon0 you're 100% right. But with low rep users I'm often inclined to give just answers. I'll edit my answer and refer them to your answer. But my answer is still valid if people ever want to validate an alphanumeric string of 6-10 characters.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25163597
type: AnswerComment

http://stackoverflow.com/comment/39091044
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25117363
has text: yes, I have this example http://jsfiddle.net/XA3Ua/

http://stackoverflow.com/comment/39078768
comment on: http://stackoverflow.com/a/25110289
type: AnswerComment
has text: Thank you again, I used (myVal = newVal.Value); works great.
score: 0
type: Comment

http://stackoverflow.com/q/25120451
tagged with: ajax
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25120600
accepted answer: http://stackoverflow.com/a/25120600
possible better answer: http://stackoverflow.com/a/25120613
has body: Using ajax calls we have the ability to perform actions after it hase run using the done()-function $.ajax({ ..... }) .done ( function(data) { ..... (manipulate data using $.ajax result }) Right now I have an if-else clause with an ajax-embedded in it. if (some condition) { //Standard HTML-element/tag manipulation $("#obj1").append('&lt;a class="trigger"&gt;Click Me &lt;/trigger&gt;'); $(".SomeClass").remove(); ...... } else { //HTML-element/tag manipulation after $.ajax-call $.ajax({ //perform ajax-call }) .done(function (data) { $("#obj1").append('&lt;a class="trigger"&gt;' data.someProp '&lt;/trigger&gt;'); }) } //Perform actions: Part2 $(".trigger").Click(function() { Somefunction() }); I was wondering if Jquery offers a way to make the execution of the functions in Part2 halt until all actions inside the if-else are completed (including the $.ajax)?. I can't seem to find anything around this using google (most likely i'm just using the wrong keywords). I hope my question is understandable for everyone. If you need further information, don't hesitate to comment.
has title: JQuery: Done() after if-else
has comment: http://stackoverflow.com/comment/39096509
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25120613
type: Question
has answer: http://stackoverflow.com/a/25121051
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39096519
has comment: http://stackoverflow.com/comment/39096538

http://stackoverflow.com/comment/39083547
type: QuestionComment
has text: Possible duplicate of http://stackoverflow.com/questions/13343566/set-select-option-selected-by-value
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25113544

http://stackoverflow.com/comment/39189439
has text: After some thought, I think the best way to do this is to create a new object with all the properties of `chartOptions` and an additional property `chartTitle`. Then I can do a `watchCollection` on that object. If `chartOptions` has many properties or is updated often this might not be performant, but I think it works. I'll leave the question up in case someone can think of something better.
type: AnswerComment
comment on: http://stackoverflow.com/a/25170118
score: 0
type: Comment

http://stackoverflow.com/comment/39155102
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25151839
has text: Thanks for quick reply. I tried this... but nothing changed.

http://stackoverflow.com/a/25101987
accepted answer of: http://stackoverflow.com/q/25101356
has body: Is there a reason you can't use the events already provided by the slider? There's no click event exposed, but surely the change or stop events will work? http://jsfiddle.net/pabo/d23X2/ $("#slider-1").slider({ range: true, min: 0, max: 500, values: [0, 0], slide: function (event, ui) { $("#priceA").val("$" + ui.values[0] + " - $" + ui.values[1]); }, stop: function (event, ui) { }, change: function (event, ui) { myFunction(); } }); function myFunction() { alert("Called"); }
type: AcceptedAnswer
score: 0
answers question: http://stackoverflow.com/q/25101356
type: Answer

http://stackoverflow.com/q/25161022
has answer: http://stackoverflow.com/a/25161294
has comment: http://stackoverflow.com/comment/41592534
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41601490
has body: I have created a project with index.html with certain links to other pages. My routing works as intended but I'm wondering what's the best approach to go with when it comes to links on other pages. To clarify it: My index.html page has routes: Feed Bblog Marketplace Recruiting Adverts Now what I'm curious about is how do I for example route links inside these pages. For example, my Bblog page has tabs which I want to be opened inside the same page. Now for example whenever I click some tab link, it redirects me to my index.html since my .otherwise route is set to /.
type: Question
has title: Angular JS Routing - Links inside SPA
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/41605193
score: 0
accepted answer: http://stackoverflow.com/a/25161294
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs

http://stackoverflow.com/q/25072208
has body: I have to match a string that is not inside tags. I am working on projects that I don't have control over the back-end html rendering code. What I need to do is add a hover functionality for multiple dynamic words. I created a script that will look for those key words in specific elements and add their description in title tags for the hover. My problem is that if other keywords are found in other keyword's title tags. My JS: var str = 'match match match'; str.replace( /match/gim, 'ok' ); I do not want the "match" word in the title attribute to be replaced, my desired result is: 'ok ok ok' how can I do that with Javascript? I tried the expression below but it's not working for me: ^((?!(".+")match)*$
has comment: http://stackoverflow.com/comment/39006651
accepted answer: http://stackoverflow.com/a/25072271
has comment: http://stackoverflow.com/comment/39006507
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39006679
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25072271
score: 0
has title: Javascript regular expression prevent matching inside tags
answer count: 1

http://stackoverflow.com/q/25165273
accepted answer: http://stackoverflow.com/a/25165345
type: AnsweredQuestion
has title: How do I include an external JS lib in a meteor app?
type: Question
has answer: http://stackoverflow.com/a/25165345
tagged with: javascript
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25165454
tagged with: jquery
tagged with: meteor
has answer: http://stackoverflow.com/a/25165454
has body: I have a basic bootstrap page set up using the Meteor JS framework. I've followed this tutorial: http://www.manuel-schoebel.com/blog/meteorjs-and-twitter-bootstrap---the-right-way I want to use Jcrop (an external JS lib): http://deepliquid.com/content/Jcrop.html In the bootstrap file I only need to include the body element and the content. How do I include this JS source, and any other required lib? Usually I'd just reference the lib in the html page. Does Meteor magically handle this in some way? Thanks again in advance for any pointers.
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25137725
tagged with: browser
score: 0
answer count: 1
has title: Odd behavior on playing java script in a html using web browser control after download a file from the web service
tagged with: windows-phone
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25138107
has body: For last 2-3 weeks i am looking for a reason behind my problem. But unfortunately i could not found anything needed. It is a Windows Phone Book reader application i am creating using c# and xaml . For that i need to download book file from the web service and extract and save audio,image and html data from it. All data are stored in local folder. The main functionality is that we can see highlighting of texts with the corresponding audio plays. And the high lighting functionality is done by java script function. My problem is that the highlighting text is delaying some times and it doesn't meet with it's audio. And this is happening on the session where the book data downloaded from network or where download operation took place. Is there anything related to network download operation can prevent/delay the execution of java script function ? Can network download operation makes any impact on Web browser control ?
tagged with: windows-phone-8
type: Question
tagged with: c#
tagged with: javascript

http://stackoverflow.com/a/25084429
type: Answer
has comment: http://stackoverflow.com/comment/39030813
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25084297
upvote count: 1
has body: try this: onclick="rTxt(this.id)" you are passing the Element object to function instead of its id
has comment: http://stackoverflow.com/comment/39032347

http://stackoverflow.com/a/35218121
downvote count: 1
has body: render-if is a light weight function that will render an element if a condition is satisfied As an in-line expression class MyComponent extends Component { render() { return ( {renderIf(1 + 2 === 3)( The universe is working )} ); } } As a named function class MyComponent extends Component { render() { const ifTheUniverseIsWorking = renderIf(1 + 2 === 3); return ( {ifTheUniverseIsWorking( The universe is still wroking )} ) } } As a composed function const ifEven = number => renderIf(number % 2 === 0); const ifOdd = number => renderIf(number % 2 !== 0); class MyComponent extends Component { render() { return ( {ifEven(this.props.count)( {this.props.count} is even )} {ifOdd(this.props.count)( {this.props.count} is odd )} ); } }
answers question: http://stackoverflow.com/q/25224793
score: 0
type: Answer
upvote count: 1

http://stackoverflow.com/a/25143495
downvote count: 1
has comment: http://stackoverflow.com/comment/39150633
type: Answer
has body: Instead browser cookies you can use "flash cookies" - SharedObject. It is really simple and have mechanic similar to browser cookies, but stored in flash local storage. UPDATE Example: var mySo:SharedObject = SharedObject.getLocal("host"); // get saved SO with name "host" if exists or create new if doesn't exist mySo.data = {someProperty: "someData"}; // writing some data var flushResult:Object = mySo.flush(); // saving data in local storage ... var savedSO:SharedObject = SharedObject.getLocal("host"); trace(savedSO.data.someProperty); // output: someData
answers question: http://stackoverflow.com/q/25143349
score: 0
upvote count: 1

date
tags question: http://stackoverflow.com/q/25113909
tags question: http://stackoverflow.com/q/25151955
tags question: http://stackoverflow.com/q/25082060
tags question: http://stackoverflow.com/q/25089333
tag name: date
tags question: http://stackoverflow.com/q/25134031
tags question: http://stackoverflow.com/q/25179377
tags question: http://stackoverflow.com/q/25150570
tags question: http://stackoverflow.com/q/25140347
tags question: http://stackoverflow.com/q/25117832
tags question: http://stackoverflow.com/q/25183363
tags question: http://stackoverflow.com/q/25166306
type: Tag
tags question: http://stackoverflow.com/q/25075300
tags question: http://stackoverflow.com/q/25185505
tags question: http://stackoverflow.com/q/25126679
tags question: http://stackoverflow.com/q/25196895
tags question: http://stackoverflow.com/q/25088364
tags question: http://stackoverflow.com/q/25188429
tags question: http://stackoverflow.com/q/25182756
tags question: http://stackoverflow.com/q/25201910
tags question: http://stackoverflow.com/q/25167856
tags question: http://stackoverflow.com/q/25159330
tags question: http://stackoverflow.com/q/25114101

http://stackoverflow.com/a/25079270
upvote count: 1
has comment: http://stackoverflow.com/comment/39020471
has body: If you want to embed a webpage within another one then you should use the iframe element: &lt;iframe src="http://asfasffvasf.com"/&gt; You can style this like any other block element, and set an explicit width and height. Some pages ask browsers not to include them within iframes (using the X-Frame-Options header). I don't think there's an easy way to solve this on the client side, but you could create a simple backend or proxy to request the page you want and return the content. This gets round the iframe restriction because you're now including content from your own domain. This does have a couple of security issues to be aware of: You've now made a backend which can be used to download any page on the Internet. There's a denial of service vulnerability if someone makes lots of requests to download huge pages. The pages you're including will no longer be restricted by the same origin policy. Scripts on those pages will be able to interact with everything on the parent page. This may be a problem if you plan on creating login functionality in the future.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25079189
score: 1

http://stackoverflow.com/q/25089172
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39038592
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/25089218
has answer: http://stackoverflow.com/a/25089230
has body: I tried to call jQuery function from my aspx page but it doesn't fire although it was working fine before but I think something happened that causes like this issue. I have a div works as a button: add container and I need when click on it to show another popup div I am using this code: I have included the jquery library via internet and local files but no one works: <script type="text/javascript" src="<%# ResolveUrl("assets/js/jquery.js") %>"> and tried Be informed that I tried the above in simple html file and it works fine and the alert was fired. Is there any solution ?
has title: JQuery Doesn't seem to work for server control
has answer: http://stackoverflow.com/a/25089226
answer count: 4
has comment: http://stackoverflow.com/comment/39038630
tagged with: javascript
tagged with: jquery
tagged with: visual-studio-2012
has answer: http://stackoverflow.com/a/25089218
possible better answer: http://stackoverflow.com/a/25089270
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25089270
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39167869
has text: if you're already using jquery, why not use the jquery plugin scrollintoview()? which I think solves this issue built-in and makes the whole operation smoother --> https://github.com/litera/jquery-scrollintoview
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25159085

http://stackoverflow.com/comment/39155547
has text: without ajax knowledge, how can you save items in database using javascript or jquery?. can u please say, In which way you are using save items in database?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25133122

http://stackoverflow.com/a/25134993
type: Answer
answers question: http://stackoverflow.com/q/25133443
has body: One approach would be to make your create method return the updated @restaurants and then update the scope in a callback on the angular side. Real rough implementation: def create @restaurant = Restaurant.new(restaurant_params) if @restaurant.save render json: Restaurant.all, status: 200 else #whatever end end end and on the frontend: $scope.addRestaurant = function(test) { var data = {name: test} $http.post('/restaurants', data).success(function(data){ $scope.restaurants = data; }) } Another approach to avoid the round-trip to the server is to assume success and push the new object into the existing $scope.restaurants on the client side. This poses some issues because of your validations. For the validations, the errors are rendered here in your controller already: format.json { render json: @restaurant.errors, status: :unprocessable_entity } You'll have to add an .error handler to your $http call and set the returned data in $scope.errors or something to show to the user. You will probably also want to abstract your api calls into an angular service so you can reuse the code in other parts of the application. Also consider reading up on the resolve attribute of $routeProvider and using that to resolve your data before the view is loaded.
has comment: http://stackoverflow.com/comment/39128148
has comment: http://stackoverflow.com/comment/39125873
has comment: http://stackoverflow.com/comment/39126869
score: 0
has comment: http://stackoverflow.com/comment/39125985
has comment: http://stackoverflow.com/comment/39126550

http://stackoverflow.com/q/25081048
tagged with: jquery
has comment: http://stackoverflow.com/comment/39022949
favorite count: 0
has body: I want to limit in special year : Ex: year &lt;= 2200 when he is typing ; &lt;input type="date" max="2200-01-01" min="1900-01-01" class="form-control" id="regdate" placeholder="Registration Date"&gt; Sorry for bad my bad expressions... P.S WITHOUT SUBMIT !- when you type you can type over 2200 or under 1900.
score: -3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25081191
has comment: http://stackoverflow.com/comment/39022867
answer count: 4
type: AnsweredQuestion
downvote count: 3
has title: How can i make an input date limit when you are typing or chosing the date?
has answer: http://stackoverflow.com/a/25081149
has comment: http://stackoverflow.com/comment/39022847
linked to: http://stackoverflow.com/q/22232638
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25081338
linked to: http://stackoverflow.com/q/12075967
possible better answer: http://stackoverflow.com/a/25081144
has answer: http://stackoverflow.com/a/25081144
upvote count: 0
accepted answer: http://stackoverflow.com/a/25081338
has comment: http://stackoverflow.com/comment/39023083

http://stackoverflow.com/comment/39127503
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25137377
has text: Check this question http://stackoverflow.com/questions/24885689/vaadin-with-jquery-fileupload
score: 0

http://stackoverflow.com/comment/39862099
has text: I will test these out again but as I remember it they don't do what I want. The code I'm using gives you the option to choose where to share (Timeline/Friend/Group) and the Privacy setting. It also opens a nice neat little popup rather than a new window. It matches the behaviour of the twitter code. I'll test it out though.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25531539

http://stackoverflow.com/q/25174122
linked to: http://stackoverflow.com/q/272361
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25174311
has comment: http://stackoverflow.com/comment/39196584
tagged with: http://stackoverflow.com/tag/json
score: 0
linked to: http://stackoverflow.com/q/3431169
type: Question
tagged with: javascript
has title: Catching JSON-Errors?
tagged with: jquery
has body: i am searching for a simple way to catch JSON-Errors and put out my own Errormessage. To give you an example, i have code that looks like this: $response = json_decode(file_get_contents($url)); This works totally fine, but after while the URL does not contain more content. I know that, and it is totally fine, but i do not want that an error gets thrown all the time that looks like this: Warning: file_get_contents(http://example.com/getcontent.php): failed to open stream: HTTP request failed! HTTP/1.1 400 BAD REQUEST in C:\Program Files... on line 153 The first thing i tried was to make a try/catch-statement which looked like this: try { $response = json_decode(file_get_contents($url)); } catch (Exception $e) { echo "Error!"; } This did not change anything. Thank you very much in advance!
has comment: http://stackoverflow.com/comment/39196509
answer count: 1

http://stackoverflow.com/comment/39181914
comment on: http://stackoverflow.com/q/25165905
score: 0
type: Comment
type: QuestionComment
has text: yes, i'm still getting the same error. syntax error, $injector could not initiate ...

http://stackoverflow.com/comment/39188332
comment on: http://stackoverflow.com/a/25168427
score: 0
type: AnswerComment
has text: Looks like code is now working, Thanks Larkeith & Stack Overflow!
type: Comment

http://stackoverflow.com/a/26221942
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25178012
has body: The documentation for the source file is a little more explicit; it says "This can be disabled or configured by setting io.socket.options within the first cycle of the event loop." Basically what's happening is that there exists within the library a setTimeout(fn, 0) call, which is idiomatic for starting a parallel process. However, in the JS standards it's explicitly stated that JS is single-threaded: in other words, even though setTimeout and setInterval are asynchronous they are not actually parallel in the sense that any of their code will be executing simultaneously with any other code. So they wait until the current function is over before they execute. This queueing mechanism is known as the JavaScript event loop. I believe that what you are asked to do by the script author is to modify the source to include the relevant change, perhaps at the bottom of the file for your convenience. It is also likely that a similar effect will be achieved by putting a &lt;script&gt; tag underneath the one that loads the given JS. This has not been explicitly standardized by HTML 4, but may be implicitly standardized in the new HTML 5 spec (it's a complicated interaction between different parts of the specs). In terms of HTML5, it looks like the current specs say that there is a afterscriptexecute event and a load event which occur immediately after any remote script is loaded (or, if it's an inline script, the load event is scheduled as a task -- I am not sure when those occur). So you might be able to guarantee it without modifying the script by instead doing: &lt;script&gt; function do_not_autoload() { /* ... */ } &lt;/script&gt; &lt;script onload="do_not_autoload()" src="./path/to/sails.io.js"&gt;&lt;/script&gt; but I'm not sure what the compatibility table for script@onload is going to look like. I made you a jsfiddle which can be used to grab a 'fingerprint' for different browsers to get an idea of what evaluation orders are out there in the wild. The * is the document.…
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/41126511
type: Answer
has comment: http://stackoverflow.com/comment/41126082
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/41126270
answers question: http://stackoverflow.com/q/25178012

http://stackoverflow.com/comment/39171206
has text: from informationModelService ... it's just using SPService `$().SPServices({ operation: "UpdateListItems", async: parameters.async, batchCmd: "New", listName: parameters.list, valuepairs: parameters.attrs, completefunc: function (xData, Status) { if (Status == "error") { parameters.callback(xData); } else { parameters.callback(null); } } });`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25157011
score: 0

http://stackoverflow.com/a/25214239
score: 4
accepted answer of: http://stackoverflow.com/q/25214141
type: Answer
upvote count: 4
downvote count: 0
has body: You'll need to use a case macro to construct the exact tokens you want: macro test { case {_ $className($entityName) } =&gt; { var classStr = unwrapSyntax(#{$className}[0]); var entityStr = unwrapSyntax(#{$entityName}[0]); letstx $fnName = [makeIdent("test" + classStr, #{here})]; letstx $classStr = [makeValue(classStr, #{here})]; letstx $entityStr = [makeValue(entityStr, #{here})]; return #{ function $fnName() { console.print($classStr); console.print($entityStr); } } } } test me(More)
answers question: http://stackoverflow.com/q/25214141
type: AcceptedAnswer

http://stackoverflow.com/comment/104697229
score: 0
type: Comment
has text: baseURI returns the base URL of a node so in this case it returns the base path + document name. you will need more codes to remove the document name from that URL. @Brad
type: AnswerComment
comment on: http://stackoverflow.com/a/59176202

http://stackoverflow.com/q/25225895
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39293768
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39293295
tagged with: angularjs
has title: how to pass id in form dynamically?
type: UnansweredQuestion
has body: I make a view from my json object .I am facing two issues 1) how can I send id dynamically which is generated dynamically form .in my case I take a constant ID. ng-form="myfrm" which out any id .i need to get id from json which is this "studentName": "abc", id should be "abc" id="abc" 2) i need to add select or drop down type in SWITCH . select mean drop down.i need to add drop drown when type is SWITCH and option give in input values http://plnkr.co/edit/EM3tqekUxaiUZA1b7Fk4?p=preview angular.forEach($scope.formInputs, function(value, key) { /* do something for all key: value pairs */ $scope.inputs.push({ "type":value.inputType.toLowerCase(), "name":value.name, "required": value.required }); }); how to achieve this functionality ?
answer count: 0
type: Question

http://stackoverflow.com/comment/39171215
type: QuestionComment
has text: The above would produce a syntax error with the trailing comma after the selector.
score: 1
comment on: http://stackoverflow.com/q/25160972
type: Comment

http://stackoverflow.com/q/25228871
possible better answer: http://stackoverflow.com/a/27704484
answer count: 3
has answer: http://stackoverflow.com/a/44244819
has comment: http://stackoverflow.com/comment/39298330
tagged with: javascript
has answer: http://stackoverflow.com/a/27704484
has comment: http://stackoverflow.com/comment/46000232
favorite count: 0
score: 55
has body: Here is the code: function repeat(operation, num) { return function() { if (num &lt;= 0) return operation() return repeat(operation, --num) } } function trampoline(fn) { while(fn &amp;&amp; typeof fn === 'function') { fn = fn() } } module.exports = function(operation, num) { trampoline(function() { return repeat(operation, num) }) } I have read that the trampoline is used to deal with overflow problems, so the function would not just keep calling itself and cause the stack to fill up. But how does this snippet function? Especially the trampoline function? What did it exactly do by while and how did it accomplish its goal?
type: AnsweredQuestion
upvote count: 55
downvote count: 0
has title: How to understand trampoline in JavaScript?
has answer: http://stackoverflow.com/a/25228905
accepted answer: http://stackoverflow.com/a/25228905
type: Question
tagged with: recursion
tagged with: trampolines
has comment: http://stackoverflow.com/comment/39298304

http://stackoverflow.com/q/25216543
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39275569
has comment: http://stackoverflow.com/comment/39275987
has answer: http://stackoverflow.com/a/25216634
type: Question
tagged with: javascript
tagged with: forms
has title: Error messages not getting properly displayed when the fields are left blank?
score: 0
has body: I'm a novice in Ajax and jquery.I'm desgining an Ajax form using both of them.Below is the code which i got from google. I've got two files "form.php" and "process.php" namely. This is how it traverses form.php : This form is meant for taking the values and if at all the user fails to enter data it has to show up with an error message it got from "process.php" saying "this field is empty". Initially,the orginal version i downloaded from google has only one input field that is "name". I customized the form by adding another field called "password". Whenever i click the "submit" button with empty values it shows "name cannot be blank" for both the fields. Instead it has to be "name cannot be blank" and "password cannot be blank" Here is code for form.php: Simple Ajax Form Name Password And here is the process.php <?php $errors = array(); //To store errors $form_data = array(); //Pass back the data to `form.php` /* Validate the form on server side */ if(empty($_POST['name'])) { //Name cannot be empty $errors['name'] = 'Name cannot be blank'; } if(empty($_POST['password'])){ $errors['password'] = 'password cannot be blank'; } if (!empty($errors)) { //If errors in validation $form_data['success'] = false; $form_data['errors'] = $errors; } else { //If not, process the form, and return true on success $form_data['success'] = true; $form_data['posted'] = 'Data Was Posted Successfully'; } //Return the data back to form.php echo json_encode($form_data);
answer count: 1

http://stackoverflow.com/a/25132104
has comment: http://stackoverflow.com/comment/39186050
downvote count: 0
type: Answer
has body: It took me a few minutes to figure out what you were after, and sadly the answer is no, there's currently no way to access the result of a "parent" query in the populate criteria. It's an interesting idea that you should consider posting to Github as a feature request. Using this wouldn't work, it but it could be something like: User.findOneByEmailAddress('user@acme.com') .populate('accounts', {owner: {parent: 'id'}})
accepted answer of: http://stackoverflow.com/q/25129427
answers question: http://stackoverflow.com/q/25129427
upvote count: 4
type: AcceptedAnswer
score: 4

http://stackoverflow.com/comment/39218302
comment on: http://stackoverflow.com/a/25185907
type: Comment
score: 0
type: AnswerComment
has text: @Fazil just only this condition `if(myView != undefined)` in `setTimeout()`

http://stackoverflow.com/a/50490190
downvote count: 0
type: Answer
upvote count: 1
has body: The following CSS works for TinyMCE 4 and FontAwesome 5: .mce-ico.mce-i-fas { display: inline-block; font-family: 'Font Awesome 5 Free'; font-weight: 900; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
score: 1
answers question: http://stackoverflow.com/q/25191791

http://stackoverflow.com/comment/39122479
type: Comment
has text: But wouldn't you want to keep track of the key which was pressed as well? It only counts as holding if the same key which triggered keydown to start the timer is the same on which triggers keyup.
comment on: http://stackoverflow.com/a/25134401
score: 0
type: AnswerComment

http://stackoverflow.com/q/25106157
tagged with: angularjs-directive
score: 1
has title: AngularJS directive with transclude from a promise ($resource)
has body: I am completely new to Angular and have been attempting to make a simple blog to get to know some of the features. The design I have is a JSON API for posts, which include a post title, created and updated dates and a post body, which is formatted as markdown. A post is rendered with a directive singlePost (and there is another directive for a list of posts for the home page). singlePost doesn't do anything interesting or special, it simply includes a template that also has a call to another directive, markdown. Posts are acquired by the following service: .factory('PostService', ['$resource', function($resource) { return $resource('/posts/:id', { id: '@id' }); }]) The controller that uses it looks like this: .controller('PostController', function($scope, $routeParams, PostService) { $scope.post = PostService.get({id: $routeParams.id}); }) And markdown currently looks like this: .directive('markdown', function() { return { restrict: 'E', template: '&lt;div&gt;&lt;/div&gt;', replace: true, link: function($scope, element, attrs) { attrs.$observe('content', function(value) { var showdown = new Showdown.converter(); element.removeAttr('content'); element.html(showdown.makeHtml(value)); }); } } }) This works fine. The markdown is placed in the attribute content and then is seen by $observe when the promise resolves from the service. The library Showdown is then used to convert this into HTML and then that is placed onto the page. To remove the issue of having an attribute with an entire post in it, I am simply removing the attribute. Despite this working, it seems strange to do it this way. Having an attribute left over with a bunch of content in it is clearly not right. However, I couldn't get transclusion to work in this scenario because post.body doesn't exist until the service promise is resolved. How would I go about implementing this so I could write &lt;markdown&gt;{{post.body}}&lt;/markdown&gt;?
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39071380
tagged with: promise
answer count: 0
tagged with: angularjs
type: UnansweredQuestion
upvote count: 1

handlebars.js
tags question: http://stackoverflow.com/q/25203125
tags question: http://stackoverflow.com/q/25177854
tags question: http://stackoverflow.com/q/25079549
tags question: http://stackoverflow.com/q/25103476
type: Tag
tag name: handlebars.js
tags question: http://stackoverflow.com/q/25164565
tags question: http://stackoverflow.com/q/25135721
tags question: http://stackoverflow.com/q/25225725
tags question: http://stackoverflow.com/q/25107586
tags question: http://stackoverflow.com/q/25080174

http://stackoverflow.com/comment/39237468
comment on: http://stackoverflow.com/q/25196267
has text: Oh! I did not knew that I though I am writing wrong code . I didn't knew it will work like that Then I may have to use the php $_Session[] ?? @KevinB
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39226408
type: Comment
has text: Thanks for the tip user, will look into this
comment on: http://stackoverflow.com/a/25190390
score: 0
type: AnswerComment

http://stackoverflow.com/a/25208289
answers question: http://stackoverflow.com/q/25205880
downvote count: 0
type: Answer
score: 6
has body: If you're so inclined, I've written a Node.js bulk deleter that runs delete requests in parallel. It takes approximately 3 minutes to delete 1000 entities. Here's an always up-to-date gist, and a copy for SO: // Installation // 1. Install Node.js http://nodejs.org/download/ // 2. In Terminal, cd (navigate) to the directory where you saved this file // 3. Run 'npm install request async' // 4. Edit the script config below with your token, org, app, and collection name. // 5. To run the script, at the Terminal prompt, run 'node api_baas_deleter.js' // Config var access_token = "{token}"; var as_basepath = "http://api.usergrid.com/{org}/{app}/"; // You need the trailing slash! var collection = "{collection_name}"; // End Config var request = require('request'); var async = require('async'); var authstring = "access_token=" + access_token; var total = 0; var startTime = Date.now(); function deleteRecords(callback) { request.get({ url: as_basepath + collection + "?" + authstring, json: true }, function(e, r, body) { if (body.count === undefined) { var err = "Error: invalid endpoint. Check your basepath and collection name."; console.log(err); if (typeof(callback) === 'function') { callback(err) } } else { // console.log("Found " + body.count + " entities"); if (body.count &gt; 0) { var deletes = []; for (var i = 0; i &lt; body.count; i++) { deletes.push({ url: as_basepath + collection + "/" + body.entities[i].uuid + "?" + authstring, json: true }); console.log("Deleting " + body.entities[i].uuid) } async.each(deletes, function(options, callback) { request.del(options, function(e, r, body) { if (r.statusCode === 200) { total++; } callback(e); }); }, function(err) { setTimeout(function() { deleteRecords(collection, function(e) { callback(e); }); }, 600); // Mandatory, since it seems to not retrieve entities if you make a request in &lt; 600ms }); } else { var timeInMinutes = minutesFromMs(Date.now() - startTime); console.log("Deleted " + total + " entities in " + timeInMinu…
has comment: http://stackoverflow.com/comment/39279470
upvote count: 6

http://stackoverflow.com/q/25121704
has title: How to activate clearInterval() after a specific element?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39098973
answer count: 1
tagged with: javascript
tagged with: jquery
type: Question
has answer: http://stackoverflow.com/a/25122204
score: 0
has body: I have five squares. When I click the button, the squares move up and down with setInterval. The function clearInterval works perfectly. But what I really want is when I click to activate clearInterval, the method to work after the last square is down. The HTML code follow bellow: Move Box Active Click And this is the JS code: var blocksInterval; function clicked() { $('#btn-move').trigger('click'); } function startClick() { blocksInterval = setInterval(clicked,200); } function stopClick() { clearInterval(blocksInterval); } $('#btn-active').click(function() { $(this).html('Stop'); if( $('#btn-move').hasClass('stopped') ) { $('#btn-move').removeClass('stopped'); startClick(); } else { $(this).html('Active Click'); $('#btn-move').addClass('stopped'); stopClick(); } });

http://stackoverflow.com/comment/39109229
comment on: http://stackoverflow.com/q/25127057
score: 0
type: Comment
type: QuestionComment
has text: Yes it does. i just found out.

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/25079488

http://stackoverflow.com/comment/39242021
type: QuestionComment
has text: Please people vote to close this inadequate question.
comment on: http://stackoverflow.com/q/25198594
score: 0
type: Comment

http://stackoverflow.com/comment/39145541
type: QuestionComment
comment on: http://stackoverflow.com/q/25146706
has text: @adeneo because this is code golf. I'm also just trying to be creative.
score: 0
type: Comment

http://stackoverflow.com/a/25105302
has comment: http://stackoverflow.com/comment/39068198
downvote count: 0
has body: $(this).find('.fa-ban') .removeClass('fa-ban') .addClass('fa-check-circle');
answers question: http://stackoverflow.com/q/25105246
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/39068186

http://stackoverflow.com/a/25161660
type: Answer
downvote count: 2
score: -2
answers question: http://stackoverflow.com/q/25161528
upvote count: 0
has body: Your table opening tag is not spelled correctly that is likely why you are having difficulties.

http://stackoverflow.com/comment/39015179
has text: Read the docs _For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree._
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25076574

http://stackoverflow.com/comment/39261873
score: 0
has text: Do it like this -> **http://jsfiddle.net/adeneo/xrk4z6ur/**, and open the console (F12) and tell us what you're getting ?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25209368

http://stackoverflow.com/a/25239524
type: Answer
has body: I solved it. Just replace in second "ajax" "POST" to "PUT" and also set "objectId" of object you want to update in url for update existing file. My Code is below... $(document).ready(function() { //Init Parse SDK Parse.initialize("yourappkey", "yourjskey"); //File Upload var file; // Set an event listener on the Choose File field. $('#fileselect').bind("change", function(e) { var files = e.target.files || e.dataTransfer.files; // Our file var now holds the selected file file = files[0]; }); // This function is called when the user clicks on Upload to Parse. It will create the REST API request to upload this image to Parse. $('#uploadbutton').click(function() { var serverUrl = 'https://api.parse.com/1/files/' + file.name; $.ajax({ type: "POST", beforeSend: function(request) { request.setRequestHeader("X-Parse-Application-Id", 'yourappid'); request.setRequestHeader("X-Parse-REST-API-Key", 'yourrestapikey'); request.setRequestHeader("Content-Type", file.type); }, url: serverUrl, data: file, processData: false, contentType: false, dataType: 'json', success: function(data) { //Change variable to reflect your class to upload to var classUrl = "https://api.parse.com/1/classes/ClassName/objectId" if(data) { var fileName = "" + data.name; $.ajax({ type: "PUT", beforeSend: function(request) { request.setRequestHeader("X-Parse-Application-Id", 'yourappid'); request.setRequestHeader("X-Parse-REST-API-Key", 'yourrestapikey'); request.setRequestHeader("Content-Type", 'application/json'); }, url: classUrl, data: '{"upload" : {"name" : '+"\""+fileName+"\""+', "__type" : "File"}}', processData: false, success: function(data) { console.log("Image successfully uploaded."); }, error: function(error) { console.log("Error: " + error.message); } }); } else { //Data is null console.log("Data IS NULL"); } }, error: function(data) { var obj = jQuery.parseJSON(data); alert(obj.error); } }); }); });
answers question: http://stackoverflow.com/q/25201834
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25201834
score: 0

http://stackoverflow.com/comment/39042605
type: AnswerComment
has text: Everything appears on the page as intended in View Source with the exception of `#pricing` not appearing or changing. The .js has a lot of functions, but nothing I could identify as interfering. My other scripts work great.
comment on: http://stackoverflow.com/a/25091398
type: Comment
score: 0

http://stackoverflow.com/q/25182810
has body: I've a list of data from db which I'm showing in each row on a Table. I want when I click a row it's should be remain highlighted with color. But my following code is highlighting all row. Can you help me about it. It's should be highlight only one row which I clicked. My code <?php echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; echo " "; while($res = mysql_fetch_array($get)){ $cdid = $res['cdid']; $family_name = $res['family_name']; $given_name = $res['given_name']; $work_phone = $res['work_phone']; $mobile_phone = $res['mobile_phone']; $email = $res['email']; $email_private = $res['email_private']; $cid = $res['cid']; $department = $res['department']; $title = $res['title']; $getComapnyName = mysql_query("SELECT company_name FROM company WHERE cid = '$cid' "); $resCompany = mysql_fetch_array($getComapnyName); $companyName = $resCompany['company_name']; if (strlen($companyName) >= 20) { $companyName = substr($companyName, 0, 10). " ... " . substr($companyName, -5); }else{ $companyName = $companyName; } echo " "; echo " $companyName "; echo " $family_name "; echo " $given_name "; echo " $department "; echo " $title "; echo " "; echo " "; } echo " "; echo " "; ?>
possible better answer: http://stackoverflow.com/a/25183577
has title: How do I highlight a row by javascript onClick Event method?
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25182872
tagged with: php
type: AnsweredQuestion
score: 0
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25182872
has answer: http://stackoverflow.com/a/25183577

http://stackoverflow.com/comment/39024111
type: QuestionComment
comment on: http://stackoverflow.com/q/25081389
score: 0
has text: Looks like popstate is not standard: "Chrome and Safari always emit a popstate event on page load, but Firefox doesn't." see https://developer.mozilla.org/en-US/docs/Web/Events/popstate
type: Comment

http://stackoverflow.com/comment/48251768
score: 0
type: Comment
type: QuestionComment
has text: Hi, did you figure out a solution? I'm facing a similar issue. Could use some help. Thanks
comment on: http://stackoverflow.com/q/25177237

http://stackoverflow.com/q/25139888
has answer: http://stackoverflow.com/a/25269117
has answer: http://stackoverflow.com/a/25140350
type: Question
has answer: http://stackoverflow.com/a/25170237
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25170237
tagged with: android
has answer: http://stackoverflow.com/a/25245825
answer count: 4
tagged with: cordova
has comment: http://stackoverflow.com/comment/39134314
upvote count: 1
tagged with: intel-xdk
has body: Hi i have this simple app and and i use myapp:// to open app my ANDROID APP this works file but when i use myapp://index.html to open a page it does not work i searched the internet but i could not find the solution can any body tell me i want to open a specific page in my APP because TWITTER does not support myapp:// it supports only if if has any extension like myapp://index.html or if this is not possible is there any why i could redirect user to a url myapp:// after login from my TWITTER application THANKS Muhammad Zeeshan
has title: PhoneGap URL scheme on other pages not working
has comment: http://stackoverflow.com/comment/39157141
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39132522
accepted answer: http://stackoverflow.com/a/25245825
score: 1
has comment: http://stackoverflow.com/comment/39136570

http://stackoverflow.com/q/25081592
has comment: http://stackoverflow.com/comment/39023829
tagged with: javascript
has title: How do I parse this piece of innerHTML in JavaScript?
linked to: http://stackoverflow.com/q/1732348
has comment: http://stackoverflow.com/comment/39023769
has comment: http://stackoverflow.com/comment/39025320
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39025346
favorite count: 0
accepted answer: http://stackoverflow.com/a/25081665
linked to: http://stackoverflow.com/q/590747
tagged with: innerhtml
has body: I did this: var blah = document.getElementById('id').getElementsByClassName('class')[0].innerHTML; Now I have this in bar: Some text goes here (foobar.co.uk) I want to read the string "Some text goes here" from the HTML using JS (no jQuery). I don't have access to the site's HTML. I'm parsing a webpage to inject JS for a browser extension. Will I just have to parse it as a string and find my text from between > and < or is there a way to parse innerHTML in JS?
has answer: http://stackoverflow.com/a/25081797
downvote count: 1
type: AnsweredQuestion
score: 3
possible better answer: http://stackoverflow.com/a/25081797
has comment: http://stackoverflow.com/comment/39023817
type: Question
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/39023766
has answer: http://stackoverflow.com/a/25081665

http://stackoverflow.com/q/25086933
type: UnansweredQuestion
tagged with: combobox
has comment: http://stackoverflow.com/comment/39035674
has body: I'm using the jQuery combobox widget which works fine, but is causing some issues when added dynamically. What should happen Visitor uses the combobox to filter/select valid users to add to a list. The list has no max number of users that can be added. There's a [+] toggle button at the end of each user field that allows the Visitor to add another user to the list. Clicking the button makes an ajax call to add more users to the list, allowing there to be no limit to the max number of users. Initially, 10 user fields are loaded on screen, and then when they click the [+] button towards the end, the ajax call adds another 10 to the list. What's Happening When the form with the list of users is submitted, the users from the initial 10 fields appear fine, but any fields added as part of the ajax call are returned as empty. Here's the code: combobox: (function( $ ) { $.widget( "ui.combobox", { _create: function() { var input, that = this, wasOpen = false, select = this.element.hide(), selected = select.children( ":selected" ), value = selected.val() ? selected.text() : "", wrapper = this.wrapper = $( "" ) .addClass( "ui-combobox" ) .insertAfter( select ); function removeIfInvalid( element ) { var value = $( element ).val(), matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( value ) + "$", "i" ), valid = false; select.children( "option" ).each(function() { if ( $( this ).text().match( matcher ) ) { this.selected = valid = true; return false; } }); if ( !valid ) { } } input = $( " " ) .appendTo( wrapper ) .val( value ) .addClass( "ui-state-default ui-combobox-input " ) .autocomplete({ delay: 0, minLength: 0, source: function( request, response ) { var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); response( select.children( "option" ).map(function() { var text = $( this ).text(); if ( this.value && ( !request.term || matcher.test(text) ) ) return { label: text.replace( new RegExp( "(?![^&;]+;)(?!<[^<>]*)(" + $.ui.autocomplete.escapeRegex(…
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/39041446
type: Question
has comment: http://stackoverflow.com/comment/39034747
tagged with: javascript
has comment: http://stackoverflow.com/comment/39034574
tagged with: jquery
tagged with: ajax
has title: jquery combobox not pulling data with ajax

http://stackoverflow.com/q/25152276
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25159569
has title: JavaScript throwing error while trying to overwrite file
type: AnsweredQuestion
upvote count: 1
type: Question
has body: I have created and javascript code that is called from an HTA. The portion of the code which overwrite a file works fine when executed for the first time. But when i try to run it again on the same HTA thread, it throws an error "Permission denied". Its failing to overwrite the same file for the second time. Is this because the code using the file as an object and its not releasing it, If so, is there any way I can set the objects to null or something? var objFSO = new ActiveXObject("Scripting.FileSystemObject"); if(objFSO.FileExists(MyPath)){ var objFile = objFSO.CreateTextFile(MyPath); } This is the block of code i am executing.. Thanks, Anand
has answer: http://stackoverflow.com/a/25159569
tagged with: hta
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25163019
answers question: http://stackoverflow.com/q/25161524
downvote count: 0
has comment: http://stackoverflow.com/comment/39177274
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/60704517
has comment: http://stackoverflow.com/comment/46188573
has body: I'm using this plugin in my backbone Apps. It works for me using the Jquery plugin inside my render method. Here a sample of my code. Html File. &lt;form id="Anything" action="the api url" method='post' encrtype="multipart/form-data"&gt; &lt;input type='file'/ accept='.txt'&gt; &lt;/form&gt; Backbone View render: function(){ this.$el.html(this.template); $("#Anything").fileupload({ dataType:'json', add : this.AddFile, fail: this.AddFileFail }); AddFile : function(data){ return data.submit(); } }

http://stackoverflow.com/q/25129644
favorite count: 0
has comment: http://stackoverflow.com/comment/39113848
type: UnansweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25221493
type: Question
has comment: http://stackoverflow.com/comment/39113908
has comment: http://stackoverflow.com/comment/39114204
tagged with: javascript
has comment: http://stackoverflow.com/comment/39113850
tagged with: jquery
has title: stopPropagation() not working?
upvote count: 2
answer count: 1
tagged with: events
has body: I'm new to Javascript and I'm trying my best to develop intuition for how events work in jquery. I'm developing a interactive user interface that allows users to edit objects attached to a component cell. In my code, I've created a grid of 2 columns and many rows. One of the columns consist of cells with the following html structure: When the user hovers over that cell, 3 buttons pop up: new, edit, delete. This all works but I'm having issues with: 1. When the button is clicked, the menu doesn't appear. Also I believe there is event propagation to the ancestor component even though I use stopPropagation in button.click(). As a result clicking on the button invokes component.click() thus generating a new set of buttons. $(function() { var $table = $('table'); var $form = $(' ') for (i = 42; i > 0; i--) { $table.append(' ' + i + ' '); } /* $('td.component').on('click', function(e) { $(this).append(' new ' + ' edit ' + ' delete '); });*/ /* support for hovering*/ $('td.component').mouseover(function() { //$(this).css('background-color', '#ADD8E6'); $(this).append(' new ' + ' edit ' + ' delete '); }); $('td.component').mouseout(function() { $(this).css('background-color', '#FFFFFF'); $('button').remove(); }); $('button').mouseover(function() { $(this).show(); }); $('button.new').click(function(e) { e.stopPropagation(); componentMenu(); }); $('button.edit').click(function(e){ e.stopPropagation(); }); $('button.delete').click(function(e){ e.stopPropagation(); }); function componentMenu() { var $menu = $(' '); $menu.append(' Bloodhound '); $menu.append(' Compute '); $menu.append(' Powershelf '); $menu.append(' Storage '); $menu.append(' Switch '); } }); Also when the user hovers over the component and then moves the cursor over the buttons the buttons fades in and out sporadically. I'm not sure how to prevent this effect though...one thought I had was to code mouseover for the button like this: $('button').mouseover(function() { $(this).show(); }); but this didn't make any…

http://stackoverflow.com/comment/39188508
comment on: http://stackoverflow.com/q/25169766
type: Comment
type: QuestionComment
score: 1
has text: If you are new to javascript and jQuery, I recommend the [jQuery learning center](http://learn.jquery.com/), especially the page about [different ways to run scripts](http://learn.jquery.com/javascript-101/running-code/).

http://stackoverflow.com/comment/39061634
comment on: http://stackoverflow.com/q/25101781
score: 2
type: Comment
has text: Is `1234 56` a valid CC number? The question is not very clear. How do you want to handle the input `1234`, should that be allowed?
type: QuestionComment

http://stackoverflow.com/a/25202032
upvote count: 2
type: AcceptedAnswer
type: Answer
has body: This may be a good case for regular expressions. In jQuery-terms $('a').each(function() { alert($(this).attr('href').replace(/^.*day=(.+?)&.*$/,'$1')); }); fri 08.08.14 But if you can alter the HTML just add a data attribute containing your string: $('a').each(function() { alert($(this).data('day')); }); …
accepted answer of: http://stackoverflow.com/q/25201875
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25201875

http://stackoverflow.com/comment/39116147
has text: Thanks for giving answer and you please change my plunker.so that I will understand much better
type: AnswerComment
comment on: http://stackoverflow.com/a/25130428
score: 0
type: Comment

http://stackoverflow.com/comment/39186641
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25161088
has text: Check the path of the files, it sounds like the file isn't being found. Verify this by looking at the network tab in Firebug to check that the file is loading.
score: 0

http://stackoverflow.com/comment/39105662
type: AnswerComment
comment on: http://stackoverflow.com/a/25125003
has text: Thanks a lot for showing the path. It worked great.Only one problem is I have the input field as array now it is not detecting which file is clicked.
score: 0
type: Comment

http://stackoverflow.com/comment/39057655
comment on: http://stackoverflow.com/a/25099538
score: 1
type: AnswerComment
type: Comment
has text: Very helpful, thank you. Got the sample to work using the method you suggested. The problem now is that the library is a separate project within the workspace. When it comes time to submit my app for people to use, will it automatically know to include the referenced library?

http://stackoverflow.com/a/40557892
has body: A general purpose combinator for recursive function definitions of any number of arguments (without using the variable inside itself) would be: const rec = (le =&gt; ((f =&gt; f(f))(f =&gt; (le((...x) =&gt; f(f)(...x)))))); This could be used for example to define factorial: const factorial = rec( fact =&gt; (n =&gt; n &lt; 2 ? 1 : n * fact(n - 1)) ); //factorial(5): 120 or string reverse: const reverse = rec( rev =&gt; ( (w, start) =&gt; typeof(start) === "string" ? (!w ? start : rev(w.substring(1), w[0] + start)) : rev(w, '') ) ); //reverse("olleh"): "hello" or in-order tree traversal: const inorder = rec(go =&gt; ((node, visit) =&gt; !!(node &amp;&amp; [go(node.left, visit), visit(node), go(node.right, visit)]))); //inorder({left:{value:3},value:4,right:{value:5}}, function(n) {console.log(n.value)}) // calls console.log(3) // calls console.log(4) // calls console.log(5) // returns true
type: Answer
score: 5
upvote count: 5
answers question: http://stackoverflow.com/q/25228394
downvote count: 0

http://stackoverflow.com/comment/39152952
comment on: http://stackoverflow.com/q/25149765
type: Comment
has text: What is the wysiwyg called? because there are angular plugins for tinymce https://github.com/angular-ui/ui-tinymce and ckeditor also but not sure how complete it is. Or even better if you just need a light text wysiwyg - http://textangular.com/
type: QuestionComment
score: 1

http://stackoverflow.com/q/25186026
tagged with: linux
has comment: http://stackoverflow.com/comment/39218004
favorite count: 0
has comment: http://stackoverflow.com/comment/39218309
type: UnansweredQuestion
upvote count: 6
tagged with: node.js
has body: I want calculate and display the free space of the home filesystem but there are 3-4 users, and all should be in javascript, how can we do ? I know in linux shell , we can do : df -h But in javascript it's not
has answer: http://stackoverflow.com/a/25186128
has answer: http://stackoverflow.com/a/64056316
has answer: http://stackoverflow.com/a/41658238
has answer: http://stackoverflow.com/a/25186153
has answer: http://stackoverflow.com/a/75578092
has title: How do I calculate free disk space on Linux in JavaScript?
downvote count: 1
has comment: http://stackoverflow.com/comment/39217989
type: Question
score: 5
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/53993201

http://stackoverflow.com/a/25074198
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25073959
type: Answer
score: 2
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25073959
has body: Demo Responsive, css only solution using CSS column properties html voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo ino voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque i voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo accusantium doloremque laudantium, totam voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo accusantium doloremque laudantium, totam voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo accusantium doloremque laudantium, totam voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo accusantium doloremque laudantium, totam >voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo ino voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque i css body { font: 1em/1.67'Open Sans', Arial, Sans-serif; margin: 0; background: #e9e9e9; } .container { margin: 1.5em; padding: 0; -moz-column-gap: 1.5em; -webkit-column-gap: 1.5em; column-gap: 1.5em; font-size: .85em; } .panel { display: inline-block; background: #fff; padding: 1em; margin: 0 0 1.5em; width: 100%; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-shadow: 2px 2px 4px 0 #ccc; } @media only screen and (min-width: 400px) { .container { -moz-column-count: 2; -webkit-column-count: 2; column-count: 2; } } @media only screen and (min-width: 700px) { .container { -moz-column-count: 3; -webkit-column-count: 3; column-count: 3; } } @media only screen and (min-width: 900px) { .container { -moz-column-count: 4; -webkit-column-count: 4; column-count: 4; } } @media only screen and (min-width: 1100px) { .container { -moz-column-count: 5; -webkit-column-count: 5; column-count: 5; } }

http://stackoverflow.com/q/25166567
favorite count: 0
has answer: http://stackoverflow.com/a/25166913
upvote count: 1
downvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25166913
has body: I have string like: /transaction/tran_id=123 I want to match /transaction/ part of the string. if it's so then, window.location.href = url; else alert("Not URL"); I tried with str.match("^string")
has answer: http://stackoverflow.com/a/25166584
type: Question
answer count: 2
has title: Match starting characters of string
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25166584
tagged with: regex

http://stackoverflow.com/q/25117210
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
has title: How can I create/find in Mongoose?
linked to: http://stackoverflow.com/q/7334390
has answer: http://stackoverflow.com/a/25118704
accepted answer: http://stackoverflow.com/a/25118704
answer count: 3
has body: Sometimes I need a document to exist in the DB, and am happy to either work with the existing document, or create the document if it's missing, and work with the new one. This seems like a fairly common use case, but I've looked through the Mongoose docs and I can't find anything. Mongoose Collection methods like findOneAndUpdate() and update() with upsert: true are about modifying documents - I don't wish to modify the document if it exists, just get a reference to it. Example: (added for @neillunn) I want to add a User with a reference to a Company whose 'name' is 'foo'. Before that, I'd like to lookup a Company with {name: 'foo'} and create that if it doesn't exist. Example 2: (added for @neillunn) code I'm using now to handle the example scenario: // Find or create an an instance and return a cb with a reference to it. var findOrCreate = function(model, criteria, cb){ model.update(criteria, criteria, {upsert: true}, function(err, numberAffected, raw){ if ( ! raw.updatedExisting ) { console.log('Created instance') } else { console.log('Found existing instance') } model.findOne(criteria, cb) }) } Note: findOneAndUpdate() won't work because it will try and modify the existing document, and get a 'duplicate key error index'
downvote count: 1
has comment: http://stackoverflow.com/comment/39091622
possible better answer: http://stackoverflow.com/a/52918028
has comment: http://stackoverflow.com/comment/66306227
favorite count: 0
has answer: http://stackoverflow.com/a/52918028
has comment: http://stackoverflow.com/comment/39090366
linked to: http://stackoverflow.com/q/16358857
has answer: http://stackoverflow.com/a/39494447
upvote count: 15
tagged with: node.js
score: 14
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39092876
has comment: http://stackoverflow.com/comment/39091029
type: Question

http://stackoverflow.com/a/25219723
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39299546
type: Answer
has comment: http://stackoverflow.com/comment/39329131
has comment: http://stackoverflow.com/comment/39298087
has comment: http://stackoverflow.com/comment/39328181
has comment: http://stackoverflow.com/comment/39424730
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25218731
accepted answer of: http://stackoverflow.com/q/25218731
has body: Just add moveUp function when scroll function is completed. $scrollingDiv.stop().animate({"marginTop": ($(window).scrollTop() + 30) + "px"}, "slow" ,moveUp); Pay attention to ,moveUp); section after "slow". Check This JSFiddle

http://stackoverflow.com/q/25120646
has comment: http://stackoverflow.com/comment/39098369
has comment: http://stackoverflow.com/comment/39096867
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/87323206
has comment: http://stackoverflow.com/comment/39097021
score: 0
tagged with: javascript
tagged with: asp.net
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39099119
tagged with: http://stackoverflow.com/tag/pdf
has title: Iframe keep Printing Last PDF
has body: Print button is working perfect in debug mode. When implemented to server it's keep printing first document printed. PDF file generate with new print page (if check PDF manually at server folder) but iframe is keep printing old page. It doesn't take new PDF from server. Can someone help me here. I'm new to ASP.net a.aspx &lt;form id="Form1" runat="server"&gt; &lt;asp:Label ID="lbl" runat="server" Width="334px"&gt;&lt;/asp:Label&gt;&amp;nbsp; &lt;asp:Button ID="btnPrint_Click" runat="server" Height="20px" Text="Print From Here" Width="183px" OnClick="btnPrint_Click_Click" ForeColor="Red" /&gt; &lt;div title="print report"&gt; &lt;rsweb:ReportViewer ID="rvViewer" runat="server" ShowParameterPrompts="false" AsyncRendering="true" Width="100%" BackColor="#F7F6F3" ShowRefreshButton="true" Height="800px" ToolTip="Click the arrow to Sort" &gt; &lt;/rsweb:ReportViewer&gt; &lt;/div&gt; &lt;/form&gt; &lt;iframe id="frmPrint" name="IframeName" width="500" height="200" runat="server" style="display: none"&gt; &lt;/iframe&gt; a.aspx.cs protected void btnPrint_Click_Click(object sender, EventArgs e) { Warning[] warnings; string[] streamids; string mimeType; string encoding; string extension; byte[] bytes = rvViewer.ServerReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings); FileStream fs = new FileStream(HttpContext.Current.Server.MapPath("output.pdf"), FileMode.Create); fs.Write(bytes, 0, bytes.Length); fs.Close(); //Open exsisting pdf Document document = new Document(PageSize.LETTER); PdfReader reader = new PdfReader(HttpContext.Current.Server.MapPath("output.pdf")); //Getting a instance of new pdf wrtiter PdfWriter writer = PdfWriter.GetInstance(document, new FileStream( HttpContext.Current.Server.MapPath("Print.pdf"), FileMode.CreateNew)); document.Open(); PdfContentByte cb = writer.DirectContent; int i = 0; int p = 0; int n = reader.NumberOfPages; Rectangle psize = reader.GetPageSize(1); float width = psize.Width; float height = p…
answer count: 0
tagged with: iframe

http://stackoverflow.com/q/25226076
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39292948
has comment: http://stackoverflow.com/comment/39293017
has body: Here is the Fiddle Can't figure out how to make the DIV close icon to follow the rest of the DIV when the DIV is dragged. I seem to think there is something in this part of the code that I am not doing right. $self = $(this); $(opts.parent).append($self); $('span.' + opts.classPrefix + '_oClose').remove(); $('body').append($overlayClose); $('div.' + opts.classPrefix + '_overlay').remove(); $('body').append($overlay); $self.draggable(); Appears to be something to do with how elements are appended to HTML body. I tried appending a blank div to body and then adding overlay and overlayClose to that blank div. But that did not even render the dialog. Any ideas?
possible better answer: http://stackoverflow.com/a/25226154
has answer: http://stackoverflow.com/a/25226154
tagged with: css
has answer: http://stackoverflow.com/a/25226136
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39293061
has answer: http://stackoverflow.com/a/25226171
has comment: http://stackoverflow.com/comment/39293092
upvote count: 1
has title: Making the DIV close icon drag along with the DIV
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39292996
has comment: http://stackoverflow.com/comment/39292982
has comment: http://stackoverflow.com/comment/39292991
answer count: 3
has comment: http://stackoverflow.com/comment/39292966
accepted answer: http://stackoverflow.com/a/25226171
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/39202729
type: Comment
type: QuestionComment
has text: I need that column width would be defined by length of text in that column....
comment on: http://stackoverflow.com/q/25177809
score: 0

http://stackoverflow.com/comment/39262115
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25209535
type: Comment
has text: ohh... hmm... I test it now, wait a minute.

http://stackoverflow.com/a/25101698
has comment: http://stackoverflow.com/comment/39061746
has body: I would prefer the ID of the div to be in the hash of the link: Live JavaScript Demo &lt;a class="reversible" href="#arbitrarydivId"&gt; Click to show/hide. &lt;/a&gt; using function ReverseDisplay() { var divId=this.hash.substring(1), div=document.getElementById(divId); div.style.display = div.style.display=="none"?"block":"none"; return false; } or Live jQuery Demo $(function() { $(".reversible").on("click",function(e) { e.preventDefault(); $(this.hash).toggle(); }); }); Older suggestions window.onload=function() { var links = document.querySelectorAll(".reversible"); for (var i=0;i&lt;links.length;i++) { links[i].onclick=ReverseDisplay; } } using &lt;a class="reversible" href="#"&gt; Click to show/hide. &lt;/a&gt; To hide something else, try function ReverseDisplay() { var divId=this.getAttribute("data-div"), div=document.getElementById(divId); div.style.display = div.style.display=="none"?"block":"none"; return false; } using &lt;a class="reversible" data-div="arbitrarydivId" href="#"&gt; Click to show/hide. &lt;/a&gt; In jQuery the whole thing would be $(function() { $(".reversible").on("click",function(e) { e.preventDefault(); $("#"+$(this.data("div")).toggle(); }); });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39061725
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25101662
has comment: http://stackoverflow.com/comment/39062108
accepted answer of: http://stackoverflow.com/q/25101662
has comment: http://stackoverflow.com/comment/39061523
has comment: http://stackoverflow.com/comment/39062219
has comment: http://stackoverflow.com/comment/39062158
has comment: http://stackoverflow.com/comment/39062459

http://stackoverflow.com/comment/39026037
has text: `y0` is my scale for the y-axis. for reference sake, look at my edit as that is what I am trying to do but with a different value
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25082544

http://stackoverflow.com/q/25125832
has title: jQuery - Library use in id selector in generated content
has comment: http://stackoverflow.com/comment/39106800
has comment: http://stackoverflow.com/comment/39106875
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: In standard generated content, we use function like this: $(document).on('click', "date_picker", function(){ alert("hello"); }); But how do we use in a function in generated content, for example the datepicker library from jQuery UI? Example of what i am trying to say $(document).on('click', 'date_picker').datepicker();
type: Question
has answer: http://stackoverflow.com/a/25125887
tagged with: javascript

http://stackoverflow.com/comment/39125985
comment on: http://stackoverflow.com/a/25134993
has text: Right, you probably need to play with the data format. Look at your server logs for more information on the error. It's probably going to be something like `var data = {restaurant: {name: test}}`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25106099
has title: JavaScript timer does not count every second
downvote count: 0
tagged with: setinterval
favorite count: 0
possible better answer: http://stackoverflow.com/a/25106264
tagged with: timer
has answer: http://stackoverflow.com/a/25106148
has comment: http://stackoverflow.com/comment/39069640
upvote count: 1
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25106148
type: Question
answer count: 2
tagged with: javascript
has body: I'm creating a countdown to a certain day. However, the one that I made does not seem to work for some reason. I intended it to be recalled every second by using setInterval but it only shows the time when I load the page. Here is the code // Timer targetDate = new Date(2014, 8, 22, 0, 0, 0); function tick(ddate, id) { var dateNow = new Date(); var amount = ddate.getTime() - dateNow.getTime(); delete dateNow; if (amount &lt;= 0) { document.getElementById(id).innerHTML="Now!"; } else { var days, hours, mins, secs, out; days = 0; hours = 0; mins = 0; secs = 0; out = ""; amount = Math.floor(amount/1000); days = Math.floor(amount / 86400); amount %= 86400; hours = Math.floor(amount / 3600); amount %= 3600; mins = Math.floor(amount / 60); amount %= 60; secs = Math.floor(amount); out += "There are "; out += (days &lt;= 9?'0':'') + days + " " + ((days == 1)?"day":"days") + ", "; out += (hours &lt;= 9?'0':'') + hours + " " + ((hours == 1)?"hour":"hours") + ", "; out += (mins &lt;= 9?'0':'') + mins + " " + ((mins == 1)?"min":"mins") + ", "; out += (secs &lt;= 9?'0':'') + secs + " " + ((secs == 1)?"sec":"secs") + " "; out += "until the end of this semester"; document.getElementById(id).innerHTML = out; } } function getCount() { setInterval(tick(targetDate, "timer"), 1000); } window.onload = function() { getCount(); }; Could someone please point out the part that I have messed up, thanks
has answer: http://stackoverflow.com/a/25106264

http://stackoverflow.com/comment/39084583
has text: If all you want is 'pointy fingure' use can CSS property `cursor:pointer` on intented element.
comment on: http://stackoverflow.com/q/25114103
type: Comment
type: QuestionComment
score: 1

gruntjs
tags question: http://stackoverflow.com/q/25081805
tags question: http://stackoverflow.com/q/25211746
tags question: http://stackoverflow.com/q/25100405
tags question: http://stackoverflow.com/q/25168652
tags question: http://stackoverflow.com/q/25153517
tags question: http://stackoverflow.com/q/25221818
tags question: http://stackoverflow.com/q/25087365
tags question: http://stackoverflow.com/q/25160079
tags question: http://stackoverflow.com/q/25185624
tags question: http://stackoverflow.com/q/25146882
tags question: http://stackoverflow.com/q/25159822
tags question: http://stackoverflow.com/q/25097749
tags question: http://stackoverflow.com/q/25204398
tags question: http://stackoverflow.com/q/25113353
type: Tag
tags question: http://stackoverflow.com/q/25081078
tags question: http://stackoverflow.com/q/25100935
tags question: http://stackoverflow.com/q/25177879
tags question: http://stackoverflow.com/q/25172035
tags question: http://stackoverflow.com/q/25163129
tags question: http://stackoverflow.com/q/25124280
tags question: http://stackoverflow.com/q/25145548
tags question: http://stackoverflow.com/q/25129330
tag name: gruntjs
tags question: http://stackoverflow.com/q/25165372
tags question: http://stackoverflow.com/q/25122757

http://stackoverflow.com/q/25109871
has body: I have the following rapheal javascript in my onload var cmdShapeString = "M 0 0 l 20 0 2 5 10 0 2 -5 100 0 0 30 -100 0 -2 5 -10 0 -2 -5 -20 0z"; var R = Raphael("toolbox"); var path = R.path(cmdShapeString) ; path.attr({stroke:"#777777", fill: "#CCCCCC"}); path.scale(0.5); //path.attr({x:-100, y: 0}); //Has no effect path.transform("T"+0+","+0); //Resets the scale back to 1.0??? Originally when the path is drawn on the screen it is drawn at 0,0 Then I scale it to half size and it jumps to the left. I then try to put it back to 0,0 with path.transform which resets the scale back to 1.0 it seems. Trying to set the x and y using attr has absolutely no effect. What is going on here? What am I doing wrong?
has comment: http://stackoverflow.com/comment/39076842
type: Question
has title: Raphael transform resets my scale
tagged with: javascript
tagged with: raphael
linked to: http://stackoverflow.com/q/21140786
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39076827
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25112546

http://stackoverflow.com/comment/39100701
comment on: http://stackoverflow.com/a/25122686
has text: This is correct, JS scripts cannot reference other JS scripts without explicitly creating a new script element and injecting the file into it.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25143487
possible better answer: http://stackoverflow.com/a/25144053
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25144357
type: Question
tagged with: bing-maps
has body: I'm trying to add tooltips to pushpins created using the Bing Maps AJAX v7 API. I found a working code in http://rbrundritt.wordpress.com/2011/11/21/pushpin-tooltips-in-bing-maps-v7/ but this approach works only if the pushpin is constructed inside the visible viewport. $('.pin1').children().attr('title','This is pin 1.'); If the pushpin is constructed outside of the viewport, once you zoom out and the pushpin become visible, the DOM element doesn't have the 'title' property. Also, I tried with: pin.cm1001_er_etr.dom.setAttribute('title', 'Pushpin Title'); But the pushpin object sometimes have different names (like cm1002_er_etr), or sometimes doesn't have this at all. Exist some way to add the 'title' property directly to the pushpin js object?
answer count: 2
has title: Bing Maps AJAX v7 pushpin tooltip
downvote count: 0
accepted answer: http://stackoverflow.com/a/25144357
tagged with: javascript
has answer: http://stackoverflow.com/a/25144053
favorite count: 0

http://stackoverflow.com/q/25197456
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39239684
tagged with: css
has comment: http://stackoverflow.com/comment/39240108
type: UnansweredQuestion
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/39239967
has answer: http://stackoverflow.com/a/25200240
has title: Image popop after clicking submit button for processing form
has body: I'm trying to make a popup image when an user clicks on the submit button. The form takes some time to process that's why. The image does pop up fine. But the form won't send. When I delete the jQuery for the popup image it sends the form as it should. I started with some html: &lt;div id="showProcessingImg"&gt; &lt;input type="submit" name="submit" id="submitForm" value="Send"&gt; &lt;/div&gt; &lt;div id="page-cover"&gt; &lt;div id="uncloseable-lightbox"&gt; &lt;/div&gt; &lt;/div&gt; And of course some jQuery: //POPUP IMAGE $('#showProcessingImg').click(function() { $('#submitForm').attr('disabled', true); $('#saveSignature').attr('disabled', true); $('#clearSignature').attr('disabled', true); $('#disablePrev').hide(); $('#page-cover').show(); }); //CHECK IF SIGNATURE IS SAVED $('#submitForm').click(function() { if($("#signature").val().length === 0){ alert("Vul eerst een handtekening in en druk op save."); return false; } else { return true; } }); And last but not least the CSS: #page-cover { background-color: #888; display: none; position: absolute; left:0; right:0; top:0; bottom:0; width: 100%; height: 100%; opacity: 0.8; filter: alpha(opacity=80); } #uncloseable-lightbox { background: url(../images/processing.gif) no-repeat !important; background-size: 320px 70px !important; position:absolute; left:50%; top:40%; margin-left:-160px; margin-right:-160px; width:30%; height:15%; } Thanks in advance.
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25172307
has body: I don't think you can prefill a field and select a radio button with just the URL but I think I see what you're trying to do. On the upside, you can use PHP and Curl to create a POST request. &lt;?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://www.shipmentlink.com/servlet/TDB1_CargoTracking.do"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "BL=&amp;CNTR=XINU8187202&amp;bkno=&amp;TYPE=CNTR&amp;NO=&amp;NO=&amp;NO=&amp;NO=&amp;NO=&amp;SEL=s_cntr&amp;NO=XINU8187202"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec ($ch); curl_close ($ch); echo $server_output; ?&gt; The output would look like...
type: Answer
answers question: http://stackoverflow.com/q/25172089
score: 0
has comment: http://stackoverflow.com/comment/39223089

http://stackoverflow.com/a/25192833
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39232291
answers question: http://stackoverflow.com/q/25191599
type: Answer
has body: This largely depends on what your "stuff here" is. Since you're not including this information I'll try to cover all combinations: You're requiring jquery.chosen, you're binding it to the factory function parameter (e.g. "Chosen") and you use it. This is the normal usage pattern. You're requiring jquery.chosen, you're binding it to the factory function parameter (e.g. "Chosen") but you're not using it inside the function. Remove this from the dependency list - there's no need to clutter the module signature. You're requiring jquery.chosen, you're not binding it to the factory function parameter but you don't use this dependency anyway. Similar to 2.: remove all unneeded dependencies to keep your code clean. You're requiring jquery.chosen, you're not binding it to the factory function parameter but you're using it. This is a potentially fatal scenario, depending on how the plugin is written it could work some of the time because JavaScript engine will try to find the specified variable looking at all known scopes, starting at local and ending on window scope. You're lucky it will fail immediately, but if you picked a variable name that exists in the global scope you'll use it skipping the AMD mechamisms, causing unexpected quirks and timing-sensitive issues. Last two variants are also dangerous because you may not notice the mismatch when adding a new dependency later, causing confusing errors, e.g.: define([ "jquery", "app/modules/validation", "jquery.chosen", "underscore", ], function($, Validation, _) { //_ variable refers to jQuery.chosen due to the mismatch }); Not sure what you mean by "the other module" in the last comment: "the 'chosen' object here is actually referencing the object defined in the other module"
upvote count: 1

http://stackoverflow.com/a/25255758
answers question: http://stackoverflow.com/q/25189278
has comment: http://stackoverflow.com/comment/39352221
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39352399
score: 1
has comment: http://stackoverflow.com/comment/39351971
has body: Approach A common pattern with angular is to have a nested directive require a parent directive and register itself with the parent. You can use this pattern to solve your problem. I've added the nested directives resizer-source and resizer-dest to your markup: &lt;div resizer&gt; &lt;div class="a" resizer-dest&gt;&lt;/div&gt; &lt;div class="b" resizer-source&gt; This content generated dynamically using ng-include and other directives inside &lt;/div&gt; &lt;/div&gt; resizer-source myModule.directive('resizerSource', function () { return { require: '^resizer', link: function (scope, element, attrs, ctrl) { ctrl.registerSource(element); } }; }); resizer-dest myModule.directive('resizerDest', function () { return { require: '^resizer', link: function (scope, element, attrs, ctrl) { ctrl.registerDest(element); } }; }); resizer myModule.directive('resizer', ['$timeout', function ($timeout) { return { controller: function($scope) { var a,b; function update() { if (a &amp;&amp; b) { var bHeight = b.outerHeight(); var totalHeight = element.height(); a.height(totalHeight - bHeight); } } this.registerSource = function(elm) { b = elm; update(); } this.registerDest = function(elm) { a = elm; update(); } } }; }]); Even More Flexibility If for some reason the height of b isn't available even by the time b's link function runs, you can make this even more flexible by setting a $watch on b's height and registering b only when the watch evaluates to a positive number. Afterwards, cancel the watcher unless you expect the element's height to continue changing. Additional Info if I'll $watch b's size, I'll have to cause a digest cycle (by calling $apply() or $digest). I am informing resizer to update using dom events. What do you think about that? (1) $watching the size is an expensive operation because it will force a reflow every time you check the height. So cancel the $watch asap. (2) There is no guarantee that angular will trigger a digest cycle at the right time so using dom eve…
accepted answer of: http://stackoverflow.com/q/25189278
has comment: http://stackoverflow.com/comment/39366132
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39111162
type: AnswerComment
type: Comment
has text: Could have sworn I tried that already! Embarrassing when it's so simple. Thanks!
comment on: http://stackoverflow.com/a/25128156
score: 0

http://stackoverflow.com/q/25156613
score: 1
has comment: http://stackoverflow.com/comment/39163641
has title: How run a CasperJS instance in multiple process using NodeJS?
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39164307
tagged with: node.js
tagged with: casperjs
downvote count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/39164782
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/22513730
has body: I need to run a CasperJS script many times at different moments to simulate simultaneous connections on my website. The script is connecting to my website and do some others actions and I want to see if the server can handle it. I know it is possible to do that using NodeJS (CasperJS, parallel browsing WITH the testing framework check the response) and his child_process module, but I couldn't succeed to do it from now. I want to launch a couple of process every 5 secs until I have X process launch at the same time. I would like an example of doing this using this pseudo code logic. var deth = 8; var factor = 2; var spawn = require('child_process').spawn; function launchXProcess(nb_process) { for (var i = 1; i &lt;= nb_process; i++) { // spawn a new process 'casperjs scritp.js' // log the process outputs // keep going } } function newPoolOfProcess(i) { // First time if (i === 1) { launchXProcess(i); i++; // wait 5 sec and launch the next one setTimeout(newPoolOfProcess(i), 5000); } // Reach the last pool, launch it and exit if (i === deth) { launchXProcess(i); process.exit(code = 0); } else { launchXProcess(i); i *= factor // wait 5 sec and launch the next one setTimeout(newPoolOfProcess(i), 5000); } } // start newPoolOfProcess(1); Following this logic at a T moment I will have many process connected to my website. The CasperJS script is taking more than a minute to be completed to make sure I will have many process connected before its done. I have tried to use the spawn method from the chil_process but without success. Please show me how to complete that, thanks

http://stackoverflow.com/comment/39124831
comment on: http://stackoverflow.com/q/25135558
score: 1
has text: Hope you already saw this; may be some bad code like this will get a pass when unminified, but actual error unviels when minified http://stackoverflow.com/questions/16484566/javascript-error-when-minified
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25218347
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25218507
score: 0
tagged with: firefox-addon
answer count: 1
has comment: http://stackoverflow.com/comment/39279043
has comment: http://stackoverflow.com/comment/39278888
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39284973
has body: In EU we have this law that requires web pages to request permission to store cookies. Most of us know about cookies and agree to them but still are forced to accept them explicitly everywhere. So I plan to write this add on (ff &amp; chrome) that will automatically add session cookie with standard name that would mean agreement. Just wondering about few things: 1) What should be the name of the cookie? What should be the value? Should I cover only user agreement option? My proposition is _cookieok=1 the benefit is that it is short, yet descriptive. 2) Should I add only single cookie - the one I suggested above? Many pages do it in different ways already. They use different cookie names and check for different values. I thought maybe use names and values from popular scripts like http://cookiecuttr.com/ but I don't want to increase upload traffic with a number of mostly not needed cookies. 3) Should I differentiate between types of cookies? I have seen here http://demo.cookieconsent.silktide.com/ there are multiple cookie types you can opt-in/opt-out? 4) Does this have chances to become popular or is it better to use something like point 2 - adding multiple values manually? 5) I could probably also remove those cookies after some event (like after all js onload functions have finished) but I could not find proper hook in firefox addons. Plus maybe some people would like to do filtering out of the script on server side so maybe it is better to keep sending the cookie. Is there something I have not thought about? My suggested code is in case of FF: var pageMod = require("sdk/page-mod"); pageMod.PageMod({ include: "*", contentScriptWhen: 'start', contentScript: 'document.cookie="_cookieok=1;path=/";' }); Update To explain how does it work 1) Most sites already compliant to cookie law do something like this: if ($.cookie('_cookieok') == null) { $('#cookie-close').on('click', function (evt) { $.cookie('cookieok', 1, 300); }); $('.cookie-prompt').show(); } so if we agree …
tagged with: firefox-addon-sdk
tagged with: cookies
upvote count: 1
has title: Browser addon to automatically opt-in for cookies - EU cookie law

http://stackoverflow.com/a/29359262
has comment: http://stackoverflow.com/comment/54897917
upvote count: 4
has comment: http://stackoverflow.com/comment/101196387
has body: moment().endOf('month').day('Monday')
score: 1
answers question: http://stackoverflow.com/q/25126829
downvote count: 3
type: Answer

http://stackoverflow.com/q/25222292
has comment: http://stackoverflow.com/comment/39289049
type: Question
tagged with: javascript
tagged with: facebook-like
has title: Like Button of Facebook Page on website
has answer: http://stackoverflow.com/a/25222510
answer count: 1
downvote count: 0
tagged with: facebook-graph-api
favorite count: 0
has body: I know that the procedure is simple, but for some reason I'm unable to add a Like Button for a facebook page on my website. Here are the steps I followed: 1. Make a Facebook page: myFacebookPage (`https://www.facebook.com/myFacebookPage`) 2. Go to `https://developers.facebook.com/docs/plugins/like-button` 3. Add the page URL: `https://www.facebook.com/myFacebookPage` (It displays the like button there) 4. Click "Get Code". 5. Paste the code on my website page. This code after the &lt;body&gt; tag: &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt;(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));&lt;/script&gt; This code at the place I want my like button: &lt;div class="fb-like" data-href="https://www.facebook.com/myFacebookPage" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"&gt;&lt;/div&gt; On opening the website, it displays the Like Button but doesn't allow me to like it. It displays that "Signup for Facebook" though, I'm already logged into Facebook on another tab.
type: UnansweredQuestion
tagged with: facebook
score: 1
upvote count: 1

http://stackoverflow.com/a/28856321
type: Answer
answers question: http://stackoverflow.com/q/25221480
score: 0
has body: Add these parameters to your object element at the end: &lt;param name="includeAPI" value="true" /&gt; &lt;param name="templateLoadHandler" value="onTemplateLoaded" /&gt; &lt;param name="templateLoadHandler" value="onTemplateLoad" /&gt; &lt;param name="templateReadyHandler" value="onTemplateReady" /&gt;

http://stackoverflow.com/comment/39060857
comment on: http://stackoverflow.com/q/25101301
score: 0
type: Comment
type: QuestionComment
has text: Not sure what you mean by `offsetHeight` doesn't work in webkit browsers. I do use Chrome and it does work. Check [this](http://jsfiddle.net/hari_shanx/RhYNL/).

http://stackoverflow.com/comment/39115183
comment on: http://stackoverflow.com/a/25130373
type: AnswerComment
score: 0
has text: How would you call multiple functions from onsubmit?
type: Comment

http://stackoverflow.com/q/25111898
linked to: http://stackoverflow.com/q/901115
answer count: 0
tagged with: url
tagged with: query-string
has comment: http://stackoverflow.com/comment/39093791
duplicate of: http://stackoverflow.com/q/901115
type: Question
has comment: http://stackoverflow.com/comment/39080569
has comment: http://stackoverflow.com/comment/42295759
has title: How can I get query string values in JavaScript - part 2?
score: 0
has comment: http://stackoverflow.com/comment/39093840
has body: The following is a question now closed Is there a plugin-less way of retrieving query string values via jQuery (or without)? If so, how? If not, is there a plugin which can do so? Would someone be so kind as to let me answer my own question because there's no good answer in the other bloody answer? You know what, never mind. I'm not going to fight to be "allowed" to post a good solution. What's in that for me? Just a lot of annoyance, that's what.
has comment: http://stackoverflow.com/comment/39097278
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39095229

http://stackoverflow.com/comment/39171526
comment on: http://stackoverflow.com/a/25160694
type: Comment
has text: Thanks JRulle appreciate the help alot, hopefully I will find a solutions to this issue.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25214627
has comment: http://stackoverflow.com/comment/39272047
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/39272038
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25215998
accepted answer: http://stackoverflow.com/a/25215998
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/39271980
has body: I'm using the grunt-mocha-test package to run my unit tests in Node. Here's how the config object for grunt-mocha-test looks in my gruntfile: mochaTest: { src: watchFiles.serverTests, options: { reporter: 'spec', require: 'server.js' } } watchFiles.serverTests is an array of file paths. server.js bootstraps my app. In server.js, I have something like the following: var db = mongoose.connect(config.db, function(err) { // Setup express, etc. here // Set module exports }); Previously, that looked something like this: var db = mongoose.connect(config.db); // Setup express, etc. here (some of which reference db) // Set module exports The problem was that Express needed the database connection to be successfully in order for it to initialize properly. Without the async database connection, I was getting some strange errors. So, I switched to the async setup. Now, however, when I require server.js with the async calls inside, the test runner fires off the Mocha tests before the app is completely fired up. Because of this, I need to find a happy medium along these lines: var db = mongoose.connect(config.db, function(err) { // Setup express, etc. here // Set module exports }); // Do something here that waits for the above to complete, // so that the module is loaded synchronously. As an alternative, I can pass a function to the mochaTest config object. Is there a way I could create this behavior there?
favorite count: 0
has comment: http://stackoverflow.com/comment/39272176
has comment: http://stackoverflow.com/comment/39272147
has comment: http://stackoverflow.com/comment/39272223
has title: Mocha test runner (grunt-mocha-test) require timing issues
tagged with: node.js
has comment: http://stackoverflow.com/comment/39272216
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39272213
type: Question
has comment: http://stackoverflow.com/comment/39272190
tagged with: javascript

http://stackoverflow.com/comment/39072934
has text: Ok so I have figured out prime numbers and I understand multiplying. I am not sure about last part. For what I need to run modulo ? Isn't it enough to just compare those two numbers with equality ?
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25106192
type: AnswerComment

http://stackoverflow.com/q/25221893
type: UnansweredQuestion
tagged with: repeat
has title: Javascript Countdown Clock: Countdown to every two days
has comment: http://stackoverflow.com/comment/39285518
type: Question
tagged with: clock
tagged with: javascript
has comment: http://stackoverflow.com/comment/39286806
has body: Does anyone know a Javascript countdown widget that allows me to repeat the countdown every two days. I.E. An event is on Monday, Wednesday, Friday, and Saturday, I want it to count down to those days.
score: 0
has comment: http://stackoverflow.com/comment/39287038
tagged with: countdown
tagged with: timer
answer count: 0

http://stackoverflow.com/a/25225108
has comment: http://stackoverflow.com/comment/39306059
has body: You're getting the Uncaught TypeError: undefined is not a function error because of hoisting. Looking at the first link you provided, there was one key difference between your version and theirs: the conditional. Your (second) version: function runMe(thething) { alert("the function has successfully run: " + thething); } // function we want to run var fnstring = "runMe"; alert("string: " + fnstring); // find object var fn = window[fnstring]("lkjlksdfsdfj"); alert("function: " + fn); // is object a function? alert("is function?: " + typeof fn === "function"); fn(); My version, working without errors: function runMe(thething) { console.log("the function has successfully run: " + thething); } // function we want to run var fnstring = "runMe"; // find object var fn = window[fnstring]("lkjlksdfsdfj"); // is object a function? if (typeof fn === "function") fn(); The reason why your version throws an error is that it is being hoisted into something like this: function runMe(thething) { alert("the function has successfully run: " + thething); } var fnstring, fn; fn(); fnstring = "runMe"; fn = window[fnstring]("lkjlksdfsdfj"); So when it's called it isn't a function; it's an undefined variable. On the other hand, as far as I understand hoisting, my version gets hoisted something like this: function runMe(thething) { console.log("the function has successfully run: " + thething); } var fnstring, fn; fnstring = = "runMe"; fn = window[fnstring]("lkjlksdfsdfj"); if (typeof fn === "function") fn(); So that by the time the function is actually called, everything's good to go.
downvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39306119
accepted answer of: http://stackoverflow.com/q/25171584
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25171584
score: 1

http://stackoverflow.com/a/25167369
has comment: http://stackoverflow.com/comment/39184460
has body: You're attaching a click event to everything selected by $('.test') each time you create a new element, which is every element that has that class, including those you've already appended. Why not use event delegation, which will allow you to bind a single event handler once? $('#container').on('click', '.test', function(e){ ... }); All clicks on .test elements will bubble up to #container and you can handle them there.
answers question: http://stackoverflow.com/q/25167313
upvote count: 2
has comment: http://stackoverflow.com/comment/39185947
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25167313

http://stackoverflow.com/q/25091659
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/39043269
has comment: http://stackoverflow.com/comment/39043344
has comment: http://stackoverflow.com/comment/39043137
score: -1
type: Question
has body: i am trying to execute a link so that page do not redirect but just execute the link.. i tried with the below curl pgm (completely new to curl) $ch = curl_init(); // Initializing curl_setopt($ch, CURLOPT_URL,"http://api.smsgatewayhub.com/smsapi/pushsms.aspx?user=stthomasmtc&amp;pwd=429944&amp;to=9176411081&amp;sid=STMTSC&amp;msg=Dear Sam,%20choir%20practice%20will%20be%20held%20in%20our%20Church%20on%20July%2031%20at%208:00%20pm.%20Thanks,%20St.%20Thomas%20MTC!&amp;fl=0&amp;gwid=2"); // Set URI curl_setopt($ch, CURLOPT_HEADER, 0); //Set Header curl_setopt($ch, CURLOPT_TIMEOUT, 300); // Time-out in seconds $result = curl_exec($ch); // Executing $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($httpCode != 200) { $result = ""; // Executing } curl_close($ch); // Closing the channel return $result; but this didnt work as expected... i tried to use javascript code in php echoed, but since that php file was called via ajax that script didnt get execute.. :( calling pgm &lt;div class="button_div"&gt; &lt;input type="button" onclick="send_sms()" value="Send SMS" class="submit"&gt; &lt;/div&gt; and the javascript functions function send_sms() { var sms_msg=(document.getElementById('preview_box').value).trim(); /* var prayer_group_nm=(document.getElementById('prayer_group').value).trim(); if ((recepient==='prayer_grp')&amp;&amp;(prayer_group_nm==='select')) { alert('Select the appropriate Prayer group'); return; } */ if (sms_msg==='') { alert ('Preview MSG prior to sending!'); } else { myurl = '../sp/send_sms_sp.php'; parms="?recepient="+recepient+"&amp;sms_msg="+sms_msg; modurl = myurl+parms; if (recepient==='prayer_grp') { modurl=modurl+"&amp;prayer_group_nm="+prayer_group_nm; } response='sms_templates_response'; //setting div where response is being displayed swtch='send_sms_state'; ajax_call.call(); //removing earlier checked state of radio buttons $("input:radio").attr("checked", false); document.getElementById('preview_box').value=''; //hiding out unwanted divs $(…
has comment: http://stackoverflow.com/comment/39043184
has comment: http://stackoverflow.com/comment/39043724
upvote count: 0
has answer: http://stackoverflow.com/a/25091866
answer count: 1
tagged with: javascript
has title: how to execute a link in ajax called php script
tagged with: ajax
has comment: http://stackoverflow.com/comment/39043244
has comment: http://stackoverflow.com/comment/39043169
has comment: http://stackoverflow.com/comment/39043117
has comment: http://stackoverflow.com/comment/39043125
linked to: http://stackoverflow.com/q/25087560
has comment: http://stackoverflow.com/comment/39043665
favorite count: 0
has comment: http://stackoverflow.com/comment/39043492
tagged with: curl
has comment: http://stackoverflow.com/comment/39043253
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39043367

http://stackoverflow.com/q/25141196
tagged with: javascript
has body: I am trying to create a form that will appear when a button on an item page is pressed to receive a quote. Since there are many items, I want to know the URL of the page the form was received on and I am not sure how to achieve this. My question is how do I grab the URL of the page the button was pressed on and then submit it along with the form as a hidden value so that I am aware what item was requested for a quote? Here is my code for the form. The Source URL input is just a placeholder. &lt;form action="http://et-signup.topright.com/oemSignup/subscribe" name="subscribeForm" method="post" onsubmit="alert('Thank You We Will Contact You Shortly'); return true;"&gt; &lt;input type="hidden" name="urlOfSubscribeThankYouPage" value="http://myurl.com"&gt; &lt;input type="hidden" name="urlOfErrorPage" value="http://myurl.com"&gt; &lt;input type="hidden" name="urlOfUnsubscribeThankYouPage" value="http://myurl.com"&gt; &lt;input type="hidden" name="mid" value="6286675"&gt; &lt;input type="hidden" name="listName" value="Item Page List - 52083"&gt; Email Address: &lt;input type="email" required="required" name="emailAddress"/&gt; &lt;br/&gt; First Name: &lt;input name="profile.First Name"&gt;&lt;br/&gt; Last Name: &lt;input name="profile.Last Name"&gt;&lt;br/&gt; Company Name: &lt;input name="profile.Company Name"&gt;&lt;br/&gt; Phone: &lt;input name="profile.Phone"&gt;&lt;br/&gt; Estimated Quantity: &lt;input name="profile.Estimated Quantity"&gt;&lt;br/&gt; Comments: &lt;input name="profile.Comments"&gt;&lt;br/&gt; Small: &lt;input name="profile.Small"&gt;&lt;br/&gt; Medium: &lt;input name="profile.Medium"&gt;&lt;br/&gt; Large: &lt;input name="profile.Large"&gt;&lt;br/&gt; Extra Large: &lt;input name="profile.Extra Large"&gt;&lt;br/&gt; 2XL: &lt;input name="profile.2XL"&gt;&lt;br/&gt; 3XL: &lt;input name="profile.3XL"&gt;&lt;br/&gt; Source URL: &lt;input name="profile.Source URL"&gt;&lt;br/&gt; &lt;input type="hidden" name="SubAction" value="sub_add_update"&gt; &lt;input ty…
accepted answer: http://stackoverflow.com/a/25141882
has title: Grabbing the page URL and submitting it when form is submitted?
score: 0
answer count: 2
tagged with: jquery
has answer: http://stackoverflow.com/a/25141369
has comment: http://stackoverflow.com/comment/39135314
has comment: http://stackoverflow.com/comment/39135322
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39135245
possible better answer: http://stackoverflow.com/a/25141369
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25141882
has comment: http://stackoverflow.com/comment/39135099
type: Question

http://stackoverflow.com/q/25151286
has comment: http://stackoverflow.com/comment/39154158
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39154387
has title: Search for the key in the given array of objects and replace the value;
has comment: http://stackoverflow.com/comment/39154230
type: Question
type: AnsweredQuestion
tagged with: underscore.js
has comment: http://stackoverflow.com/comment/39154173
has answer: http://stackoverflow.com/a/25151596
accepted answer: http://stackoverflow.com/a/25151596
has comment: http://stackoverflow.com/comment/39154184
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Implementing the multiple sort functionality; Where need to toggle the array which hold the sorting fieldname and sorting order; Example Click Sort By Name: [{"sortKey":"name","sortValue":"desc"}] Again Click Sort By Name: [{"sortKey":"name","sortValue":"asc"}] Click Sort By Age: [{"sortKey":"name","sortValue":"asc"},{"sortKey":"age","sortValue":"desc"} ] Again Click Sort By Name: [{"sortKey":"name","sortValue":"desc"},{"sortKey":"age","sortValue":"desc"} ] DEMO if (checkIfObjectExists($scope.sortList, sortingObject)) { if (!$scope.sortList.hasOwnProperty(sortingObject.sortType)) { console.log($scope.sortList); // replace the value for the key } } else { $scope.sortList.push(sortingObject); }
score: 0
has comment: http://stackoverflow.com/comment/39154674

http://stackoverflow.com/comment/39117265
type: Comment
comment on: http://stackoverflow.com/q/25130694
has text: I'm using Angular already to build my app so I think it'd be best to avoid redundancy
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39209294
has text: Yes, I realized that after posting. Thanks for bringing that up
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25181613
type: AnswerComment

http://stackoverflow.com/comment/39056828
type: QuestionComment
comment on: http://stackoverflow.com/q/25099140
score: 0
has text: yea the real code is indented at the correct levels i believe.
type: Comment

http://stackoverflow.com/a/25141001
has comment: http://stackoverflow.com/comment/39138207
has comment: http://stackoverflow.com/comment/39135076
accepted answer of: http://stackoverflow.com/q/25140839
type: Answer
answers question: http://stackoverflow.com/q/25140839
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39137658
has body: I think you need to use promises for this: var promises = []; for (var i = 0; i &lt; categories.length; i++) { promises.push( (function(innerI){ return $.ajax({ url: '@Html.Raw(Url.Action("GetCat", "MController"))', data: { ID: cetada }, success: function (data) { var optgroup = $('&lt;optgroup&gt;').attr('label', categories[innerI]); var subcategories = data.split(","); for (var i = 0; i &lt; subcategories.length; i++) { var option = $('&lt;option&gt;').val(subcategories[i]).text(subcategories[i]); optgroup.append(option); } $("#picker").append(optgroup); } }); })(i)); // unbind i to make closure work. } $.when.apply($, promises).then(function() { $("#picker").trigger('chosen:updated'); }); UPDATE1: I missed closures on first look, now th code is updated. UPDATE2: Rewrote working with tags inside success callback of ajax request. UPDATE3: Here is simple demo, I've commented some non-important code to show how it works.
has comment: http://stackoverflow.com/comment/39136282
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/39034025
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25085326
has text: When I load http://hombero.com/final-storms/#page-charts and then click the Reports navbar item, and then click the 'Choose Reports' button the resulting popup is not styled as it is if clicked directly from http://hombero.com/final-storms/#page-reports . Additionally when I then use the menu to navigate to other pages the navigation menu breaks down with the active navbar item not being set anymore
score: 0

http://stackoverflow.com/comment/39216933
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25185505
has text: How about just splitting the original format on a space. Like: `"2014-07-08 00:00:00".split(" ")[0]`
type: QuestionComment

http://stackoverflow.com/q/25170362
tagged with: if-statement
tagged with: javascript
type: UnansweredQuestion
has body: I currently have an inventory page that is populated by a MySQL database. I'm working on a page that can update the stock of an inventory item. I have three php files: File One: Displays a dropdown of item names, the number in stock of the currently selected item, a dropdown option asking the user if they are adding or removing from the inventory, and a textbox for the change in number in stock. This page is a form. File Two: Takes the currently selected dropdown item and grabs its number in stock from the database, echos it out to the page, and then takes whatever number is echoed out and prints it out as the displayed number in stock in a div in File One. I'm trying to use that value--the number in stock that is returned on File One--in order to compare it to the amount changed textbox input, so users can't remove more then what is available. File Three: The form action for File One. This is where I am attempting to code the if statement that compares the two values. Here is the code for File Two: $receivedString = null; if ($_GET["item"] != ""){ $receivedString = $_GET["item"]; } if($receivedString != null){ //Check connection $db = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ('Could not connect to SOIS MySQL server with error: ' . mysqli_connect_error()); $query = mysqli_query($db, "SELECT numInStock FROM SOISInventoryList WHERE id = $receivedString"); if (!$query){ echo "Could not find query."; } while($row = mysqli_fetch_assoc($query)){ echo $row['numInStock']; } } Here is the jQuery function for File Two: $(document).ready(function(){ $.get( "grab-num-in-stock.php", function( data ) { $( ".result" ).html( data ); }); }); $(function(){ $('#itemNameDropDown').change(function(){ var SelectedItem = $(this).val(); //Sending the selected item value to the php file as JSON //Assuming that the php file is setup to consume $_GET variables $.get('grab-num-in-stock.php', {"item": SelectedItem}) .done(function(returnedData){ //Assuming just a string is …
tagged with: jquery
type: Question
tagged with: php
has title: PHP - Is it possible to grab a dynamically generated value in one file to use in another file in an if statement?
score: 0
tagged with: mysql
answer count: 1
has answer: http://stackoverflow.com/a/25170506

http://stackoverflow.com/comment/39134570
comment on: http://stackoverflow.com/q/25140994
has text: Which browser are you using?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25075807
has answer: http://stackoverflow.com/a/55990060
tagged with: javascript
upvote count: 11
answer count: 11
has body: I want to hide automatically the Boostrap tooltip after few seconds. &lt;input type="text" title="" data-placement="bottom" style="width:200px" data-toggle="tooltip" autocomplete="off" data-provide="typeahead" class="form-control Waring" name="medicine_name" id="medicine_name" data-original-title="Please Enter Valid medicine name"&gt;
has title: Auto hide bootstrap tooltip
has answer: http://stackoverflow.com/a/34914863
possible better answer: http://stackoverflow.com/a/32715047
has answer: http://stackoverflow.com/a/74294085
has answer: http://stackoverflow.com/a/45977925
favorite count: 0
accepted answer: http://stackoverflow.com/a/25076052
tagged with: http://stackoverflow.com/tag/html
score: 11
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
has answer: http://stackoverflow.com/a/25076052
downvote count: 0
has answer: http://stackoverflow.com/a/32715047
has answer: http://stackoverflow.com/a/55071657
has answer: http://stackoverflow.com/a/25075901
has answer: http://stackoverflow.com/a/53082547
has answer: http://stackoverflow.com/a/38757646
tagged with: twitter-bootstrap-tooltip
type: Question
has answer: http://stackoverflow.com/a/62334182

http://stackoverflow.com/comment/39261500
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25208624
has text: Its brought in in another part of the app. @msarchet
score: 0

http://stackoverflow.com/a/25331102
score: -1
upvote count: 0
has body: I modified your code a bit, and enden up with this: window.onload=function(){ var killIt=["http://www.twitch.tv/directory/game/Minecraft", "http://www.twitch.tv/directory/game/League%20of%20Legends", "http://www.twitch.tv/directory/game/Hearthstone%3A%20Heroes%20of%20Warcraft"]; var el = document.getElementsByClassName("boxart"); for (i = 0; i &lt; el.length; i++) { for (j=0;j&lt;killIt.length; j++) { if (el[i].parentNode.href==killIt[j]) { el[i].parentNode.parentNode.parentNode.remove(); } } } }; I added the window.onload function because Greasemonkey and Tampermonkey has a tendency of executing the code before the HTML is completely loaded. I struggled finding your original-title attribute, and decided to go for the href instead, which is always there (I also changed the values in the killIt array into href's). At last, I made it so you delete the node for the whole game item on the page (and not just the boxart) if this is what you wanted?
answers question: http://stackoverflow.com/q/25217181
type: Answer
downvote count: 1

http://stackoverflow.com/comment/39094734
type: AnswerComment
comment on: http://stackoverflow.com/a/25119317
type: Comment
has text: I meant 2 onDrop funcs as I written above, which both would be active each on every event... probably immposible so will do as you said, thank you :)
score: 0

http://stackoverflow.com/a/25207394
type: Answer
answers question: http://stackoverflow.com/q/25207188
score: 1
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25207188
type: AcceptedAnswer
has body: First of all, you should probably not use jQuery that much in Angular, namely - Angular already ships with deferreds and promises and $http can replace $.get just fine. Now for your problem, my CoffeeScript is kind of rusty, but you should chain the promises: ss = -&gt; sheets = document.styleSheets text = "&lt;script type = 'text/css'&gt;"; links = sheet.href for sheet in sheets when sheet.href? # now chain them all links.reduce((p, c) -&gt; p.then( -&gt; $http.get(c).then(data -&gt; text += data)),$q.when()) .then(val -&gt; val + "&lt;/style&gt;") Now you can do: ss.then(text -&gt; console.log text)

http://stackoverflow.com/q/25095260
type: Question
has title: Bootstrap caption outside carousel
tagged with: javascript
has body: Iam adding bootstrap carousel to my site. I need bootstrap caption to be placed outside of the image in the right section. I did it but the caption is not adjusting with the container? if anyone knows how to fix this it will be greatful..... &lt;style&gt; .img-swap { cursor: pointer; } .content-container:after { clear: both; content: ""; display: block; } .fullview { height: 16px; padding: 0px; width: 18px; } .clean { background-position: -253px 0; } .hide-sidebar { margin-left: -253px; } .clean { background-position: -253px 0; } @import url('http://getbootstrap.com/dist/css/bootstrap.css'); .slider-container { margin-top:35px; height:100%; } .carousel-caption { position: absolute; top: 0; text-align: left; left: inherit; right: inherit; width: 200px; color:#000; } .carousel-caption:not(#caption-0) { display: none; } @media (max-width: 1024px) { .right-side-content .wrapper { margin-right: 20px; } .right-side-content.full-content .wrapper { margin-right: -253px; } body { background-position: -253px 0; } body.clean { background-position: 0 0; } .left-side-content { margin-left: -253px; z-index: 99; } .left-side-content.hide-sidebar { margin-left: 0; } } &lt;/style&gt; &lt;/head&gt; &lt;body class=""&gt; &lt;header class="title hidden-xs " role="banner"&gt; &lt;div class="fluid-container"&gt; &lt;div class="row"&gt; &lt;div class="navbar landing-header navbar-inverse navbar-fixed-top col-lg-12 col-md-12 col-sm-12 bg-dkorange" role="navigation"&gt; &lt;div class="navbar-header col-lg-4 col-md-4 col-sm-4"&gt; &lt;div class="col-lg-12"&gt; &lt;a class="navbar-brand" href="#"&gt;&lt;img src="images/hudooku-logo-white-sml.png" alt="logo" class="img-responsive"&gt;&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="navbar-header pull-right"&gt; &lt;div class="row"&gt; &lt;div class=" signup-sec"&gt; &lt;div class="signup"&gt; &lt;button class="btn btn-white gotham-bold"&gt;SIGN IN&lt;/button&gt;&lt;span class="padd-lt8 padd-rt3"&gt; / &lt;/span&gt; &lt;button class="btn btn…
has answer: http://stackoverflow.com/a/25095465
score: 2
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 2
tagged with: twitter-bootstrap

http://stackoverflow.com/comment/39254734
comment on: http://stackoverflow.com/a/25205550
score: 0
type: Comment
has text: Hmm, I was unfamiliar with the :target solution, but googled it and it seems like a better fit for this case, yes. Thanks for pointing it out.
type: AnswerComment

google-sheets
tags question: http://stackoverflow.com/q/25212075
type: Tag
tags question: http://stackoverflow.com/q/25174057
tags question: http://stackoverflow.com/q/25227987
tag name: google-sheets

http://stackoverflow.com/a/25189804
downvote count: 0
type: Answer
has body: This is not a valid setting... onkeyup: true As per documentation, onkeyup Type: Boolean or Function() Validate elements on keyup. As long as the field is not marked as invalid, nothing happens. Otherwise, all rules are checked on each keyup event. Set to false to disable. Set to a Function to decide for yourself when to run validation. A boolean true is not a valid value. In other words, validation on every keyup event is already the default behavior so you must not set this option to true. You can only set this option to false (to disable) or to a function (to over-ride). Leave the option out to keep the default behavior.
answers question: http://stackoverflow.com/q/25188149
score: 1
upvote count: 1

http://stackoverflow.com/comment/39041415
type: AnswerComment
type: Comment
has text: Don't I receive a response under success though?
comment on: http://stackoverflow.com/a/25090771
score: 0

http://stackoverflow.com/q/25094211
score: 0
possible better answer: http://stackoverflow.com/a/25094485
answer count: 3
has answer: http://stackoverflow.com/a/25094485
has title: Generating series numbers with adding String at middle
has answer: http://stackoverflow.com/a/25157578
has comment: http://stackoverflow.com/comment/39047666
type: AnsweredQuestion
tagged with: algorithm
has body: Am writing JavaScript plugin to one of my client, in this i need to generate a series strings like "1,2,D,3,4" / "1,D,2,3,4,5,6". length can be n numbers. "D" positions are stored in a separate string like 2,4. Here, based upon this length we want to generate like below String = 1,2,3,4,5 D Positions: 2,4 Final result should be: 1,D,2,D,3 Something i tried, var deletedString = "2,4" var Values = "1,2,3,4,5,6"; var lengthFromValues = SplitString_ToArray(Values).length; var deletedArray = splitString_ToArray(deletedString); var temp_arr = []; for(var i = 1; i &lt;= lengthFromValues; i++) { if(deletedArray[i-1] &gt; 0) { temp_arr.push("D"); } else temp_arr.push(i); } alert(temp_arr.toString()); Note: SplitString_ToArray function is a self written function which will convert(split) string to array. Will someone help me?
type: Question
accepted answer: http://stackoverflow.com/a/25157578
tagged with: for-loop
tagged with: arrays
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39047723
has answer: http://stackoverflow.com/a/25095000

http://stackoverflow.com/q/25088876
has title: Auto binding of bundles
tagged with: css
answer count: 0
score: 1
upvote count: 1
has body: I have my BundleConfig with many many bundles of css and JS. Is there any plugins or tools to auto bind it? For example I have HomeController and Content/Home.css or for example Content/Home/Index.css and this css files bind with view of my controller automatically.
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
downvote count: 0
tagged with: bundle
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25169602
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: -4
type: AnsweredQuestion
has title: Where is web-based doc for Sonarqube javascript, css, and html checkers?
tagged with: sonarqube
type: Question
accepted answer: http://stackoverflow.com/a/25176581
downvote count: 4
upvote count: 0
has body: I am looking for something like this: http://jshint.com/docs/options/ for the Sonarqube equivalent, and also for Sonarqube html and css. By comparison, this: http://docs.codehaus.org/display/SONAR/JavaScript+Plugin is almost useless.
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25176581

http://stackoverflow.com/q/25147118
tagged with: audio
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39146733
possible better answer: http://stackoverflow.com/a/25147377
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39147288
answer count: 2
accepted answer: http://stackoverflow.com/a/25560654
has title: do i need an html audio element to play song using web audio api
has answer: http://stackoverflow.com/a/25560654
has comment: http://stackoverflow.com/comment/39146999
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25147377
has body: Just started to learn web audio api.i have searched for how to load and play audio file using web audio api in Chrome.i kind of copy paste the codes here except an click event.here i want to play a song through an onClick event.But unfortunately no sound is playing. i have some questions regarding the codes: $ do i need an html audio element to use web audio api functionalities?? $ is there anything wrong with the code??if there is please help me to figure it out. i am getting following errors: 1. it says XMLHttp can not load m.mp3 .cross origin request are only supported for HTTP 2 uncaught ref. error: failed to execute 'send' on XMLHttpRequest.. the code below:

http://stackoverflow.com/a/25110104
type: Answer
has body: You could distribute your webpages along with a portable Nginx server, or wrapped inside a Node-webkit or AppJS package.
has comment: http://stackoverflow.com/comment/39107793
score: 0
answers question: http://stackoverflow.com/q/25109904

http://stackoverflow.com/comment/39193471
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25171718
has text: thanks!! worked perfectly. In regards to declaring the orderSummary() function, is it detrimental having it inside the calculate function, or is it more of a best-practice reason? btw, how do you get inline code to show up in comments? I'm a noob.. can't figure it out
type: Comment

http://stackoverflow.com/q/25103386
has title: Raspberry Pi PHP GPIO read
tagged with: linux
accepted answer: http://stackoverflow.com/a/25386345
favorite count: 0
has body: I've got this script to check the GPIO pin status: That connects to a button and span: Status: Check Status The check PHP code is: <?php system(exec ( "GPIO read 1", $status )); system(print_r ( $status )); ?> I keeps outputing Closed, though the pin is set at 1... When I run the read from the commandline on the Raspberry Pi it gives me 1.... But the PHP script I think is not working...
has answer: http://stackoverflow.com/a/25104127
tagged with: gpio
has answer: http://stackoverflow.com/a/25104067
tagged with: php
has answer: http://stackoverflow.com/a/25386345
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39064438
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/56514882
type: Question
tagged with: raspberry-pi
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25104067
has comment: http://stackoverflow.com/comment/39064560

http://stackoverflow.com/a/50149186
has body: Use the below code. It is useful for you. let currentDate = new Date() currentDate.toISOString()
answers question: http://stackoverflow.com/q/25159330
score: -7
downvote count: 8
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39378813
type: AnswerComment
has text: I know this issue, but it is not valid latex code, so i ignored it
comment on: http://stackoverflow.com/a/25251718
score: 0
type: Comment

http://stackoverflow.com/a/25102196
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25099241
score: 1
has body: You can't do that but you can use ng-switch like,
downvote count: 0

http://stackoverflow.com/a/25141385
upvote count: 1
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39135653
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25141258
answers question: http://stackoverflow.com/q/25141258
score: 1
has body: The || operator is binary because it has only two operands: condition1 || condition2. ?: is ternary because it has three operands: condition ? value_if_true : value_if_false.

http://stackoverflow.com/comment/39279476
type: AnswerComment
comment on: http://stackoverflow.com/a/25217688
has text: please test the same in local system exactly as you trying to do then then tell what really happens if it is same or different??
score: 0
type: Comment

http://stackoverflow.com/comment/39043565
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25091840
type: Comment
has text: client side ..I know 3 way to store localstorage,session storage.I know how to implement in angular..But there is table way i don't know that

http://stackoverflow.com/a/25104444
has body: Have you tried var store = db.createObjectStore(...) I mean you should remove the word 'obj' You can take a look at the example here
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25101892
has comment: http://stackoverflow.com/comment/39068766
has comment: http://stackoverflow.com/comment/39097120

http://stackoverflow.com/comment/118048035
score: 1
has text: adding `origin` path parameter worked like charm.❤
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/64693106

http://stackoverflow.com/q/25121464
answer count: 2
has body: Is it possible to restrict the access to a html/php website only at specific times? I have a php file on my Raspberry Pi and I already set up a .htaccess file so that users have to log in, but I also want to restrict the times of access. Users should only be able to access (or log in) the page between 7am and 1pm. Since I have root access to my Raspberry Pi, I kind of have infinite possibilities to do so (apache2, html, css, javascript, php, ...)
possible better answer: http://stackoverflow.com/a/25121517
tagged with: apache
downvote count: 0
tagged with: .htaccess
favorite count: 0
has comment: http://stackoverflow.com/comment/39098310
has title: Allow access to website only at specific times?
has comment: http://stackoverflow.com/comment/39098314
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25121547
has comment: http://stackoverflow.com/comment/39101854
tagged with: php
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/25121547
has answer: http://stackoverflow.com/a/25121517
tagged with: javascript
has comment: http://stackoverflow.com/comment/39098341

http://stackoverflow.com/a/25201525
score: 0
has comment: http://stackoverflow.com/comment/39250934
type: Answer
has body: First, add link to your page: &lt;a id='showContent'&gt;&lt;/a&gt; &lt;div id='content' style='display: none;'&gt;&lt;/div&gt; Than use some jQuery to show content: $(document).ready(function(){ $('#showContent').click(function(event){ e.preventDefault(); // prevent link from following it's href $('#content').toggle(); }); }); Toggle will switch display state from display: none to display: block and from display: block to display.none. You can use show and hide instead. To show with animation: slideDown / fadeIn; hide: slideUp / fadeOut; toggle: slideToggle / fadeToggle
has comment: http://stackoverflow.com/comment/39251522
answers question: http://stackoverflow.com/q/25201355

http://stackoverflow.com/q/25142508
has title: Not able to access id attribute of text tag in javascript
has comment: http://stackoverflow.com/comment/39137208
has comment: http://stackoverflow.com/comment/39137558
has comment: http://stackoverflow.com/comment/39138149
has comment: http://stackoverflow.com/comment/39138545
type: Question
has comment: http://stackoverflow.com/comment/39137721
tagged with: javascript
has comment: http://stackoverflow.com/comment/39137903
has answer: http://stackoverflow.com/a/25142951
score: 0
has body: I am not able to access the id attribute of the text tag and the lines of savepath function are not working in my javascript code. function changeIt() { var i = 1; my_div.innerHTML = my_div.innerHTML + " " + " OK " } var ipath; function savepath() { ipath = document.getElementById("path").value; document.getElementById("path").value = " "; } EASY EDIT ?Help? Track Selection Write the Selections to File
answer count: 1
has comment: http://stackoverflow.com/comment/39137846
tagged with: attributes
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39138310
has comment: http://stackoverflow.com/comment/39137479
has comment: http://stackoverflow.com/comment/39137301
has comment: http://stackoverflow.com/comment/39138197

http://stackoverflow.com/comment/39280462
comment on: http://stackoverflow.com/a/25213856
type: AnswerComment
has text: To use more correct wording, `JSON.stringify` takes an object and encodes it into `JSON`, or *JSON encodes* it. But yes, you understand correctly.
score: 0
type: Comment

http://stackoverflow.com/q/25224798
favorite count: 0
type: UnansweredQuestion
score: -3
has answer: http://stackoverflow.com/a/25225184
has body: I want the div 'expand' to expand to a set height when hovered over and then revert back to the original height of the div on mouse out. My problem is that the images inside 'expand' needs to remain proportional and thus its height is going to vary depending on the browser width. So I need some code (html, css, javascript, jQuery, PHP, etc.) that will set the div 'expand' to expand to a preset height on hover and then revert to the height of the image (plus a 5 pixel padding on all sides). The markup: The Demon King Cinda Williams Chima jfah;jfhe;jfhwehccneufhea'hfehechceiphf'jfah;jfhe;jfhwehccneufhea'hfehechceiphf'jfah;jfhe;jfhwehccneufhea'hfehechceiphf'jfah;jfhe;jfhwehccneufhea'hfehechceiphf'jfah;jfhe;jfhwehccneufhea'hfehechceiphf'
linked to: http://stackoverflow.com/q/6370690
has comment: http://stackoverflow.com/comment/39290669
has answer: http://stackoverflow.com/a/25224872
downvote count: 3
has comment: http://stackoverflow.com/comment/39290586
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39291372
has title: Expanding Div to fit Proportional Image
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39290647
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39290615

http://stackoverflow.com/comment/39027590
comment on: http://stackoverflow.com/q/25083305
type: Comment
type: QuestionComment
has text: Controller has created own `$scope`, but factory doesn't need this scope, you can pass any parameter to the `$provider` from your controller (even `$scope`), but can't get access to controller variables from factory.
score: 0

http://stackoverflow.com/comment/39233980
score: 0
has text: SO is not a free code-writing service. Please try to do it yourself, and post your attempt. Then we'll help you fix it and you'll learn what you did wrong.
comment on: http://stackoverflow.com/q/25194378
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39291835
score: 0
comment on: http://stackoverflow.com/q/25145901
type: Comment
type: QuestionComment
has text: I read where someone else was having a different issue with IE and that it maybe a cross domain issue, which they used a proxy via PHP calling the http://maps.googleapis.com/maps/api/distancematrix/json?origins=".$myLatLng1[0].",".$myLatLng1[1]."&destinations=".$myLatLng2[0].",".$myLatLng2[1]."&language=en-E"; - which works for me. Except that the values being returned to IE are different than from using google.maps.geometry.spherical.computeDistanceBetween with all other browsers

http://stackoverflow.com/q/25151502
type: UnansweredQuestion
tagged with: soap
has answer: http://stackoverflow.com/a/25151637
score: 0
type: Question
has body: I am able to connect to the webservice. That service has a number of operations that can be executed and return a result. One is called helloWorld. I would like to perform that operation. Right now I specify the web service file, but i need to further specify the method in the file to be executed. Here is what I have: function soapReq() { var ajaxRequest = new XMLHttpRequest(); ajaxRequest.onreadystatechange = function(){ if(ajaxRequest.readyState == 4){ // Get the data from the server's response console.log(ajaxRequest.responseText); } } ajaxRequest.open('POST', 'http://theWebServiceNameThatICannotGiveOut', true); ajaxRequest.send(null); } Can I add the operation to be performed onto the end of the url or something?
tagged with: javascript
answer count: 1
has title: XMLHttpRequest - execute operation on webservice

http://stackoverflow.com/a/25184102
downvote count: 0
type: Answer
has body: Use in empty() in jQuery to remove all children element $messages.empty(); var $msg = $("&lt;div class='alert alert-info'&gt;&lt;strong&gt;Information : &lt;/strong&gt;" + message + "&lt;button type='button' class='close' aria-hidden='true'&gt;&amp;times;&lt;/button&gt;&lt;/div&gt;"); $messages.append($msg);
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25184073

http://stackoverflow.com/comment/39253592
has text: Ah very simple. Thanks!
comment on: http://stackoverflow.com/a/25204931
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39228118
type: QuestionComment
has text: Sounds like something that should be redirected by the web server..
comment on: http://stackoverflow.com/q/25191235
score: 4
type: Comment

http://stackoverflow.com/comment/63060874
comment on: http://stackoverflow.com/a/25233790
type: AnswerComment
type: Comment
score: 1
has text: I like "harmonize" better than "harmonicalize" for the same reasons that I like "canonize" better than "canonicalize".

http://stackoverflow.com/comment/39567615
type: AnswerComment
comment on: http://stackoverflow.com/a/25131480
type: Comment
score: 0
has text: hi, I've been looking into redis-sessions. Do you know what the difference between it and redis-connect is? Does it come with its own redis server?

http://stackoverflow.com/q/25076731
type: AnsweredQuestion
downvote count: 0
has body: I want to append object keys to span tag with class result and separate them with comma. But I can't remove last occurence of comma in text. Result: &lt;span class="result"&gt;&lt;/span&gt; Javascript: for (key in obj) { $(".result").append(key + ","); } So, for example, instead of 1,2,3, it must be 1,2,3
score: 1
type: Question
has answer: http://stackoverflow.com/a/25076967
has comment: http://stackoverflow.com/comment/39015075
tagged with: javascript
has answer: http://stackoverflow.com/a/25076897
answer count: 6
accepted answer: http://stackoverflow.com/a/25076897
has answer: http://stackoverflow.com/a/25076921
upvote count: 1
has comment: http://stackoverflow.com/comment/39015311
favorite count: 0
possible better answer: http://stackoverflow.com/a/25076967
has answer: http://stackoverflow.com/a/25077008
has answer: http://stackoverflow.com/a/25076790
tagged with: http://stackoverflow.com/tag/html
has title: Javascript: Remove last occurence of comma in span tag
has answer: http://stackoverflow.com/a/25077306
tagged with: append

http://stackoverflow.com/q/25094471
tagged with: css
favorite count: 0
accepted answer: http://stackoverflow.com/a/25094505
upvote count: 1
tagged with: php
type: AnsweredQuestion
score: 1
type: Question
linked to: http://stackoverflow.com/q/1451009
has body: I'm making an image gallery in which I want the user to be able to click on a thumbnail and get a bigger image displayed. This is the php-code to iterate over all images in a directory on the server and display them and give them each a unique id. echo ' ' . $thumbsrc . ' '; echo ' ' . $imagesrc . ' '; This works fine, I use $(".bigimage").hide(); to hide the bigger images. So what I could do now is this: $("#image1").click(function() { $("#bigimage1").show(); }); $("#bigimage1").click(function() { $("#bigimage1").hide(); }); But I find for up to 30 pictures I can't write 30 instances of this so I wanted to loop it. I tried for (var i = 1; i < 30; i++) { $('#image' + i).click(function() { $('#bigimage' + i).show(); }); $('#bigimage' + i).click(function() { $('#bigimage' + i).hide(); }); } Which doesn't seem to work? Why not? If I do for (var i = 1; i < 10; i++) { $('#image' + i).append(' test' + i + ' '); } it appends paragraph's to every #image-element so looping selector's seem to work. How would I do this? Thanks beforehand.
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Iterate over specific CSS-id's with jQuery
has answer: http://stackoverflow.com/a/25094505
answer count: 1

http://stackoverflow.com/comment/39234500
has text: @David sorry that was my typo's fault, working now.. `x` is a counter (the `for` loop increases its number each time it loops). i am using `x` to target the `x`th item in the array.. so the first time it loops it looks for [0], then [1], then [2] etc.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25172685

callback
tags question: http://stackoverflow.com/q/25162058
tag name: callback
tags question: http://stackoverflow.com/q/25098066
tags question: http://stackoverflow.com/q/25139893
tags question: http://stackoverflow.com/q/25195327
tags question: http://stackoverflow.com/q/25145575
tags question: http://stackoverflow.com/q/25088345
tags question: http://stackoverflow.com/q/25165068
tags question: http://stackoverflow.com/q/25229721
tags question: http://stackoverflow.com/q/25139479
tags question: http://stackoverflow.com/q/25162831
tags question: http://stackoverflow.com/q/25182256
tags question: http://stackoverflow.com/q/25143368
type: Tag
tags question: http://stackoverflow.com/q/25095649

http://stackoverflow.com/comment/39238403
score: 0
comment on: http://stackoverflow.com/q/25196823
type: Comment
type: QuestionComment
has text: @Exception, does not help

http://stackoverflow.com/comment/40574815
type: AnswerComment
has text: Please flesh out your answer a bit more. This looks more like a link-only answer.
comment on: http://stackoverflow.com/a/25919678
type: Comment
score: 1

http://stackoverflow.com/comment/39106477
score: 1
comment on: http://stackoverflow.com/a/25125588
has text: If the scripts were loaded into the browser already it is no different then if you combine them into one file versus N separate script tags.
type: AnswerComment
type: Comment

getelementsbytagname
tags question: http://stackoverflow.com/q/25088986
type: Tag
tag name: getelementsbytagname

http://stackoverflow.com/comment/39207079
has text: @Bergi How would you get a list of the prototypes with this method?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25179649
type: Comment

http://stackoverflow.com/q/25198497
type: AnsweredQuestion
has body: I have a web page that searches for an address using a web-service from a GIS server. I call this web-service in a JQuery AJAX method on the click of a button. Within the AJAX success function I map the address values to controls on the page. Before that, I do a check on the user role. The check itself is not important. If the check fails, I alert() the user. The issue I'm having is that the alert() is repeated 6 times whenever the check fails. When debugging it looks like the AJAX call is not repeated multiple times. function SelectAddress() { var url = $.url.build({ protocol: 'https', host: 'maps.site.co.za', path: '/arcgis/rest/services/Search_Layers/SL_ADD/MapServer/find', params: { 'searchText': SelectedAddressIsisKey, 'Contains': 'True', 'searchFields': 'ISIS Key', 'Layers': 0, 'returnCountOnly': 'false', 'returnZ': 'false', 'returnM': 'false', 'f': 'pjson' } }); $.ajax({ url: url, type: 'GET', cache: false, dataType: 'jsonp', success: function (data) { // call autocomplete callback method with results $.map(data.results[0].value, function (item) { var _role = document.getElementById('txtRole').value; var _addressNo = data.results[0].attributes['Addr No']; var _suffix = data.results[0].attributes['Address No Suffix']; var _streetName = data.results[0].attributes['Street Name']; var _streetType = data.results[0].attributes['Street Name Type']; var _suburb = data.results[0].attributes['Official Suburb Name']; var _ward = data.results[0].attributes['Ward Name']; var _subCouncil = data.results[0].attributes['Subcouncil Name']; var _erfNo = data.results[0].attributes['Property Number']; var _isisKey = data.results[0].attributes['ISIS Key']; var _subCouncilNo = _subCouncil.substr(_subCouncil.length - 2, 2); //Check Subcouncil of logged in user if (_role == "Admin" || _role.substr(_role.length - 2, 2) == _subCouncilNo) { document.getElementById('&lt;%=TextBoxAddressNumber.ClientID%&gt;').value = _addressNo; document.getElementById('&lt;%=ddlAddressSuffix.ClientID%&gt…
has title: JQuery AJAX contents executing multiple times
type: Question
tagged with: javascript
tagged with: jquery
tagged with: webforms
accepted answer: http://stackoverflow.com/a/25198843
tagged with: asp.net
tagged with: ajax
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25198843

http://stackoverflow.com/a/25197342
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/25197257
has comment: http://stackoverflow.com/comment/39239314
upvote count: 0
has comment: http://stackoverflow.com/comment/39239363
type: Answer
has body: In jquery and js, if you are using loops (for, while, $.each) than return true will be equal to continue in PHP, and return false will be equal to break. Since you are using simple for loop, than there is enough to use return false to break this loop.
has comment: http://stackoverflow.com/comment/39239332

http://stackoverflow.com/a/28831967
has body: I met with this issue. Problem occur because Chrome does not caching the source map and trying to get it, but breakpoint prevent. The issue recurs if the page and dev tools is open and press F5/Ctrl+R. If focus in the address bar and press Enter, then work out. Upd: works through time :( Upd2: I use angularjs + angular-route. I think i found a workaround: open a page, for example http://localhost/myPage, chrome load all necessary files (with source map). Then change the address in the bar, adding the client path, such as #123 (http://localhost/myPage#123). Chrome will not reload the page, and routing at client will work. Breakpoint should be dependent on the client path url #123, logic must be different with or not this parameter. Some thing like this: if ($route.current.params.id){ //real logic with breakpoint debugger; }else{ //nothing }
accepted answer of: http://stackoverflow.com/q/25078753
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25078753

http://stackoverflow.com/comment/39223882
has text: Comment out the script you added to the question and then see if the problem continues. I'm guessing that script is what is causing the problem, so you're going to have to make the selectors in that script more specific so it doesn't affect your modal carousel.
comment on: http://stackoverflow.com/q/25188252
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25088139
score: 2
answers question: http://stackoverflow.com/q/25087899
has body: you can achieve a similar effect by having an absolute div, with same image, with less opacity and less z-index, and it would move around with your image as you move it, using start stop and drag functions. see this fiddle for a example, there might be some lag sometimes, but consider this as a proof of concept. http://jsfiddle.net/gaurav5430/vrUgs/1244/ accurate: http://jsfiddle.net/gaurav5430/vrUgs/1246/
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/a/25103115
has body: You can try this: $(document).ready(function() { var selectedDiv; $('[contenteditable]').on('click',function(){ selectedDiv=this; }); $("div").on('focus keyup change', function() { $("#show-selected-elms-code").val($(this).html()); }); $("#show-selected-elms-code").on('keyup change', function() { $(selectedDiv).html($("#show-selected-elms-code").val()); }); $('#elm-font-family').on('click change', function(e) { document.execCommand('FontName',false,$(this).val()); }); }); demo: http://liveweave.com/BfGir8
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25103004
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25103004

http://stackoverflow.com/q/25203596
has title: Extjs Paging with additional Parameter
type: Question
tagged with: pagination
tagged with: javascript
has body: I'am working on a ExtJS 4.2 Project, where i want to use a Paging Toolbar to navigate through Images. When i open the Window, all Images are correct, but when i click on the next button to see the next Images, the result is empty. Its because the Parameter Id isn't passed to the backend System. I saw in other Threads an option like baseParams but they are not in the documentation and don't work. //My Store Class Ext.define('App.store.Images', { extend: 'Ext.data.Store', model: 'App.model.Images', autoLoad: false, autoSync: false, storeId: 'Images', pageSize: 8, proxy: { type: 'ajax', url: '/getImages', reader: { type: 'json', root: 'images', totalProperty: 'total' } } }); // This code is execute when i open the Window var imagesStore = Ext.StoreManager.get('Images'); imagesStore.on('load', buildContent); imagesStore.load({ params: { id: record.get('id'), start: 0, limit: 8 } }); Where can be additional Parameter be defined?
upvote count: 2
tagged with: extjs
answer count: 1
accepted answer: http://stackoverflow.com/a/25204241
favorite count: 0
has answer: http://stackoverflow.com/a/25204241
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/q/25166293
upvote count: 1
has comment: http://stackoverflow.com/comment/39181967
downvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39181839
has answer: http://stackoverflow.com/a/25176519
type: AnsweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/39181986
type: Question
answer count: 2
has title: How to remove the item in session using javascript for codeigniter?
possible better answer: http://stackoverflow.com/a/25166464
tagged with: php
accepted answer: http://stackoverflow.com/a/25176519
has answer: http://stackoverflow.com/a/25166464
has body: I am working on a shopping cart php(codeigniter) project. So I have add the item in the session like the code following. The problem is, I would like to remove the item in session in the checkout page. But of course I can not call the php function to remove the session in javascript , that means , when the remove button is click , how can I do (not restrict to use ajax, simple is the best), I can remove the item in session ? Thanks if ($this-&gt;form_validation-&gt;run()) { if ($this-&gt;session-&gt;userdata('purchase') !== false) $purchase_list = $this-&gt;session-&gt;userdata('purchase'); else $purchase_list = array(); $purchase = array( 'id' =&gt; $product[0]['id'], 'quantity' =&gt; $this-&gt;input-&gt;post('quantity') ); if ($this-&gt;input-&gt;post('opt1') !== false) $purchase['opt1'] = $this-&gt;input-&gt;post('opt1'); if ($this-&gt;input-&gt;post('opt2') !== false) $purchase['opt2'] = $this-&gt;input-&gt;post('opt2'); array_push($purchase_list, $purchase); $this-&gt;session-&gt;set_userdata('purchase', $purchase_list); redirect('cart'); }
score: 0
tagged with: codeigniter

http://stackoverflow.com/a/25100945
score: 4
type: AcceptedAnswer
has body: The problem is that you are trying to access your ../*.html file directly. Chrome won't correctly for a number of features due to the Same Origin Policy. There are two solutions. Set up a simple http server. You can do this by enabling apache to serve your local files for you. Disable same origin policy for chrome. A quick google for both will turn up several full detailed examples on how to do either. I would suggest option 1 because this will emulate how your webpage will behave when it is live.
accepted answer of: http://stackoverflow.com/q/25095485
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25095485
downvote count: 0

http://stackoverflow.com/a/25133692
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25133049
has body: this might not be relevant, but your question made me go research how to include html files with javascript this uses jquery, but it still works:

http://stackoverflow.com/comment/39016508
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25077150
has text: Why don't you put your script file in the main js file. Instead of Default.aspx. Place that in your main js file. I hope all your pages or any master page will be having a reference to it.

http://stackoverflow.com/comment/39029960
has text: Apologies. I've added what I think is the relevant code. Hopefully that makes it a little more clear.
comment on: http://stackoverflow.com/q/25084430
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25221186
linked to: http://stackoverflow.com/q/20279484
type: Question
duplicate of: http://stackoverflow.com/q/20279484
has title: Modify a property of an object inside a method in its constructor in Javascript
tagged with: function
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25221222
score: 0
has body: This is basically what I'm trying to do (I'm new to Javascript, so bear with me): function Car(make) { this.make = make; var noises = ["vroom", "woosh"]; function addNoise() { noises.push("wham"); this.noises = noises; } addNoise(); } var myCar = new Car("honda"); console.log(myCar.noises[2]); Now, I think the issue is that when I do this.noises = noises;, this isn't referring to Car, so when I try to do console.log(myCar.noises[2]); noises is undefined. In my actual code, the equivalent of addNoise runs asynchronously, so I have to be able to make noises a property inside that function. Edit: Yes, that other question covers a similar problem. This seems to work: function Car(make) { this.make = make; var noises = ["vroom", "woosh"]; var self = this; function addNoise() { noises.push("wham"); self.noises = noises; } addNoise(); } var myCar = new Car("honda"); console.log(myCar.noises[2]); Pretty simple solution!
has comment: http://stackoverflow.com/comment/39285185
tagged with: constructor
has comment: http://stackoverflow.com/comment/39285116
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39284179

http://stackoverflow.com/a/42601986
type: Answer
answers question: http://stackoverflow.com/q/25110185
has body: I've used $('body').height($('body').height() + 1);.
score: 0

http://stackoverflow.com/comment/39150089
has text: Does the FuelType change during the user's interaction with the form? If not you could just use the property mvcModel.FuelType without looking in the ko veiwmodel.
score: 1
comment on: http://stackoverflow.com/q/25149043
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39292420
comment on: http://stackoverflow.com/q/25225712
score: 0
has text: http://jsfiddle.net/arunpjohny/40zurcvn/1/
type: Comment
type: QuestionComment

angularjs-ng-repeat
tags question: http://stackoverflow.com/q/25123306
tags question: http://stackoverflow.com/q/25221971
tags question: http://stackoverflow.com/q/25078596
tags question: http://stackoverflow.com/q/25147890
tags question: http://stackoverflow.com/q/25135046
tags question: http://stackoverflow.com/q/25113959
tags question: http://stackoverflow.com/q/25149790
tags question: http://stackoverflow.com/q/25224630
tags question: http://stackoverflow.com/q/25170939
type: Tag
tags question: http://stackoverflow.com/q/25086860
tags question: http://stackoverflow.com/q/25149560
tags question: http://stackoverflow.com/q/25100318
tag name: angularjs-ng-repeat
tags question: http://stackoverflow.com/q/25206572
tags question: http://stackoverflow.com/q/25163533
tags question: http://stackoverflow.com/q/25214384
tags question: http://stackoverflow.com/q/25119037
tags question: http://stackoverflow.com/q/25112378
tags question: http://stackoverflow.com/q/25184137
tags question: http://stackoverflow.com/q/25228580
tags question: http://stackoverflow.com/q/25158056
tags question: http://stackoverflow.com/q/25106407

http://stackoverflow.com/a/25151797
answers question: http://stackoverflow.com/q/25090100
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25090100
has body: The error here is that drag dealer actually takes control of the taphold event. To work around you need to take a two stage check with a 750 millisecond time out (same as a standard taphold) and put the distance the slider can move as .49-.51 (or something similar ). If anyone wants the code leave a comment here and ill post what I come up with. Happy coding
type: AcceptedAnswer

http://stackoverflow.com/comment/39224778
comment on: http://stackoverflow.com/a/25189477
score: 0
type: Comment
has text: .active { background-color: rgba(0, 0, 0, 0.1); font-size:14pt; !important color:white; !important }
type: AnswerComment

http://stackoverflow.com/comment/39077799
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25110166
type: Comment
has text: Exactly. The time is better spent creating a quick jsfiddle. I've found jsfiddle invaluable in helping me debug by focusing on just the problem in question rather than in the context of the entire application. As to why Stackoverflow has become tougher to avoid downvotes? My guess is that so many low quality questions are posted that people have itchy downvote trigger fingers.

http://stackoverflow.com/comment/39291297
type: Comment
has text: I don't understand how to get my view to work with my controller. like, when you do a return view(); you can attach a view to the "view". On this I don't know how to attach my view, or that I even have to. I'm editing to show my view
comment on: http://stackoverflow.com/q/25225161
score: 0
type: QuestionComment

http://stackoverflow.com/q/25201188
has title: Highcharts multiple fill colors
type: Question
accepted answer: http://stackoverflow.com/a/25208355
has answer: http://stackoverflow.com/a/25236832
tagged with: highcharts
possible better answer: http://stackoverflow.com/a/25202689
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25202689
favorite count: 0
tagged with: colors
has answer: http://stackoverflow.com/a/25208355
answer count: 4
has answer: http://stackoverflow.com/a/25201620
type: AnsweredQuestion
score: 1
tagged with: fill
upvote count: 1
has body: I'm trying figuring out how to put every other with a brigther fill color for the same serie. Please have a look at my reference, this is what I want to accomplish. http://imgur.com/sYW8guR FYI: Heres a simple area chart to save you time http://jsfiddle.net/kylander/33cutjqn/

http://stackoverflow.com/q/25082607
type: Question
tagged with: user-interface
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: The image below illustrates a problem that I'm experiencing with jQuery's Draggable method. I have a list of products. When users swipe left or right, the products should scroll accordingly. When users swipe down, they should be able to drag the items downward. Here's the issue: although I can successfully differentiate between vertical and horizontal swipes, I can't enable and disable jQuery drag functionality at the right times. Here is my code: var touchPos = { x: null, y: null, threshold: { x: 20, y: 20 } }; // Shortcut for getting finger position from touch event // This is working correctly var getClient = function (ev, axis) { var touches = ev.touches || ev.originalEvent.touches; return touches[0]['client' + axis]; }; // All of the products are draggable by default $el.draggable({ containment: '.pageWrapper', cursor: 'move', revert: 'invalid', helper: 'clone', disabled: false }); function disableDragging () { $el.draggable('option', 'cancel', '.planSquare'); $el.draggable("option", "disabled", true ); } function enableDragging () { $el.draggable('option', 'cancel', '.pageWrapper'); $el.draggable("option", "disabled", false); } // When the user starts moving a product element.bind('touchstart', function (event) { // Capture finger position touchPos.x = getClient(event, 'X'); touchPos.y = getClient(event, 'Y'); if ($el.hasClass('unselectable')) { return false; } $el.css('border-color', 'transparent'); }); element.bind('touchmove', function(event) { // Update the position of the user's finger var newY = getClient(event, 'Y'); var newX = getClient(event, 'X'); var draggingDown = newY - touchPos.y &gt;= touchPos.threshold.y; var draggingSideways = Math.abs(newX - touchPos.x) &gt;= touchPos.threshold.x; if (!draggingDown &amp;&amp; draggingSideways) { disableDragging(); } }); // When the user stops moving a square element.bind('touchend', function () { touchPos.x = null; touchPos.y = null; enableDragging(); $el.css('border-color', '#ccc') }); The enableDragging and…
has title: Using jQuery draggable API to scroll sideways or drag down
favorite count: 0
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: drag
score: 2

http://stackoverflow.com/q/25139591
has comment: http://stackoverflow.com/comment/39134057
tagged with: yii
tagged with: javascript
has answer: http://stackoverflow.com/a/25156228
upvote count: 1
has body: Hey we have implement the game in Yii framework using java script. In this project game is maths calculation. once answer is correct audio will play like good answer, nice, superb respectively. those are mp3 format. using javascript plugin which is jquery.mb.js. mp3 is playing only one file. but i want to play all those file randomly. i used the array concept with random() which is not accepted. i pasted here the code please suggest me suitable answer accordingly. $.mbAudio.sounds = { effectSprite: { id: "effectSprite", mp3: "&lt;?php echo Yii::app()-&gt;theme-&gt;baseUrl; ?&gt;/audio/s1.mp3" }; then i used these concept. its not working var sprite=["s1.mp3","s2.mp3","s3.mp3","s4.mp3"]; mp3: "&lt;?php echo Yii::app()-&gt;theme-&gt;baseUrl; ?&gt;/audio/random()* sprite.length",
answer count: 1
has comment: http://stackoverflow.com/comment/39162297
favorite count: 0
downvote count: 3
type: UnansweredQuestion
tagged with: php
tagged with: css
has title: how to call array concept $mbAudio
type: Question
score: -2

http://stackoverflow.com/a/25282655
has comment: http://stackoverflow.com/comment/39400738
accepted answer of: http://stackoverflow.com/q/25200529
upvote count: 4
answers question: http://stackoverflow.com/q/25200529
downvote count: 0
score: 4
type: AcceptedAnswer
has body: It is easy actually. You should include subtable plugin in your project (you can download it from http://dev.sencha.com/extjs/5.0.0/examples/ux/grid/SubTable.js). Then configure it like so: { ptype: "subtable", headerWidth: 24, columns: [{ text: 'id_amenaza', dataIndex: 'id_amenaza', width: 100 }, { width: 100, text: 'codigo', dataIndex: 'codigo' }], getAssociatedRecords: function(record) { var result = Ext.Array.filter( salvaguardaStore.data.items, function(r) { return r.get('id_amenaza') == record.get('id'); } ); return result; } } The most important bit is getAssociatedRecords override. You must return array of records to display, so you can basically filter salvaguardaStore data. Working sample: http://jsfiddle.net/7czs02yz/11/
type: Answer

checkbox
tags question: http://stackoverflow.com/q/25105517
tag name: checkbox
tags question: http://stackoverflow.com/q/25175895
tags question: http://stackoverflow.com/q/25205563
tags question: http://stackoverflow.com/q/25221005
tags question: http://stackoverflow.com/q/25220814
tags question: http://stackoverflow.com/q/25204608
tags question: http://stackoverflow.com/q/25130924
tags question: http://stackoverflow.com/q/25143541
tags question: http://stackoverflow.com/q/25205051
tags question: http://stackoverflow.com/q/25159999
tags question: http://stackoverflow.com/q/25198467
tags question: http://stackoverflow.com/q/25080212
tags question: http://stackoverflow.com/q/25083201
tags question: http://stackoverflow.com/q/25193930
tags question: http://stackoverflow.com/q/25202483
tags question: http://stackoverflow.com/q/25143083
type: Tag
tags question: http://stackoverflow.com/q/25145837
tags question: http://stackoverflow.com/q/25133945
tags question: http://stackoverflow.com/q/25202105
tags question: http://stackoverflow.com/q/25149195
tags question: http://stackoverflow.com/q/25194119
tags question: http://stackoverflow.com/q/25159385
tags question: http://stackoverflow.com/q/25156382

http://stackoverflow.com/comment/39218616
has text: #James so u say execCommand is not need single quote? just execCommand(bold,false,null);? are u sure what you say? i tried document.write(a[0]); it return 'bold' not "'bold'".
comment on: http://stackoverflow.com/q/25185876
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39122347
type: AnswerComment
has text: This fires an event after 5 seconds, it doesn't detect whether the key has been held down... [JSFiddle demo](http://jsfiddle.net/3b3bg/).
type: Comment
comment on: http://stackoverflow.com/a/25134388
score: 2

http://stackoverflow.com/a/25228873
type: Answer
has body: The point of async.*() is that the intermediate callbacks you pass are asynchronous &ndash; they aren't considered to be finished until they call their callback parameter. Since you never call the callback, your first callback never finishes.
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25228854
has comment: http://stackoverflow.com/comment/39298405
downvote count: 0
has comment: http://stackoverflow.com/comment/39298477

http://stackoverflow.com/comment/39209357
type: QuestionComment
has text: DEBUG: Try to disable each class one at a time and see which specific class is causing the problem. You can even see the applied class to an element in the developer tools of browser.
comment on: http://stackoverflow.com/q/25181593
score: 0
type: Comment

http://stackoverflow.com/q/25099510
accepted answer: http://stackoverflow.com/a/25099652
has comment: http://stackoverflow.com/comment/39057634
has answer: http://stackoverflow.com/a/25099858
answer count: 3
has body: I'm relatively new to javascript, but I searched trough google and stackoverflow for the past several hours and I still can't get this to work, it looks like it's something that should be simple but I'm not sure what I'm overlooking.... I'm trying to make a checkbox to disable my website's onhover tooltips by moving them all away when the checkbox is ticked (since I couldn't apply visibility:hidden; on hover with js), but I can't seem to make the checkbox affect more than a single tooltip. I'm using GetElementById() which seems to only make use of one element by that id, but I couldn't get GetElementsByClassName() nor GetElementsByName() to work for some reason, even though as far as I can tell from w3schools I should be able to just replace my GetElementById() with the latter two, why does this happen and what should I do instead? Here's my code: http://jsfiddle.net/wwX3k/1/ function optioninfovisibilitytoggle() { if (optioninfovisibility.checked) { document.getElementById('optioninfo').style.left='9001%' } else { document.getElementById('optioninfo').style.left='12%' } } optioninfovisibilitytoggle(); I need all the tooltips to move aside, by inline id or class or name or whatever, as long as all of them move aside rather than just the top one Thanks in advance for any help
has title: How to change the CSS for all elements with a common identifier using Javascript?
has comment: http://stackoverflow.com/comment/39057505
possible better answer: http://stackoverflow.com/a/25099641
score: 2
has answer: http://stackoverflow.com/a/25099641
downvote count: 0
tagged with: javascript
tagged with: get
has comment: http://stackoverflow.com/comment/39057591
tagged with: element
has answer: http://stackoverflow.com/a/25099652
type: AnsweredQuestion
favorite count: 0
type: Question
upvote count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/39057489

http://stackoverflow.com/q/25092243
has comment: http://stackoverflow.com/comment/39192943
has title: xdsoft's datetimepicker displaying incorrect time options
has comment: http://stackoverflow.com/comment/39154298
tagged with: ruby-on-rails
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39154457
has comment: http://stackoverflow.com/comment/39115608
has comment: http://stackoverflow.com/comment/39154740
has body: I am using xdsoft's datetimepicker plugin: http://xdsoft.net/jqplugins/datetimepicker/ I configured it using: $('.eventEditDate').datetimepicker({ format:'m/d/y @ h:m a', formatTime:'h:m a', allowTimes: ['12:00', '13:00', '15:00'], timepicker: true, lang: 'en' }); However, when I click the input bar, I get '11:08' listed as the option three times. The number of options corresponds to the number of elements in allowTimes even if I add or remove them, but the time displayed is always '11:08'. How do I fix this? Edit: The source code for the datetimepicker is here: http://pastie.org/9445932. The class of the div with the time options is xdsoft_today which is used on lines 599 and 632
has answer: http://stackoverflow.com/a/25130540
has comment: http://stackoverflow.com/comment/39168358
accepted answer: http://stackoverflow.com/a/25130540
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39191681
tagged with: datetimepicker
answer count: 1
has comment: http://stackoverflow.com/comment/39115264

http://stackoverflow.com/q/25120829
possible better answer: http://stackoverflow.com/a/25223517
tagged with: angularjs
has answer: http://stackoverflow.com/a/25246853
score: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25129496
tagged with: angular-ui-router
type: Question
accepted answer: http://stackoverflow.com/a/25246853
has title: AngularJS ui-router, scroll to next step on state change
has body: I'm using UI-router in my app and I'd like to so a simple "scrollTo" to an anchor when the URL/state changes. I don't want to load the next step from a template, or load a new controller. I'd just like several divs to be on the page already and scroll up and down between them. A simplified view of the HTML would be this. Continue Continue Step 3 content So, when you enter the page the URL would be domain.com/booking When you click the first button I'd like my controller code to change the URL to domain.com/#/step-2 and scroll down to the "step2" div. Ideally, when the user hits the back button it would revert to the first URL and scroll back up to step 1. Anybody know how to do this?
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25223517
upvote count: 6
answer count: 4
has answer: http://stackoverflow.com/a/25134785

http://stackoverflow.com/q/25110215
type: AnsweredQuestion
tagged with: sails.js
score: 1
has answer: http://stackoverflow.com/a/25110333
type: Question
upvote count: 1
downvote count: 0
tagged with: javascript
has body: When generating new models or controllers in Sails.js, they're created with: /** * Test.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ This might be a stupid question, but what is the intended parser for such declarations? Is there a built-in utility to generate this documentation?
answer count: 1
has title: Embeded documentation in a Sails.js project
favorite count: 0
accepted answer: http://stackoverflow.com/a/25110333

http://stackoverflow.com/q/25145722
has title: Calling a web service using the script tags
has comment: http://stackoverflow.com/comment/39175954
type: Question
tagged with: asp-classic
has answer: http://stackoverflow.com/a/25163272
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25163272
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39163125
type: AnsweredQuestion
tagged with: internet-explorer
has body: My application is built using asp classic and I've tried multiple solutions trying to fix IE 8's Service is not defined issue. The code is below. tags: &lt;script language="javascript"&gt; function init() { service.useService("Services/Util.asmx?WSDL", "WebUtil"); } &lt;/script&gt; tags: &lt;frameset onload="init()" id="service" style="behavior:url(Forms/Behaviors/webservice.htc)" onresult="ShowResult()" border="1" frameborder="1" framespacing="4" cols='&lt;%= GetFrameColString()%&gt;' topmargin="0" leftmargin="0"&gt; Note: The browser can not be updated due to company policy so it has to work in IE 8 and above. And if there are issues with later browsers when calling a webservice this way would help me out as well if the company decides to upgrade IE. Anyhow can you help with IE 8's stating "service is not defined" issue?

http://stackoverflow.com/comment/39170204
has text: @NicolasR I was afraid of this. Thank you for your observation.
score: 0
comment on: http://stackoverflow.com/q/25159458
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39192252
score: 1
comment on: http://stackoverflow.com/q/25171696
type: Comment
has text: @Vivin Paliath: `setInterval` callback does terminate.
type: QuestionComment

http://stackoverflow.com/comment/39220589
comment on: http://stackoverflow.com/q/25187239
type: Comment
type: QuestionComment
has text: You should post that code, because that's where the problem lies.
score: 2

http://stackoverflow.com/q/25077170
tagged with: jsp
has answer: http://stackoverflow.com/a/25079068
tagged with: session-variables
has comment: http://stackoverflow.com/comment/39016333
has comment: http://stackoverflow.com/comment/39017716
has answer: http://stackoverflow.com/a/25079064
has comment: http://stackoverflow.com/comment/39015524
has comment: http://stackoverflow.com/comment/39018369
has comment: http://stackoverflow.com/comment/39015549
has comment: http://stackoverflow.com/comment/39016667
possible better answer: http://stackoverflow.com/a/25077266
type: Question
has comment: http://stackoverflow.com/comment/39016842
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25077266
has body: I have a jsp page with multiple links created inside a loop. All the links go to exactly one another jsp page. In the second jsp page I need to find out which link was clicked in the first jsp page. How can I do that ? Is there any way after clicking a link in the first jsp page I can set an attribute instantly, so that in the second page I can get that attribute to determine which link was clicked ? Here is my code of the loop with the links -- http://pastebin.com/J3JGu5jD &lt;% System.out.println("Going inside loop"); for(int i = 0; i &lt; n_row ; i++) { course_name = dbManager.get_course_name(teachers_course_id_list[i]); course_id = teachers_course_id_list[i]; %&gt; table = '&lt;tr&gt;&lt;td&gt; &lt;a href="MarkDistribution1.jsp?course_id_QSparam ='+"&lt;%=course_id%&gt;"+'"&gt;'+ "&lt;%=course_id%&gt;" + ': ' + "&lt;%=course_name%&gt;"+'&lt;/td&gt; &lt;/a&gt;&lt;/tr&gt;' document.write(table); &lt;% } %&gt; PS: Another question. I have a string variable link. is this the proper way to assign it to the javascript variable --- javascript_variable = &lt;%=link%> ?
has comment: http://stackoverflow.com/comment/39018735
tagged with: session
tagged with: setattribute
has title: How to set a session attribute after clicking a link?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39017686
has comment: http://stackoverflow.com/comment/39017537
accepted answer: http://stackoverflow.com/a/25079068
has comment: http://stackoverflow.com/comment/39015588
has comment: http://stackoverflow.com/comment/39015636
score: 0
has comment: http://stackoverflow.com/comment/39015592
answer count: 3
has comment: http://stackoverflow.com/comment/39018431
has comment: http://stackoverflow.com/comment/39016442

http://stackoverflow.com/a/25155856
downvote count: 0
has comment: http://stackoverflow.com/comment/39162597
has comment: http://stackoverflow.com/comment/39162521
has comment: http://stackoverflow.com/comment/39162381
has body: #container { position: absolute; } FIDDLE here
accepted answer of: http://stackoverflow.com/q/25155557
answers question: http://stackoverflow.com/q/25155557
upvote count: 2
has comment: http://stackoverflow.com/comment/39162277
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39162052
has comment: http://stackoverflow.com/comment/39162167
has comment: http://stackoverflow.com/comment/39162830
has comment: http://stackoverflow.com/comment/39162953
type: Answer
has comment: http://stackoverflow.com/comment/39162774
score: 2

http://stackoverflow.com/comment/40174803
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25202162
has text: possible duplicate of [Show values on top of bars in a barChart](http://stackoverflow.com/questions/25026010/show-values-on-top-of-bars-in-a-barchart)

http://stackoverflow.com/comment/39236992
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25196001
has text: I specifically don't want to hack the name out of the function.
score: 0

http://stackoverflow.com/q/25075055
has title: jquery auto complete sugessions does not display
tagged with: php
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has body: I need when I start type on text box automatically get sugessions from database.then when I select a sugession automatically should fill other text fields which are relate to the selected choice. here is my code, view city: location: label: Date: name: address: controller class Birds extends CI_Controller{ function index(){ $this->load->view('birds_view'); } function get_birds(){ $this->load->model('birds_model'); if (isset($_GET['term'])){ $q = strtolower($_GET['term']); $this->birds_model->get_bird($q); } } public function get_payee_data(){ $this->load->model('birds_model'); if (isset($_GET['term'])){ $ss = strtolower($_GET['term']); $this->birds_model->load_payee_data($ss); } } } model function get_bird($q){ $this->db->select('*'); $this->db->like('bird', $q); $query = $this->db->get('birds'); if($query->num_rows > 0){ foreach ($query->result_array() as $row){ $new_row['label']=htmlentities(stripslashes($row['bird'])); $new_row['value']=htmlentities(stripslashes($row['aka'])); $new_row['city']=htmlentities(stripslashes($row['city'])); $new_row['location']=htmlentities(stripslashes($row['location'])); $row_set[] = $new_row; //build an array } echo json_encode($row_set); //format the array into json data } } function load_payee_data($ss){ $this->db->select('*'); $this->db->like('name', $ss); $query = $this->db->get('payee_details'); //$query = $this->db->query("SELECT * FROM payee_details WHERE name LIKE '%q%' "); if($query->num_rows > 0){ foreach ($query->result_array() as $row){ $new_row['name2']=htmlentities(stripslashes($row['name'])); $new_row['address2']=htmlentities(stripslashes($row['address'])); $row_set2[] = $new_row; //build an array } echo json_encode($row_set2); //format the array into json data } } under the gihan shows sugessions
has answer: http://stackoverflow.com/a/25075229
type: UnansweredQuestion
tagged with: codeigniter

http://stackoverflow.com/q/25117460
has comment: http://stackoverflow.com/comment/39091937
has comment: http://stackoverflow.com/comment/39092354
answer count: 1
favorite count: 0
has body: Have been researching if the zoom transitions between zoom levels could be modified for the Google Maps JS API (Version: 3.16). But have not found anything relevant in this regard. The current zoom animations are kinda "jerky" and are a little too fast for the current site I am developing. Is it possible to modify the zoom transition between zoom levels? How hard is it to achieve a slower transition? Thanks in advance!
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
has title: Is it possible to modify the zoom transition in Google Maps V3?
has comment: http://stackoverflow.com/comment/39091547
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39098861
tagged with: javascript
has comment: http://stackoverflow.com/comment/39091148
tagged with: google-maps-api-3
has answer: http://stackoverflow.com/a/25149572
accepted answer: http://stackoverflow.com/a/25149572
upvote count: 1

http://stackoverflow.com/comment/94735501
score: 3
comment on: http://stackoverflow.com/a/25070157
type: AnswerComment
type: Comment
has text: Use overflow: inherit; instead. This way the modal don't remove scroll when you have scroll and don't add scroll when you don't have

http://stackoverflow.com/comment/39150147
type: QuestionComment
comment on: http://stackoverflow.com/q/25148801
has text: @Jack William In my example for school, the content was static, but if I got the dates from a database, I need a other idea..
score: 0
type: Comment

http://stackoverflow.com/a/25710282
score: 1
upvote count: 1
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25140898
has body: you can use an "if" condition in the "ng-checked" like this: {{myVar}}

google-fusion-tables
type: Tag
tags question: http://stackoverflow.com/q/25178856
tags question: http://stackoverflow.com/q/25161746
tag name: google-fusion-tables

http://stackoverflow.com/comment/39044397
comment on: http://stackoverflow.com/q/25092351
score: 0
has text: @Rohit416 yes it should only stop if navigation starts to happen. i want to know if i can do this without defining `onbeforeunload` handler
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39181219
has text: Since he's using jQuery, `$.inArray()` would give some additional portability.
comment on: http://stackoverflow.com/a/25165962
score: 3
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25183315
answers question: http://stackoverflow.com/q/25183118
type: Answer
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: You're missing a form parsing middleware. Try adding the body-parser middleware somewhere before your POST route.
accepted answer of: http://stackoverflow.com/q/25183118

http://stackoverflow.com/q/25077103
has answer: http://stackoverflow.com/a/25077441
tagged with: http://stackoverflow.com/tag/html
tagged with: php
downvote count: 2
has comment: http://stackoverflow.com/comment/39015532
type: Question
has comment: http://stackoverflow.com/comment/39015289
has comment: http://stackoverflow.com/comment/39015408
score: -2
tagged with: javascript
has title: Contact Form - AJAX being ignored
answer count: 2
has body: Hello guys I couldnt make a jsfiddle can anyone see a problem with this AJAX form, I have used this code before and it has worked it's like asif the website is not reading ajax code and I have spent hours working on this AJAX: HTML: Thank you, Your review has been received, We will upload shortly! Something went wrong there is all fields filled out correctly? Wish to Add a review? Send PHP: <?php if(isset($_POST['name'])) { $name = $_POST['name']; // required $company = $_POST['company']; // not required $comments = $_POST['comments']; // required $email_to = "test@live.co.uk"; $email_subject = $name . " Review Submission"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "First Name: ".clean_string($name)."\n"; $email_message .= "Company: ".clean_string($company)."\n"; $email_message .= "Comments: ".clean_string($comments)."\n"; // create email headers $headers = 'From: '.$name.$company."\r\n". 'Reply-To: '.$name.$company."\r\n" . 'X-Mailer: PHP/' . phpversion(); @mail($email_to, $email_subject, $email_message, $headers); //@mail($email_also, $email_subject, $email_message, $headers); ?> <!--Thank you for contacting us. We will be in touch with you very soon. <?php } ?> I have tried everything the PHP form is working and sending the mails but the AJAX is not working, After some tweaking I managed to get the danger message to display but now its not even doing that. All its doing at the moment is going to the .php file to send the mail which should be stopped by event.preventDefault(); Also I have used this snippet of code on another website and it is working perfectly. Thanks Guys
has answer: http://stackoverflow.com/a/25077153
upvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39015413
type: UnansweredQuestion

http://stackoverflow.com/q/25228583
has title: How to build OpenCV for PNaCl on Windows
tagged with: web-applications
tagged with: google-nativeclient
type: Question
tagged with: opencv
has answer: http://stackoverflow.com/a/25506890
tagged with: javascript
score: 0
has body: I'm beginner to PNaCl/NaCl and have a problem. I want to use "openCV" on Web Native Client. So I tried to build "naclports" on cygwin. But it was failed.. below is my workflow and result. Please tell me what is wrong or alternative idea to use "openCV". *I use windows8.1 and cygwin. 1. Download and install the [Native Client SDK][1]. - installed pepper version is 35. PATH is C:/cygwin64/home/*user*/nacl_sdk/pepper_35 (set the environment variable). 2. Clone the "[naclports][2]" in C:/cygwin64/home/*user*/naclports/src/ 3. Done the build on cygwin. **@** ~/naclports/src $make opencv 4. error is coming: ###################################################################### Testing zlib ###################################################################### chdir /home/ryosuke/naclports/src/out/build/zlib/zlib-1.2.8 DEBUG MODE ENABLED (bypass acl) fread: Broken pipe DEBUG MODE ENABLED (bypass acl) NaClMain: &lt;fd:0&gt;: Broken pipe *** minigzip test FAILED *** naclports: Building 'zlib' failed. Makefile:68: recipe for target 'opencv' failed make: *** [opencv] Error 1 Do you have any good idea?
answer count: 1
type: UnansweredQuestion
tagged with: c++

http://stackoverflow.com/q/25166715
tagged with: css
answer count: 0
downvote count: 0
type: UnansweredQuestion
has body: I am trying to set the left position on the jQuery UI slider handle to start at 5% and max out at 95%. I want to limit the range of the left position. Is there anyway to have this type of offest and have it constant and not reset to 0%-100% ? Any help will be greatly appreciated. JS $j("#ageRangeSlider").slider({ range: "min", value: 11, min: 11, max: 66, step: 11, slide: function(event, ui) { $j("#yourAgeRange").val(ui.value); foo = $j("#yourAgeRange").val(); } }); $j("#yourAgeRange").val($j("#ageRangeSlider").slider("value")); HTML that jQuery UI creates
type: Question
tagged with: jquery-ui
score: 1
linked to: http://stackoverflow.com/q/2833396
upvote count: 1
has title: jQuery UI slider handle left position range limitation
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: position

http://stackoverflow.com/comment/39163864
type: QuestionComment
comment on: http://stackoverflow.com/q/25155955
type: Comment
has text: First of all you are using POST, why would you post? if you only need to fetch use GET (in your ajax).
score: 0

.net
tags question: http://stackoverflow.com/q/25193419
tag name: .net
tags question: http://stackoverflow.com/q/25104215
tags question: http://stackoverflow.com/q/25178061
tags question: http://stackoverflow.com/q/25220312
tags question: http://stackoverflow.com/q/25228339
tags question: http://stackoverflow.com/q/25173830
tags question: http://stackoverflow.com/q/25157691
tags question: http://stackoverflow.com/q/25147931
type: Tag
tags question: http://stackoverflow.com/q/25163006

http://stackoverflow.com/comment/39150353
has text: You also shouldn't be having more than 1 element with the same `id`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25149195
score: 0

http://stackoverflow.com/comment/39182373
comment on: http://stackoverflow.com/q/25166543
score: 1
has text: i don't see a problem with using a while loop in this case
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25166414
accepted answer of: http://stackoverflow.com/q/25166019
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39182088
has comment: http://stackoverflow.com/comment/39182256
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39182106
score: 1
has comment: http://stackoverflow.com/comment/39182354
has body: A long ago I'd a similar problem with a Ajax-Based navigation in a website, each page had a map, the first one working normally, but the next ones had the same problem you're having. Before displaying the map you should create a new bound object. Just like this: var bounds = new google.maps.LatLngBounds(); After that. You've to extend the bounds passing your markers positions. Like this: bounds.extend(marker.position); And finally, when the map is actually visible and rendered. Run the following lines. google.maps.event.trigger(secondMapInstance, 'resize'); secondMapInstance.fitBounds(bounds);
answers question: http://stackoverflow.com/q/25166019

http://stackoverflow.com/comment/129280936
type: AnswerComment
has text: Very useful. To those utilizing this, I'd recommend using `node.getBoundingClientRect()` to get the precise decimal width and height of the element for more accuracy.
type: Comment
comment on: http://stackoverflow.com/a/56531945
score: 0

http://stackoverflow.com/comment/39146584
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25145936
score: 0
has text: @ezanker Thank you very much. That fiddle works perfectly. Do you know why it has to be enclosed within the pageShow function?

http://stackoverflow.com/comment/39141927
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25144816
type: QuestionComment
has text: yes, it's possible, but it'd probably confuse users when text they didn't type suddenly shows up int he box. why not do `[ ]` and then add the `[]` to the entered text afterwards?

http://stackoverflow.com/q/25164001
tagged with: angularjs
has answer: http://stackoverflow.com/a/25164184
has answer: http://stackoverflow.com/a/25165158
accepted answer: http://stackoverflow.com/a/25165158
has title: How to order data in ng-repeat with nested objects as JSON data in angular js
has comment: http://stackoverflow.com/comment/39177776
type: AnsweredQuestion
upvote count: 2
score: 1
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25164184
linked to: http://stackoverflow.com/q/19387552
has body: i want to show array of object's properties in angular view. following is the object $scope._Json = { "foo": { "ItemDimension1": { "Item": "item1", "ItemIndex": 1, "SelectedItems": [{ "Code": "Code1" }] } }, "bar": { "ItemDimension2": { "Item": "item2", "ItemIndex": 3, "SelectedItems": [{ "Code": "code2" }] }, "ItemDimension3": { "Item": "item3", "ItemIndex": 2, "SelectedItems": [{ "Code": "Code3" }] } }, "Lorem": { "ItemDimension4": { "Item": "item4", "ItemIndex": 5, "SelectedItems": [{ "Code": "Code4" }] } } }; I want to show this in view like item1 - 1 item3 - 2 item2 - 3 item4 - 5 but it is showing like item4 - 5 item2 - 3 item3 - 2 item1 - 1 in view template &lt;label ng-repeat="(catagory, items) in _Json"&gt; &lt;li ng-repeat="(name, itemslist) in items | orderBy:'itemslist.ItemIndex'"&gt; &lt;strong&gt;{{itemslist.Item }}&lt;/strong&gt; - &lt;strong&gt;{{itemslist.ItemIndex }}&lt;/strong&gt; &lt;/li&gt; &lt;/label&gt; how to order this with ItemIndex ? is this a proper method ? or do i want to change something? with respect to Angularjs OrderBy on ng-repeat doesn&#39;t work i have tried orderByobject but didnt wrk check this Plunker source http://plnkr.co/edit/UCnrGJjLLaEjP7K5geV0?p=preview
has comment: http://stackoverflow.com/comment/39179309
linked to: http://stackoverflow.com/q/23920028
linked to: http://stackoverflow.com/q/14478106
has comment: http://stackoverflow.com/comment/39177577
answer count: 2
has comment: http://stackoverflow.com/comment/39178478
has comment: http://stackoverflow.com/comment/39178712
linked to: http://stackoverflow.com/q/13552387
tagged with: javascript
tagged with: sorting
favorite count: 0

events
tags question: http://stackoverflow.com/q/25191141
tags question: http://stackoverflow.com/q/25080498
tags question: http://stackoverflow.com/q/25230157
tags question: http://stackoverflow.com/q/25214199
tags question: http://stackoverflow.com/q/25217764
tags question: http://stackoverflow.com/q/25204282
tags question: http://stackoverflow.com/q/25193030
tags question: http://stackoverflow.com/q/25173973
tags question: http://stackoverflow.com/q/25127819
tags question: http://stackoverflow.com/q/25167018
tags question: http://stackoverflow.com/q/25144256
tags question: http://stackoverflow.com/q/25090973
tags question: http://stackoverflow.com/q/25150038
tags question: http://stackoverflow.com/q/25168161
tags question: http://stackoverflow.com/q/25190933
tags question: http://stackoverflow.com/q/25140661
tags question: http://stackoverflow.com/q/25087450
tags question: http://stackoverflow.com/q/25198959
tags question: http://stackoverflow.com/q/25088336
tags question: http://stackoverflow.com/q/25129644
tags question: http://stackoverflow.com/q/25222643
tags question: http://stackoverflow.com/q/25229173
tag name: events
tags question: http://stackoverflow.com/q/25109493
tags question: http://stackoverflow.com/q/25149869
tags question: http://stackoverflow.com/q/25100697
tags question: http://stackoverflow.com/q/25158078
tags question: http://stackoverflow.com/q/25101075
tags question: http://stackoverflow.com/q/25147085
type: Tag
tags question: http://stackoverflow.com/q/25160764

http://stackoverflow.com/a/45357082
has comment: http://stackoverflow.com/comment/122029066
has body: FWIW, in January 2017, someone made a change that displays the big-play-button on pause just by adding this class: vjs-show-big-play-button-on-pause
type: Answer
answers question: http://stackoverflow.com/q/25091972
has comment: http://stackoverflow.com/comment/114336529
upvote count: 31
score: 31
has comment: http://stackoverflow.com/comment/133514386
downvote count: 0

http://stackoverflow.com/comment/39036713
score: 0
type: AnswerComment
type: Comment
has text: yes that loads the files perfectly. One last question, in the console I get an [Error] Failed to load resource: The requested URL was not found on this server. (page-11.js, line 0). Is there a way to fail silently?
comment on: http://stackoverflow.com/a/25087913

http://stackoverflow.com/q/25162746
tagged with: google-maps
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Link Title Google Maps API v3
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/39174987
has body: I am using the standard Google Maps API v3 to make a map with multiple pins. I am wondering if there is a way for me to link this popop: Example: The user would click on a map pin, it would load this tooltip, and they could click on the tooltip (as a link) for more information. Here is how I am generating my map: var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach', -33.923036, 151.259052, 5], ['Cronulla Beach', -34.028249, 151.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.950198, 151.259302, 1] ]; var map = new google.maps.Map(document.getElementById('mapFrame123'), { zoom: 10, center: new google.maps.LatLng(-33.890542, 151.274856), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, i; for (i = 0; i &lt; locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); console.log(marker); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); } Any ideas?
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39175059
score: -1
has answer: http://stackoverflow.com/a/25162855
accepted answer: http://stackoverflow.com/a/25162855
type: Question

http://stackoverflow.com/q/25164948
type: Question
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/39179217
has body: As the questions says, is it possible to replace such functions with an own implementation? Like: Array.prototype.forEach = function () { console.log("foo"); }; That's - of course - a stupid replacement. But this is more about the possibility. I tried it, but then it seemed like at runtime it's not replaced. My console logs the foo. But when I'm calling something like [].forEach(); which also shout log foo, it does not work, until I replace the forEach function again in the console.
downvote count: 0
tagged with: javascript
has title: JavaScript: Is it possible to replace functions like Array.prototype.indexOf?
tagged with: prototype
has comment: http://stackoverflow.com/comment/39179427
has answer: http://stackoverflow.com/a/25165048
has comment: http://stackoverflow.com/comment/39179170
has comment: http://stackoverflow.com/comment/39179119
favorite count: 0
accepted answer: http://stackoverflow.com/a/25165048
score: 4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25167991
has answer: http://stackoverflow.com/a/25167991

http://stackoverflow.com/comment/39120317
comment on: http://stackoverflow.com/a/25133097
has text: I can use location.replace() functionality on onclick() event only..so is there any other possibility, for clearing the history?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25166306
tagged with: javascript
tagged with: date
score: 0
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25166539
has answer: http://stackoverflow.com/a/25166539
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has body: I am working with some JQuery/Javascript and HTML tags. I have a javascript document that sets the max/min values of an input tag in HTML5. I am able to set my min value just fine for both of my tags, but the max value is not being set. Does anyone see anything obivous I may be missing? I'm just a little confused as to why the min is being set fine but the max is not. Thanks for the help. date.html Start Date (mm/yyyy): &lt;input type="date" id="start_date" min="" max=""&gt; End Date (mm/yyyy): &lt;input type="date" id="end_date" min="" max=""/&gt; date.js //Last Valid/Year = 2014-06-01 //First Month/Year = 2012-11-01 //Max does not work even if I hard code it. jQuery('#start_date').attr({ "max": lastValidYear.toString() + "-" + lastValidmonth.toString() + "-" + "01", "min": FirstYear.toString() + "-" + FirstMonth.toString() + "-" + "01"}); jQuery('#end_date').attr({ "max": lastValidYear.toString() + "-" + lastValidmonth.toString() + "-" + "01", "min": FirstYear.toString() + "-" + FirstMonth.toString() + "-" + "01" });
type: AnsweredQuestion
has title: JQuery attr not setting max value but setting min for html input tag
type: Question
has answer: http://stackoverflow.com/a/25169593
accepted answer: http://stackoverflow.com/a/25169593

http://stackoverflow.com/q/25190303
score: 0
has answer: http://stackoverflow.com/a/25190376
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has title: attach events to a dynamic editable=true list
has body: I have the next list Some text And i used the next script $(document).on('paste','[contenteditable="true"]', function (e) { //my actions to take }); It works well with a pre loaded list,when i hit enter it creates a new element (and thats ok) but dosent work with the new list element
tagged with: dom
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39024263
score: 1
type: AnswerComment
has text: Reg Exp with HTML NO NO NO! http://stackoverflow.com/questions/590747/using-regular-expressions-to-parse-html-why-not
type: Comment
comment on: http://stackoverflow.com/a/25081797

http://stackoverflow.com/comment/39229190
score: 0
has text: And Jeremy's version is even better since he is passing Objects.
type: AnswerComment
comment on: http://stackoverflow.com/a/25191731
type: Comment

http://stackoverflow.com/q/25152981
has body: Consider following scenarios and jQuery usage variants: HTML item 1 item 2 item 3 item 4 Usage a. $('.wrapper').find('.item').addClass('active'); Usage b. $('.item', '.wrapper').addClass('active'); My questions are Are they identical, in terms of functionality? Is one perform better than the other? Assuming they are identical, which one is considered as a better practise?
score: 1
has title: Selecting jQuery elements involving parent
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25152996
has comment: http://stackoverflow.com/comment/39156987
favorite count: 0
has answer: http://stackoverflow.com/a/25153162
accepted answer: http://stackoverflow.com/a/25152996
upvote count: 1
possible better answer: http://stackoverflow.com/a/25153162
type: AnsweredQuestion

http://stackoverflow.com/comment/39297977
score: 0
type: AnswerComment
has text: I see you've opted to use Angular UI for the Angular routing. Any benefits over Angulars UI vs Angular's built in $routeProvider in this case?
type: Comment
comment on: http://stackoverflow.com/a/25228434

http://stackoverflow.com/a/25199406
downvote count: 0
type: Answer
has body: You cannot. An inner function is only available within the body of the outer function.
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/81028910
answers question: http://stackoverflow.com/q/25199343

http://stackoverflow.com/q/25134903
has comment: http://stackoverflow.com/comment/39123382
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/39123316
has comment: http://stackoverflow.com/comment/39123374
has comment: http://stackoverflow.com/comment/39123216
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25135136
has comment: http://stackoverflow.com/comment/39126190
has comment: http://stackoverflow.com/comment/39124987
type: Question
has comment: http://stackoverflow.com/comment/39125068
has comment: http://stackoverflow.com/comment/39125524
has comment: http://stackoverflow.com/comment/39123768
has comment: http://stackoverflow.com/comment/39123264
has body: I have almost finished this slider, but I don't know how to implement the functionality for next() and prev(). How can I implement these functions? Also, if I add more than 3 slides to the slider, then it stops working correctly. How can I deal with more than 3 slides? http://jsfiddle.net/M4t4L/3/ $(function () { var container = $("#scene"), i = 0, count = container.find("li").length, j = container.find("li").length - 1, isAnimating = false; container.find("li:first").css({ "width": "100%" }); $("#trigger").click(function (e) { e.preventDefault(e); i++; if (i &gt;= count) { i = 0; } j++; if (j &gt;= count) { j = 0; } container.find("li") .finish() .removeClass('active') .eq(2) .width(0) .addClass("active") .animate({ "width": "100%" }, 400, function () { container.find("li").first().appendTo(container); }); }); });
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39123282
has comment: http://stackoverflow.com/comment/39123352
has comment: http://stackoverflow.com/comment/39123889
has title: Previous/Next functions for js slider
has answer: http://stackoverflow.com/a/25135136
answer count: 1
score: -1
has comment: http://stackoverflow.com/comment/39126369
favorite count: 0

http://stackoverflow.com/a/30034490
answers question: http://stackoverflow.com/q/25220218
score: 1
upvote count: 1
has body: You can use a combination of checking ... $scope.$on('$viewContentLoaded', function(){ // view content is loaded.. }); and loading after bootstrap with a lazy loader such as ocLazyLoad ex. $ocLazyLoad.load(['/foo.js']).then(function(){ // use foo.js });
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39279258
type: QuestionComment
comment on: http://stackoverflow.com/q/25218565
has text: By the looks of things, yes. Please show your code.
score: 2
type: Comment

http://stackoverflow.com/comment/39053744
score: 0
type: Comment
has text: Post your javascript SDK calls in your question, try to include all the fields I have included in my example.
type: AnswerComment
comment on: http://stackoverflow.com/a/25097352

http://stackoverflow.com/comment/39122034
has text: that's why i used the word _"identified"_ ;)
comment on: http://stackoverflow.com/a/25125688
type: AnswerComment
score: 1
type: Comment

http://stackoverflow.com/comment/39046906
comment on: http://stackoverflow.com/a/25093528
has text: @runTarm, you are right. one way to block the app it's by url redirect. something like `$location.url('...');`. i will update the answer
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39258078
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25207245
has text: yes my StringArray should look like ['john', 'charles'], if you use the id property it will be [1,2]
type: Comment

http://stackoverflow.com/q/25217228
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39278551
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39277717
tagged with: css
has comment: http://stackoverflow.com/comment/39276933
has comment: http://stackoverflow.com/comment/39277252
has title: How to remove/reset external css styles with JQ?
type: Question
has body: I want to reset remove or make initial all the css properties defined in an external css file. I want the solution should also work when I edited/added/removed properties in css file. So solutions in here don't work. For example $('div').css('width','');, is not a solution cause it clears the width property in a HARDCODED way. Also solutions like $('div').attr('style',''); does not work cause I do not use inline styling, also again $('div').removeClass(''); is not a valid solution. Any answer would be appreciated, thanx. You can playaround the code here: http://codepen.io/ertugrulmurat/pen/JEhfe And; How to dynamically remove a stylesheet from the current page is not a solution, another side effect of this is that it removes all styles for all elements, this is not the case wanted
tagged with: javascript
has comment: http://stackoverflow.com/comment/39276984
has comment: http://stackoverflow.com/comment/39277094
has comment: http://stackoverflow.com/comment/39276921
score: 0
linked to: http://stackoverflow.com/q/5462606
answer count: 1
linked to: http://stackoverflow.com/q/5033650
tagged with: jquery
has answer: http://stackoverflow.com/a/25217688

http://stackoverflow.com/q/25131719
type: Question
tagged with: java
has title: How to prevent restrict access to a web application to authorized devices only?
has comment: http://stackoverflow.com/comment/39117472
has comment: http://stackoverflow.com/comment/39117519
has answer: http://stackoverflow.com/a/25131886
has body: I have developed an MVC web app. Right now, the client using this app in office area. The client has requested that no one should use this app on any device except the office's PC/tablets. Now problem is, it's a web app, so how can I put restrictions that nobody can use this app from the outside of the office or with devices other with than office's PC/Tablets?
answer count: 1
tagged with: jsp
tagged with: javascript
linked to: http://stackoverflow.com/q/1238963
score: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39115562
type: QuestionComment
has text: I've updated my answer for your problem, how can you call on submit.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25130329

http://stackoverflow.com/q/25221887
has answer: http://stackoverflow.com/a/25222222
answer count: 1
has body: I've started using FPDF.js. It's the extended library of jsPDF. There's a well written code for inserting images using jsPDF var imgData = "data:image/jpeg;base64,/sad,flkhaskdfjh"; //this base64 is just an example var doc = new jsPDF(); doc.setFontSize(40); doc.text(35, 25, "Paranyan loves jsPDF"); doc.addImage(imgData, 'JPEG', 15, 40, 180, 160); But I want to insert the same using FPDF. How can I do that
type: UnansweredQuestion
has title: Insert Image using FPDF.js
type: Question
tagged with: javascript
score: 0
tagged with: jspdf

http://stackoverflow.com/q/25102897
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: string
favorite count: 0
has comment: http://stackoverflow.com/comment/39063576
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39063564
has body: I want to remove all the string after a word in javascript like in my case remove everything after "share something " bla bla bla share something ... bla bla bla &lt;image tag&gt;&lt;/img&gt; bla bla bla bla bla bla &lt;image tag&gt;&lt;/img&gt;
type: Question
upvote count: 2
tagged with: split
has title: how to remove all the string after a word in javascript?
has answer: http://stackoverflow.com/a/25107125
has comment: http://stackoverflow.com/comment/39063612
tagged with: javascript
has answer: http://stackoverflow.com/a/25107287
accepted answer: http://stackoverflow.com/a/25107287
possible better answer: http://stackoverflow.com/a/25102982
has answer: http://stackoverflow.com/a/25102982

http://stackoverflow.com/comment/39293759
has text: If ever there was a time for this, it's now -> [ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ TO͇̹̺ͅƝ̴ȳ̳ TH̘Ë͖́̉ ͠P̯͍̭O̚​N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟Oͮ͏̮̪̝͍M̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝S̨̥̫͎̭ͯ̿̔̀ͅ](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags), that's horrible!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25226505
score: 0

http://stackoverflow.com/comment/39175762
score: 0
type: Comment
type: QuestionComment
has text: the same problem here.....
comment on: http://stackoverflow.com/q/25153158

http://stackoverflow.com/a/25202710
has body: Remove this CSS: html { overflow: hidden; } body { overflow: auto; } And change $('body').scroll(function(){ To: $(window).scroll(function(){ Demo Fiddle
has comment: http://stackoverflow.com/comment/39249207
downvote count: 0
has comment: http://stackoverflow.com/comment/39249394
has comment: http://stackoverflow.com/comment/39249043
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25202598
has comment: http://stackoverflow.com/comment/39249196

http://stackoverflow.com/q/25191791
has body: I'm trying to add a Font-Awsome icon to a button I added to tinyMCE thus: ed.addButton('youtube', { title: 'Add Video' , icon: 'icon-youtube', onclick: function () { //do stuff here... } using an image like the docs suggest was not acceptable but for some reason I am not able to make this work. any ideas?
has answer: http://stackoverflow.com/a/25192950
score: 19
type: Question
answer count: 8
has answer: http://stackoverflow.com/a/50490190
has title: adding a custom icon to a tinyMCE button
tagged with: javascript
has answer: http://stackoverflow.com/a/25208186
possible better answer: http://stackoverflow.com/a/40471347
has answer: http://stackoverflow.com/a/40471347
accepted answer: http://stackoverflow.com/a/25192950
downvote count: 0
has answer: http://stackoverflow.com/a/34337273
favorite count: 0
tagged with: tinymce
has answer: http://stackoverflow.com/a/58787328
tagged with: angularjs
has answer: http://stackoverflow.com/a/78334273
tagged with: plugins
has answer: http://stackoverflow.com/a/72042860
type: AnsweredQuestion
upvote count: 19

http://stackoverflow.com/a/25246863
answers question: http://stackoverflow.com/q/25157114
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: This is more or less the good way, you can't avoid looping. There is place for a few optimizations though : don't use $.map but a standard for loop. $.map is pretty but calls a function at each step use break to stop iterating when you find your item don't search twice the position of the item don't use $.inArray (especially as you used indexOf before) Here's a better code : for (var i=0; i&lt;$myArray.length; i++) { var index = $myArray[i].indexOf('Element 6'); if (~index) { $myArray[i].splice(index+1, 0, 'Element X'); break; } } Simple performance comparison (note that the performance gain will depend on the data) More generally, when you don't need compatibility with very old (and almost forgotten) browsers, and I assume you don't need that compatibility as you use indexOf, you should avoid using compatibility functions like $.map or $.inArray as they mostly add an overhead.
type: Answer
accepted answer of: http://stackoverflow.com/q/25157114
score: 4

http://stackoverflow.com/comment/39300229
type: Comment
comment on: http://stackoverflow.com/a/25229833
score: 0
type: AnswerComment
has text: seems like you forgot to `echo` before invoking the method.

http://stackoverflow.com/q/25159916
has comment: http://stackoverflow.com/comment/39169164
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25160083
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25160083
downvote count: 0
tagged with: javascript
tagged with: ajax
has title: Limit ajax requests to a single page
has comment: http://stackoverflow.com/comment/39169342
linked to: http://stackoverflow.com/q/15871942
possible better answer: http://stackoverflow.com/a/25159978
has body: I have a web management page I build for my users, this page contain ajax that being call every 4 seconds to display real time information, my problem is that some of my users open this page multiple times on different tabs without noticing it, This cause excessive amount of requests to my php service, is there a way I can set it so once the page is reopened it will stop the old pages from sending requests? Thanks, Rami.
favorite count: 0
score: 2
has answer: http://stackoverflow.com/a/25159978
upvote count: 2

http://stackoverflow.com/comment/39065824
score: 2
type: AnswerComment
has text: `.live()` has been depreciated sense 1.7
type: Comment
comment on: http://stackoverflow.com/a/25104169

http://stackoverflow.com/a/25075652
has body: Look at this code helps: function call() { if ($("#date").val().search((/^\d{2}\/\d{2}\/\d{4}$/))&gt;-1) { $("#date").css('background-color', '#FF0000'); } else { alert("good"); } } Hope this helps and answers your question and also for this thread. :)
score: 0
answers question: http://stackoverflow.com/q/25075418
type: Answer

http://stackoverflow.com/a/25209716
has body: $(".chatMessageField").val(''); is a simple way, but you have to do it to all the fields individually. A better solution would be to give all of your inputs a class name that is the same and clear them all at once. Or just use jquery reset()
score: 0
answers question: http://stackoverflow.com/q/25209635
type: Answer
has comment: http://stackoverflow.com/comment/39262472

http://stackoverflow.com/q/25126624
has body: Our Struts Action class should redirect output to a new tab depending on a form value -- not always. The standard suggestion is to add &lt;input type="button" onclick=openNewWindow('validate.do?param=myParam');" JS: openNewWindow: function(url) { window.open(url, "_blank"); } But this won't work for us. We should not automatically open a new tab in every case; it depends on a certain form value, which we have to check on the server-side in the Action class. Any thoughts on how to approach this?
type: AnsweredQuestion
tagged with: java
has answer: http://stackoverflow.com/a/25126802
accepted answer: http://stackoverflow.com/a/25126802
has title: Redirect Struts Action Result to a New Tab based on Form Value
type: Question
answer count: 1
tagged with: jsp
tagged with: javascript
tagged with: struts
score: 0

http://stackoverflow.com/q/25216662
tagged with: php
type: Question
score: 0
has title: eventful API php
has body: I am trying to use the eventful API via php to retrieve events and then show them with js. I am using the following php code: $response = http_get($uri, array("timeout"=&gt;1), $info); echo json_encode($response); where $uri is : $uri = "http://api.eventful.com/rest/events/rss?app_key={keyhere}&amp;keywords=concerts&amp;location=seattle&amp;sort_order=date"; However I receive nothing when I read the response in my js script, any idea how to approach this? I cannot find any documentation for it.
has comment: http://stackoverflow.com/comment/39275842
tagged with: javascript
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39276439

http://stackoverflow.com/comment/39271004
type: AnswerComment
type: Comment
has text: Hi @SearchForKnowledge we have done extensive testing with floats. We did find a couple of issues that we have now solved but it doesn't solve your's quite yet. However, what is the source of your HTML document? The markup and use of floats and the bloated CSS seems all well too much, too complicated. Are you producing this markup or is some software/product producing it? I could redesign this page in probably 30 min with 10% of the code used.
comment on: http://stackoverflow.com/a/25088024
score: 0

http://stackoverflow.com/q/25137198
type: Question
tagged with: magento
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39166253
tagged with: jquery-plugins
has title: Magento javascript undefined is not a function jquery selectric?
score: 0
has body: I am having a problem on my site trying to add a few dropdown menus to the header! I am using Magento CE 1.8.0 with Airhotels module. The weird thing is on some pages it works and on some it doesn't. It seems to me that pages related directly to Airhotels module don't seem to be working, maybe this is a clue? As you can see from these images I am getting error undefined is not a function: broken working I have added this line to airhotels.xml under All Pages This is my jQuery script located in public_html\app\design\frontend\default\stylish\template\page\html\header.phtml Any help is appreciated I am really stuck!
answer count: 1
tagged with: undefined
has answer: http://stackoverflow.com/a/25514639
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39127293
has comment: http://stackoverflow.com/comment/39128008
has comment: http://stackoverflow.com/comment/39127621

http://stackoverflow.com/a/25191731
type: Answer
answers question: http://stackoverflow.com/q/25191594
has comment: http://stackoverflow.com/comment/39229190
has comment: http://stackoverflow.com/comment/39229048
score: 0
has body: Wrong architecture! function Person(name, job, age) { this.name = name ? name : "no name"; this.job = job ? job : "no job"; this.age = age ? age : -1: } var greg = new Person("Greg", "doctor", 45); var stacy = new Person("Stacy", null, 42); console.log(stacy.job); Or did you plan to write an own static class for every person???

http://stackoverflow.com/a/25202439
answers question: http://stackoverflow.com/q/25196868
type: Answer
has comment: http://stackoverflow.com/comment/39249430
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You must wait for the domready-event of the infoWindow before you add the listeners, at this time the HTML-element representing the infowindow has been attached to the document and it's contents are accessible : google.maps.event.addListener(myInfoWindow,'domready',function(){ $('#someIdInInfoWindow').bind({ click: function() { foo1(); }, mouseenter: function() { foo2(); } }); }); This applies when the content of the infoWindow is set via a string, when you assign it via a node you may also add the listeners directly to the particular element when you create it: var content = $('&lt;div/&gt;') .append($('&lt;div/&gt;',{id:'someIdInInfoWindow'}) .text('some text') .click(foo1) .mouseenter(foo2)); myInfoWindow.setContent(content[0]); myInfoWindow.open(map);
accepted answer of: http://stackoverflow.com/q/25196868

http://stackoverflow.com/comment/39260674
comment on: http://stackoverflow.com/q/25208481
score: 0
type: Comment
type: QuestionComment
has text: I'm not really sure why, but I think it's because the in the first two stages the form gets hidden before the event is done processing. I can get to step 4 by adjusting the button to not submit the form.

http://stackoverflow.com/comment/39184974
score: 0
type: AnswerComment
has text: As long as I know, open a new tab with js would cause a focus lost. You can still try something using window.open, but I can't be sure of the result. Did you know that this is a very wrong practice to redirect the user outside your website? Keep it will keep it's money, and you must try to keep the user as long as possible, but, I say that, I say nothing..
comment on: http://stackoverflow.com/a/25167794
type: Comment

http://stackoverflow.com/a/25094854
has body: Try this $("#testimonial").on('keyup', function(e){ var count= $(this).val().length; $("#testimonialCount").html("&lt;p&gt;- Character count:" + count + "&lt;/p&gt;"); });
answers question: http://stackoverflow.com/q/25094723
score: 0
has comment: http://stackoverflow.com/comment/39049105
type: Answer

http://stackoverflow.com/comment/39064846
type: Comment
comment on: http://stackoverflow.com/a/25103519
score: 0
has text: This is for my own use, in Chrome, but this is good information for future reference, thanks @T.J.Crowder
type: AnswerComment

http://stackoverflow.com/q/25128369
has comment: http://stackoverflow.com/comment/39111596
possible better answer: http://stackoverflow.com/a/25128415
tagged with: javascript
favorite count: 0
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/39111701
tagged with: css
has answer: http://stackoverflow.com/a/25128482
accepted answer: http://stackoverflow.com/a/25128482
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25128415
has title: CSS Height 100% doesn't work when overflowed
has comment: http://stackoverflow.com/comment/39111798
has body: What's happening is that with this code: HTML &lt;div class="one"&gt; &lt;div class="will-overflow"&gt; &lt;/div&gt; &lt;/div&gt; CSS html, body { width: 100%; height: 100%; } .one { height: 100%; background: red; } .one .will-overflow { width: 20%; height: 2000px; background: blue; } I get a result like this: Demo http://jsfiddle.net/kM46e/ Question Is there anyway to expand the div.one height to fit the div.will-overflow. This is just an example, the content of that div is dynamic.
type: Question
answer count: 2

http://stackoverflow.com/a/25943413
has body: You could also create a .jshintignore file that, just like .gitignore, contains files that you want to ignore.
downvote count: 0
answers question: http://stackoverflow.com/q/25115585
type: Answer
upvote count: 9
score: 9

http://stackoverflow.com/a/25187663
has body: As sgroves said, you are calling animate on both divs. To fix it, you need to bind the products scrolling separately from the news-scrolling. Here is a jsfiddle. $(document).ready(function () { bindEvents('news'); bindEvents('products'); }); function bindEvents(prefix) { if ($('.' + prefix + '-content').height() > $('.' + prefix + '-container').height()) { $('#' + prefix + '-down').hover(function () { animateContent(prefix, 'down'); }, function () { $('.' + prefix + '-content').stop(); }); $('#' + prefix + '-up').hover(function () { animateContent(prefix, 'up'); }, function () { $('.' + prefix + '-content').stop(); }); } } function animateContent(prefix, direction) { var animationOffset = $('.' + prefix + '-container').height() - $('.' + prefix + '-content').height(); if (direction == 'up') { animationOffset = 0; } $('.' + prefix + '-content').animate({ 'marginTop': animationOffset + 'px' }, '1500'); } I also modified your html: Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, Up down Lorem ipsum dolor sit amet, Lorem ipsum dolor sit amet, Up down and css: .wrapper { float:left; padding: 10px; } .news-container, .products-container { height: 300px; width: 200px; background: #ccc; padding: 0 10px; overflow: hidden; } .news-content { background:#61DAED; } .products-content { background:#EDC261; } a#news-up, a#news-down { color: red; } a#products-up, a#products-down { color: green; }
type: Answer
accepted answer of: http://stackoverflow.com/q/25187000
score: 3
answers question: http://stackoverflow.com/q/25187000
downvote count: 0
type: AcceptedAnswer
upvote count: 3

http://stackoverflow.com/a/25084064
score: 0
has comment: http://stackoverflow.com/comment/39028804
has comment: http://stackoverflow.com/comment/39028705
has body: You can use :has to test for descendants/values without changing the "current" element from the div: JSFiddle: http://jsfiddle.net/TrueBlueAussie/r83A9/2/ $(".accessBox:not(:has(li:contains('1')))").hide(); This equates to "find all elements with class .accessBox which do not have any lis that contain the value 1". Given the ambiguous wording of the question, I am happy to adjust this if better sample HTML is shown :)
type: Answer
has comment: http://stackoverflow.com/comment/39028748
answers question: http://stackoverflow.com/q/25083772
has comment: http://stackoverflow.com/comment/39028787

http://stackoverflow.com/comment/39275346
has text: any how you are passing indexes to add element in between see this link might help you. http://stackoverflow.com/questions/16308252/php-add-elements-to-multidimensional-array-with-array-push any how you need to modify slite to insert into specified location.
type: Comment
comment on: http://stackoverflow.com/q/25157114
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39189341
type: AnswerComment
comment on: http://stackoverflow.com/a/25167379
score: 0
type: Comment
has text: Tried that, still getting an error which is- SyntaxError: missing ) after argument list } else if ($this.hasClass('btn_regionalImg')) {

http://stackoverflow.com/a/25189313
type: Answer
has body: The problem is more than just the text-align. Your issue is with having the text wrapped in a DIV. Furthermore, floating auto-wraps. I don't know of a simple way to do what you're asking, but you may want to look into http://css-tricks.com/line-clampin/. Edit: Here's a variation of vivek_nk's code, in case you need to keep the button as a toggle to collapse the content again: http://jsfiddle.net/tsukasadt/xnd544k1/ Here's the jQuery toggle function: $('#myButton').toggle(function () { $('.myDiv').css('height','auto'); $('.myDiv').css('overflow','visible'); }, function () { $('.myDiv').css('height','100px'); $('.myDiv').css('overflow','hidden'); }); I requires you move the button inside the outer DIV and replace the entire jQuery function, but it'll leave the button on the page as a toggle between the CSS for overflow hidden/visible and height 100px/auto.
score: 0
answers question: http://stackoverflow.com/q/25189073

http://stackoverflow.com/comment/39062396
comment on: http://stackoverflow.com/a/25101902
type: AnswerComment
score: 0
type: Comment
has text: You're right. For some reason, the jquery object for a range input returns a very weird value for it's .value property. using seekBar[0].value fixed it.

http://stackoverflow.com/q/25152000
has body: I'm trying to use angular-route, but when I change the div tag from to that tag is suddenly empty. The app.js code I have is: angular .module('testApp', ['ngRoute']) .config(function ($routeProvider) { $routeProvider .when('/', { templateURL:'views/main.html', controller: 'MainCtrl' }) .when('/adoption', { templateURL: 'views/foo.html', controller: 'fooCtrl' }) .otherwise({ redirectTo: '/' }); }); and the html pages and controllers are made, but pretty much empty, save some placeholder stuff. I'm not 100% sure how I'm supposed to include the angular-route code, but what I have seems to be working.
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25152125
type: Question
score: 1
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Angular-Route and the ng-view div hide the page
tagged with: angularjs

http://stackoverflow.com/comment/39146204
comment on: http://stackoverflow.com/q/25146706
type: Comment
has text: @TheParamagneticCroissant oh! So does it SO because `r=0` the first time around? (it's meant to be called with one argument)
score: 0
type: QuestionComment

http://stackoverflow.com/a/25099173
score: 1
has body: It is definitely possible in jQuery. Please have a look on the jQuery API -> .wrap(): http://api.jquery.com/wrap/ $("#inner").wrap(' '); Example: http://jsfiddle.net/QL79C/1/ Hope this helps!
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25099095
upvote count: 1

http://stackoverflow.com/q/25205839
accepted answer: http://stackoverflow.com/a/25206297
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/457826
tagged with: dom-events
favorite count: 0
tagged with: timer
upvote count: 2
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to create a multiple countdown timers using Javascript. Facing issues with displaying the time and setInterval cleartInterval events of Javascript. My code is on jsfiddle: here Javascript: function secondPassed(row, secs) { var seconds = secs; var minutes = Math.round((seconds - 30)/60); var remainingSeconds = seconds % 60; if (remainingSeconds < 10) { remainingSeconds = "0" + remainingSeconds; } document.getElementById('countdown'+row).innerHTML = minutes + ":" + remainingSeconds; if (seconds == 0) { clearInterval(countdownTimer[row]); document.getElementById('countdown'+row).innerHTML = "Buzz Buzz"; } else { seconds--; } } var countdownTimer = []; function timer(row, min) { var seconds = min * 60; countdownTimer[row] = setInterval('secondPassed('+row+','+seconds+')', 1000); } timer(1, 3); timer(2, 2); timer(3, 5); HTML: Timer 1: Timer 2: Timer 3:
has comment: http://stackoverflow.com/comment/39255702
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25206297
has title: Having multiple countdown timer events intervals in javascript
type: Question
has comment: http://stackoverflow.com/comment/39255997
tagged with: javascript

http://stackoverflow.com/q/25133495
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25133706
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25133533
possible better answer: http://stackoverflow.com/a/25133706
upvote count: 1
has body: I am working with JQuery Filter and I am facing issue while searching string in span. Following is the Search function which I am using: function searchAccoms() { var searchString = $('#searchval').val(); $('span.acc-head').each(function(){ var spanString = $(this).text(); if(spanString.search(searchString) == 1){ console.log('found'); }else{ console.log('Not Found'); } }); } HTML: Scenario: I have following text in SPAN tag: field field extra field field1 field3 field2 Example SPAN: field1 When I search 'field' in the search box it works fine but when I search 'Field' the first letter in caps 'F' then it is not working. I am looking for %Field% like commend in MySQL. Is there any other way to do the search?
has title: Jquery Search String from span not working correctly
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25133533
type: Question
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25149870
answers question: http://stackoverflow.com/q/25149819
type: Answer
downvote count: 1
upvote count: 0
has body: You forgot to assign the className again. activeItems[i].className = activeClass.replace(/(?:\s*)(active\s*)/, ''); Note that getElementsByClassName() might not work in older Browsers. Raw JavaScript idea: var doc = document; function getClass(class){ if(doc.getElementsByClassName){ return doc.getElementsByClassName(class); } else{ var tags = doc.getElementsByTagName('*'), l = tags.length, r = []; if(l &lt; 1){ return false; } else{ var x = new RegExp('(^|\\s+)'+class+'(\\s+|$)'); for(var i=0; i&lt;l; i++){ var tag = tags[i]; if(tag.className.match(x)){ r.push(tag); } } return r; } } } function removeClass(class){ var cls = getClass(class), x = new RegExp('(^|\\s+)'+class+'(\\s+|$)'); for(var i=0,l=cls.length; i&lt;l; i++){ var c = cls[i]; c.className = c.className.replace(x, ''); } }
score: -1
has comment: http://stackoverflow.com/comment/40685665

http://stackoverflow.com/comment/39186332
comment on: http://stackoverflow.com/q/25168735
type: Comment
score: 1
has text: I don't find the `open-modal` in your code at all. That is the confusing thing for me.
type: QuestionComment

selenium-ide
tags question: http://stackoverflow.com/q/25183843
tags question: http://stackoverflow.com/q/25155344
tag name: selenium-ide
type: Tag

http://stackoverflow.com/comment/39273217
comment on: http://stackoverflow.com/a/25215237
has text: Awesome, thank you! I had a feeling everything I was doing was overcomplicated. Gonna take a look and try to refactor.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39056287
score: 0
type: AnswerComment
type: Comment
has text: Awesome! However, it doesn't seem to be the right solution because IE 9+ does not have registerElement defined on the document even though it does indeed render custom elements as expected. How bizarre. For now, I have a workaround -- I use `"register" in xtag` and use Mozilla's x-tag library which does give the correct answers (so far). Maybe we'll find a better solution than that?
comment on: http://stackoverflow.com/a/25097501

http://stackoverflow.com/q/25179058
has comment: http://stackoverflow.com/comment/39232739
has comment: http://stackoverflow.com/comment/39213657
type: Question
upvote count: 0
score: -2
accepted answer: http://stackoverflow.com/a/25201076
has title: SVG Path animation with Jquery
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
downvote count: 2
has answer: http://stackoverflow.com/a/25201076
has body: I'm trying to animate SVG->Path element. It is like a timer, in 10 seconds, it should be zero This is my SVG codes: But I have no idea how to start to animate it by jQuery
type: AnsweredQuestion

http://stackoverflow.com/q/25070403
has comment: http://stackoverflow.com/comment/39003907
has comment: http://stackoverflow.com/comment/39036022
has comment: http://stackoverflow.com/comment/39003343
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39035572
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39003367
has comment: http://stackoverflow.com/comment/39036941
has comment: http://stackoverflow.com/comment/39030486
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25070455
has comment: http://stackoverflow.com/comment/39004024
has comment: http://stackoverflow.com/comment/39003721
type: Question
has answer: http://stackoverflow.com/a/25070455
has answer: http://stackoverflow.com/a/25104896
has comment: http://stackoverflow.com/comment/39036567
tagged with: getjson
has comment: http://stackoverflow.com/comment/39003745
has comment: http://stackoverflow.com/comment/39003948
has comment: http://stackoverflow.com/comment/39003876
score: 0
answer count: 2
upvote count: 1
downvote count: 1
has title: Passing values between functions and jquery
has body: I'm having difficulty juggling values in jQuery, as most of jQuery is done in an external script, and I'm not sure when I'm in functions and not in functions, so it's hard to tell when global vars are set and not set. This one in particular is puzzling me, and I'm absolutely stumped, logically to me it should work, but there seems to be something capping it at some point, and disregarding the values I'm trying to store. I've concluded this, as the error I'm having is that inside the second getJSON call, I'm getting a 'val' undefined issue, but Javascript console isn't showing any javascript errors, just getting an undefined log when I log to the console and also print the object in an alert. Just need a fresh set of eyes, feel like this is probably something simple, but I've been looking at the code so long that I can't seem to fathom it. Any help is greatly appreciated. var post_ids = new Array(); var i = 0; var val; $.getJSON("/client-ajax/last-ten-posts.php", function(data){ $.each(data, function(k, val) { post_ids.push(val.id); }); }); $.getJSON("/client-ajax/last-ten-posts.php?post-id=" + post_ids[0], function(val){ alert(val.title+""); $("#postContainer").empty(); $("#postContainer").append(" " + val.title + " " + val.content + " Posted by " + val.firstname + " " + val.surname + " at 08:52 GMT+00 on the 10-06-2014 "); }); UPDATE: I edited the code slightly in light of @N0ir's answer, but to no success. The done method ensure that actions are taken once the async process is complete, but although this is the case, val is still undefined. The code I've tried is below for examination and dissemination. $.getJSON("/client-ajax/last-ten-posts.php", function(data){ $.each(data, function(k, val) { post_ids.push(val.id); }); }).done(function(){ $.getJSON("/client-ajax/last-ten-posts.php?post-id=" + post_ids[0], function(val){ alert(val.title+""); $("#postContainer").empty(); $("#postContainer").append(" " + val.title + " " + val.content + " Posted by " + val.firstname…
accepted answer: http://stackoverflow.com/a/25104896
has comment: http://stackoverflow.com/comment/39034800

http://stackoverflow.com/comment/39088195
type: QuestionComment
score: 0
has text: You write that "they are present in native" and that you want to "expose them in hybrid", but then you write that they can be "obtained in hybrid", so why do you want to move them from native hybrid to begin with? Your text is not clear.
type: Comment
comment on: http://stackoverflow.com/q/25115505

http://stackoverflow.com/comment/39248961
type: AnswerComment
has text: See my example on jsfiddle. You can call `updateQuestion(-1)` for back and `updateQuestion(1);` for forward.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25193236

http://stackoverflow.com/q/25179483
has comment: http://stackoverflow.com/comment/39205781
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39205851
has comment: http://stackoverflow.com/comment/39205807
tagged with: ajax
has comment: http://stackoverflow.com/comment/39205722
favorite count: 0
has comment: http://stackoverflow.com/comment/39205699
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39205620
answer count: 0
tagged with: internet-explorer-8
score: 1
has comment: http://stackoverflow.com/comment/39205899
has title: jQuery AJAX request changes the webpage location in IE8
type: Question
has body: I've recently programmed a new website. The website works just as expected in all major browsers. My website is for IE8+. I wanted to try my website on IE8 and found that obviously some of my plugins doesn't work such as WOW.js but that doesn't really bother me at all. There is one thing which bothers me. For some reason, IE8 Won't recognize my AJAX request and whenever the form is being submitted, it is not being stop by jQuery and being submitted "behind the scenes" but it actually goes to the form action. here is my code: $('form.contact-form').on('submit', function(e) { e.preventDefault(); var form = $(this); /* Change button text */ var button = form.find('button[type=submit]'); var originalButtonText = button.text(); button.text('שולח...').attr('disabled', 'disabled'); var url = form.prop('action'); var data = { '_token': form.find('input[name=_token]').val(), 'name' : form.find('input[name=name]').val(), 'email' : form.find('input[name=email]').val(), 'phone' : form.find('input[name=phone]').val(), 'subject' : form.find('input[name=subject]').val(), 'message' : form.find('textarea').val() }; $.post(url, data, function(r) { processFormSubmitResult(r); button.text(originalButtonText).removeAttr('disabled'); }, 'json'); }); Why is that happening? EDIT: I've altered my code a bit so I can see if the submit function even triggers by changing the button text. It doesn't work. The code it never being executed
has comment: http://stackoverflow.com/comment/39205616
downvote count: 0

http://stackoverflow.com/q/25155955
has comment: http://stackoverflow.com/comment/39162284
tagged with: ajax
score: 0
has body: I study Django and want to use ajax. Read some examples, but have problem. I need to show all posts by click on link with name site. view: def archive(request, page_number=1): posts = BlogPost.objects.all() current_page = Paginator(posts, 3) if request.is_ajax(): t = loader.get_template("archive_ajax.html") else: t = loader.get_template("archive.html") c = Context({'posts': current_page.page(page_number), 'username': auth.get_user(request).username}) return HttpResponse(t.render(c)) base.html: mysite.example.com (I need click it and update posts ) {% block content %} {% endblock %} archive.html: {% extends "base.html" %} {% block content %} {% for post in posts %} {% include "archive_ajax.html" %} {% endfor %} {% endblock %} archive_ajax.html (problem not here, I mean firstly I need to solve problem which higher ): {{ post.title }} author: {{ post.author.username }} {{ post.body }} In base.html includ jquery: And I try to write code $(document).ready(function(){ $(".refresh").click(function(){ console.log('clicked'); $(".content").load("/blog/"); }); }); when I click on link I see it on the place where might be posts: {"content": " \n \u0430\u0432\u0442\u043e\u0440: \n \n \n", "status": 200, "statusText": "OK"} In command line I see "GET /blog/ HTTP/1.1" 200 151 I try another way and write: $(document).ready(function(){ $(".refresh").click(function(){ $.ajax({ type: "GET", url: "/blog/", success : function(newdata) { $('.content').html(newdata); } }); }); }); And now I can see nothing in place where might be posts. In command line I see "GET /blog/ HTTP/1.1" 200 151` In view I add print if request.is_ajax(): t = loader.get_template("archive_ajax.html") print('it is query'`) and in command line I see message - it's query, for ajax and js. I use python 2.7.3, Django 1.6.5 and jquery 1.11.1.min. Thank you all! I find my mistake, it was in ajax and in template archive_ajax.html. It's my inattention I think. In template I forgot t…
has comment: http://stackoverflow.com/comment/39164384
type: UnansweredQuestion
tagged with: django
tagged with: python
has comment: http://stackoverflow.com/comment/39163864
has answer: http://stackoverflow.com/a/25162683
has title: Django, update page with ajax
has comment: http://stackoverflow.com/comment/39163093
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25085084
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25081942
type: AcceptedAnswer
downvote count: 0
has body: You can't change a google.maps.InfoWindow. You can use a "3rd party" InfoWindow replacement like InfoBubble or InfoBox or even create your own custom overlay
answers question: http://stackoverflow.com/q/25081942
type: Answer

http://stackoverflow.com/comment/39112908
type: Comment
type: QuestionComment
has text: It doesn't matter what you try because you broke the plugin by neglecting to contain all of your rules inside of the `rules` option. Then you should place your `.validate()` call within the DOM ready event handler function so that it's initialized on the form _after_ the HTML is fully loaded.
score: 0
comment on: http://stackoverflow.com/q/25125902

http://stackoverflow.com/comment/39274887
has text: O it does work at http://van-der-noord.nl/beta so it's probably a problem with the host
type: Comment
comment on: http://stackoverflow.com/a/25209953
score: 0
type: AnswerComment

http://stackoverflow.com/a/25197601
type: Answer
answers question: http://stackoverflow.com/q/25197480
score: 0
has body: When you do x="inside f2" you are indeed declaring a variable. Because there was no x in that function’s scope, the compiler looks outside the current scope for this variable. It doesn’t exist, so it is set as a global. Doing var x declares the variable in the current scope, which is not necessarily the global scope. You should use strict; to catch errors like this.

http://stackoverflow.com/a/25212144
upvote count: 6
has comment: http://stackoverflow.com/comment/39267715
downvote count: 0
has body: As you want to get the file, you could use $.get from jQuery: $.get("/MyPage.html", "", function(data){ alert('success : ' + data); }); Just a word of advice: you can only get from the same domain due to the same origin policy. The main problem is that the request is done asyncronously. This means that the script won't stop, so you don't know at what point the data will be available. This is a change of concept if you come from other static languages, you should pass the function that you want to execute as a callback to jQuery.
type: Answer
has comment: http://stackoverflow.com/comment/39267664
score: 6
answers question: http://stackoverflow.com/q/25212027

http://stackoverflow.com/comment/39230380
has text: I don't understand. Why don't you use a simple loop?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25192343
score: 0

http://stackoverflow.com/comment/39217525
type: Comment
has text: `callback(…)` means that this is the point where the `callback` function, given to you by the parameter, is called. *What makes it a function?* - the value that is passed. *Where is this function defined?* - In the example call (second snippet) you see a function expression for the second argument.
comment on: http://stackoverflow.com/a/25167084
score: 0
type: AnswerComment

http://stackoverflow.com/a/25162683
score: 1
has comment: http://stackoverflow.com/comment/39174788
has comment: http://stackoverflow.com/comment/39177799
downvote count: 0
has comment: http://stackoverflow.com/comment/39175395
has comment: http://stackoverflow.com/comment/39174992
has comment: http://stackoverflow.com/comment/39175208
type: Answer
has body: It is not a good practice to write: &lt;h2&gt;&lt;a href="/blog/{{post.id}}"&gt; {{ post.title }} &lt;/a&gt; &lt;/h2&gt; Take a look at the {% url %} template tag. Edit - Disclaimer: the current user has not enough rate to comment. That's why this apparently answer-less answer is posted here.
has comment: http://stackoverflow.com/comment/39175328
upvote count: 1
has comment: http://stackoverflow.com/comment/39175279
has comment: http://stackoverflow.com/comment/39178935
answers question: http://stackoverflow.com/q/25155955
has comment: http://stackoverflow.com/comment/39175106

http://stackoverflow.com/comment/39111617
has text: Your answer could still give the OP the impression that the elements will end up in the array in some deterministic order.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25128308

http://stackoverflow.com/comment/39223638
comment on: http://stackoverflow.com/q/25188252
has text: @azeós Thank you, too. I'm going through now and fixing the duplicate IDs
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/38950748
answers question: http://stackoverflow.com/q/25089297
type: Answer
score: 2
upvote count: 3
has body: With Angular2 Bootstrap, you can use nonInput for most scenarios: &lt;div dropdown autoClose="nonInput"&gt; nonInput - (default) automatically closes the dropdown when any of its elements is clicked — as long as the clicked element is not an input or a textarea. https://valor-software.com/ng2-bootstrap/#/dropdowns
downvote count: 1

http://stackoverflow.com/a/42133480
downvote count: 0
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25096284
has body: Seems this isn't possible. There has been a bug preventing it in Chrome since 2012! https://bugs.chromium.org/p/chromium/issues/detail?id=150835

http://stackoverflow.com/comment/39234448
comment on: http://stackoverflow.com/q/25194610
type: QuestionComment
has text: You surely can. You need to get the right permissions for the action. For uploading a photograph you need the publish_actions and user_photos permission.https://developers.facebook.com/docs/graph-api/common-scenarios
score: 0
type: Comment

http://stackoverflow.com/q/25141569
score: 4
upvote count: 4
tagged with: cors
answer count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39136392
has comment: http://stackoverflow.com/comment/40384887
has body: i have been working with angular for a while, and now that i making deploy of two relative big projects, have caught a weird problem. Sometimes the OPTIONS request get stuck in pending forever, blocking the code flow to the next procedure. This happen random, i do login, run around here and there, and then, suddenly the problem appears. This is the chrome line with the pending request. Thanks for any collaboration in advance. -- More Information -- I using Silex on the backend. This call at the screenshot, works sometimes, sometimes doesn't, this is true for all the URLs, they are getting stuck randomly..
tagged with: http
has title: Angular JS with CORS has OPTIONS request pending forever
type: Question
has comment: http://stackoverflow.com/comment/39144326
has answer: http://stackoverflow.com/a/25145535
has comment: http://stackoverflow.com/comment/39148134
has comment: http://stackoverflow.com/comment/39140597
has comment: http://stackoverflow.com/comment/40405310
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25177848
has answer: http://stackoverflow.com/a/25177912
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39202905
type: Question
has title: JavaScript Json Array Parsing using Backbone
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25177941
has comment: http://stackoverflow.com/comment/39202704
answer count: 3
has answer: http://stackoverflow.com/a/25177929
tagged with: javascript
has comment: http://stackoverflow.com/comment/39203108
has body: I have the following sample json: { "camp": [ { "name": "Name", "data": [ { "date": "04/08/2014", "value": 1000 }, { "date": "05/08/2014", "value": 1110 } ] } ] } Here, I'm able to do: model.get("camp")[0], but when I try: model.get("camp")[0].get("data"), I get the following error: undefined is not a function Here model is the standard backbone model which extends Backbone.Model I'm confused what I'm doing wrong !!
score: 0
has comment: http://stackoverflow.com/comment/39202784

http://stackoverflow.com/q/25172486
linked to: http://stackoverflow.com/q/4077339
answer count: 1
has answer: http://stackoverflow.com/a/25184229
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39194860
has comment: http://stackoverflow.com/comment/39213728
has title: JQuery - setting an "active" class for image-scroll
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39211651
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25184229
has comment: http://stackoverflow.com/comment/39193907
has body: I have content loading dynamically (using new WP_query loop in WordPress) for a jQuery carousel or image-scroll function -- where the image-scroll is a li list of images, styled to look like a strip of images. When the image-scroll works properly, one of the images in the li tag has a class of active, which expands the image and makes it look like it's in front of the other images, ... and as the user clicks through this strip of images, the active class changes/moves to the targeted li tag, expanding that image. What's happening is that none of the li tags are active when the page loads - since the content is dynamic through the WP loop (I didn't want all of the li tags to start with the active class, so I didn't add it to the loop), ...and so the images are just lined up in a consistent strip w/o one of the images being expanded (or having that active class). It is only if the user happens to click on one of the images that it expands, ...but i need one of the images to be expanded (to have the class of active) before the user clicks so I need the active class added as/after the page loads. I have tried through the jQuery code to target one of the li tags to add the active class, using filter() or closest() after the page loads, but that didn't work. Or maybe I should write a new script to add the active class? Any help much appreciated! I have the abbreviated html and the jQuery function below. _Cindy ps as the code indicates, I also have corresponding article titles that scroll with the images, so perhaps I need to adjust the jQuery there, too. jQuery(".images-scroll li a").click(function() { jQuery(this).parent().parent().find("li").removeClass("active"); // tried the following instruction as well as on next line, but no go // jQuery(this).parent().parent().closest("li").addClass("active"); jQuery(this).parent().addClass("active"); jQuery(this).parent().parent().parent().find(".images-content > li").removeClass("active"); jQuery(this).parent().parent().parent()…
has comment: http://stackoverflow.com/comment/39195018
type: Question
has comment: http://stackoverflow.com/comment/39195227
score: 0

http://stackoverflow.com/comment/39233177
comment on: http://stackoverflow.com/q/25193904
type: Comment
has text: Sorry it is there. <input type="hidden" id="itemidhidden" name="itemidhidden" value=<?php echo $_GET['itemid']; ?>> , i edited my question. there are no errors in the console @Feek
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39008593
has text: Thanks @James - so you are saying to change from document.ready to .load, correct?
type: Comment
comment on: http://stackoverflow.com/a/25072989
score: 0
type: AnswerComment

http://stackoverflow.com/q/25175184
has answer: http://stackoverflow.com/a/25175421
type: Question
tagged with: debugging
answer count: 1
tagged with: javascript
tagged with: visual-studio-2012
score: 0
has body: Visual Studio 2012 stopped debugging javascript files. Javascript debugging was working fine few days ago but all of a sudden it stopped working. I tried using script debugging in IE but I am not feeling comfortable with that. Anyone has a proven solution for this issue? My system details are given below, OS: Windows 7 64 bit IE: Version 9 VS: 2012 Premium Thanks, Vim
has title: Visual Studio 2012 javascript debugger stopped working
linked to: http://stackoverflow.com/q/12197255
type: UnansweredQuestion
tagged with: javascript-debugger
linked to: http://stackoverflow.com/q/15568245

http://stackoverflow.com/q/25187199
tagged with: http://stackoverflow.com/tag/xml
type: Question
has title: XMLHttpRequest.ResponseXML is Null
tagged with: xmlhttprequest
score: 0
has body: I am trying to access a simple XML document from my JavaScript code. But whenever I ry to find the reponseXML it always results in null. Here is my code for finding the responseXML: function loadXMLDoc(filename){ if (window.XMLHttpRequest){ xhttp=new XMLHttpRequest(); }else{ xhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xhttp.open("GET",filename,false); xhttp.send(); return xhttp.responseXML; } ... Copied directly from "http://www.w3schools.com/Dom/dom_loadxmldoc.asp". Here is how I implemented it: levelDataDoc = loadXMLDoc("worlds.xml"); ... I triple checked that worlds.xml is in that directory. But when I console it.. It returns NULL If you must see... here is worlds.xml 20 30 10 15 <voxelElement1> <x>12</x> <y>7</y> 1 1 #ffffff </voxelElemen1t>
has comment: http://stackoverflow.com/comment/39220183
answer count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39220935
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39220138
has comment: http://stackoverflow.com/comment/39220210

http://stackoverflow.com/comment/39028504
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25083687
has text: @StriplingWarrior: So the question is how the time complexity of functions/methods/whatever called within a section of code is factored into the overall time complexity of that code?
score: 0

http://stackoverflow.com/comment/39058848
type: QuestionComment
comment on: http://stackoverflow.com/q/25100034
score: 1
has text: It was to show that it was not working. After I changed `!==` to `===` and did various experiments using `e.target` with `.prop()` none of them seemed to work. Not sure why #RichardTowers's answer works on my fiddle = http://liveweave.com/l1JB0W My guess is because it's declaring whatever element inside of header will change it's property itself and does not designate the original operation.
type: Comment

http://stackoverflow.com/comment/39135534
type: AnswerComment
score: 0
has text: @LukeWillis sure. Thats why I warned that "its not the best way". Actually, I didn't even read data from a table nor using jQuery for it.
type: Comment
comment on: http://stackoverflow.com/a/25141278

http://stackoverflow.com/q/25168112
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39185609
has answer: http://stackoverflow.com/a/25182286
accepted answer: http://stackoverflow.com/a/25182286
has comment: http://stackoverflow.com/comment/39185912
has comment: http://stackoverflow.com/comment/39185851
has comment: http://stackoverflow.com/comment/39185237
type: Question
has comment: http://stackoverflow.com/comment/39185681
has body: I have this jquery pop up update code $(document).on("click", ".editButton", function () { //Opens the update pops up menu. $("#dialogupdate").dialog({ autoOpen: false, modal: true, draggable: true, width: 890, height: 620, show: { effect: "blind", duration: 1000 }, hide: { effect: "fold", duration: 1000 } }); here is the html code for one column PROD DATE: (e.g MAY14) and it loads id for each records using JavaScript. table = table + ' '; and in update click side $("#btnUpdate").click(function () { var newupdateId = testObject.attr('id'); var proddate = $('#txtproddate-up').val(); and i pass this to ajax call . but somehow it makes double time inserting here if i do the action below. I have 3 rows displays on the table and each one has edit buttons .When I click one of edit buttons and menu gets open and I close it. next step , i click another edit button and update some record .so result is , it updates both row records . Any help appreciate
tagged with: javascript
tagged with: jquery
has title: Jquery dialog pop up updates multiple row records?
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25168187
has comment: http://stackoverflow.com/comment/39185468
tagged with: asp.net
possible better answer: http://stackoverflow.com/a/25168187
has comment: http://stackoverflow.com/comment/39185502
has comment: http://stackoverflow.com/comment/39185249

http://stackoverflow.com/q/25182362
has comment: http://stackoverflow.com/comment/39869999
has comment: http://stackoverflow.com/comment/54275605
tagged with: javascript
tagged with: ext.net
tagged with: extjs
score: 0
has comment: http://stackoverflow.com/comment/39891430
has comment: http://stackoverflow.com/comment/54147863
has comment: http://stackoverflow.com/comment/54354367
has body: i have some issues with Ext.net MessageBusListeners when invokings two of them at the same time with SignalR. for example, if i broadcast in SignalR javascript function like below: &lt;script&gt; $(function () { var chat = $.connection.chatHub; chat.client.addNewMessageToPage = function (message) { console.log('publish: ' + message); Ext.net.Bus.publish(message, ''); }; // Start the connection. $.connection.hub.start().done(function () { console.log("start connection"); }); }); &lt;/script&gt; and i define two messageBusListeners with two different Stores like below: Store().ID("Store1").MessageBusListeners(new MessageBusListener { Name = "message1", Fn = "myJSfunction", Single = true },...) Store().ID("Store2").MessageBusListeners( new MessageBusListener() { Name = "message2", Handler = "Ext.Msg.notify('Notification', 'message2);" }) ,...) and i broadcast via SignalR two quick calls like : Ext.net.Bus.publish("message1", ''); Ext.net.Bus.publish("message2", ''); the problem with this test is "myJSfunction" of the first MessageBusListener will be ignored and the handler of the second listeners will be executed instead. If i change the MessageBusListeners order like: Ext.net.Bus.publish("message2", ''); Ext.net.Bus.publish("message1", ''); "myJSfunction" is executed and the handler of the first messageBusListener is executed too. What is the problem with this case? Should i synchronize between many Ext.net.Bus.publish?
has title: Ext.net parallel message bus
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39775004
has comment: http://stackoverflow.com/comment/54148361
tagged with: asp.net-mvc-3
type: Question
has comment: http://stackoverflow.com/comment/54318071

http://stackoverflow.com/comment/39148113
score: 1
comment on: http://stackoverflow.com/q/25147588
has text: I get what you are trying to do, but I doubt very much you can achieve it with a client side implementation. If you want to reference cross-domain scripts like that, then you need to obtain the version information, collect the user's code, and direct the iFrame to a server side process that will build the HTML on the server. It is probable that you cannot manipulate the SRC of an iFrame like that client side and hand off offsite content to it because it is an unsafe behavior and the browser will disallow it.
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39221335
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25178227
has text: @user3168736 then you copy pasted a wrong answer and added it to your answer. Then you saw it was wrong and you copy pasted someone elses answer again, this time the right one.

http://stackoverflow.com/q/25175145
has answer: http://stackoverflow.com/a/25175175
type: Question
tagged with: javascript
has body: Can anyone please tell me how to get the count of the child within the main div using javascript like as shown below &lt;div ng-transclude=""&gt; &lt;input type="text" ng-model="user" class="ng-scope ng-pristine ng-valid"&gt; &lt;/div&gt; Count = 1 &lt;div ng-transclude=""&gt; &lt;input type="text" ng-model="user" class="ng-scope ng-pristine ng-valid"&gt; &lt;input type="text" ng-model="place" class="ng-scope ng-pristine ng-valid"&gt; &lt;/div&gt; Count = 2
score: 0
accepted answer: http://stackoverflow.com/a/25175909
has title: getting child count using javascript
has comment: http://stackoverflow.com/comment/39198165
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25175259
has answer: http://stackoverflow.com/a/25175259
linked to: http://stackoverflow.com/q/5685184
tagged with: angularjs
answer count: 5
has answer: http://stackoverflow.com/a/25175265
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25175202
has answer: http://stackoverflow.com/a/25175909

http://stackoverflow.com/comment/39313159
type: Comment
score: 0
type: AnswerComment
has text: why i got username,password is undefined in console???
comment on: http://stackoverflow.com/a/25218669

http://stackoverflow.com/comment/39273724
comment on: http://stackoverflow.com/q/25215593
score: 0
type: QuestionComment
type: Comment
has text: oops! the fiddle link didnt come so here it is : http://jsfiddle.net/vineetgnair/un6oyhfo/

http://stackoverflow.com/q/25129364
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: This piece of code is for some tabs, and is currently working fine, but I want to display the link on the 'webBar', so this way people can navigate to a page and see an specific tab Example of what im trying to do is Index.html#contenet3 $(function () { $(".tab-content").hide().first().show(); $(".inner-nav li:first").addClass("active"); $(".inner-nav a").on('click', function (e) { e.preventDefault(); $(this).closest('li').addClass("active").siblings().removeClass("active"); $($(this).attr('href')).show().siblings('.tab-content').hide(); }); var hash = $.trim( window.location.hash ); if (hash) $('.inner-nav a[href$="'+hash+'"]').trigger('click'); });
upvote count: 1
has comment: http://stackoverflow.com/comment/39113625
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25130021
has title: Tabs now working properly
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39272063
type: QuestionComment
comment on: http://stackoverflow.com/q/25214647
score: 0
type: Comment
has text: So, what *does* happen when you hook a button to that function?

jasmine
tags question: http://stackoverflow.com/q/25211746
tag name: jasmine
tags question: http://stackoverflow.com/q/25190753
tags question: http://stackoverflow.com/q/25210951
tags question: http://stackoverflow.com/q/25077376
tags question: http://stackoverflow.com/q/25175762
tags question: http://stackoverflow.com/q/25097738
tags question: http://stackoverflow.com/q/25173181
tags question: http://stackoverflow.com/q/25155767
type: Tag
tags question: http://stackoverflow.com/q/25133908
tags question: http://stackoverflow.com/q/25126333
tags question: http://stackoverflow.com/q/25187862
tags question: http://stackoverflow.com/q/25094195

http://stackoverflow.com/a/25140865
has body: It can be globally available if you just do myobject = {} or window.myobject = {}, or even $.myobject = {}. Attach it to some global object like window, or since you are using JQuery, the JQuery $ object, and then you can use that throughout. Or as @Pointy said, just add the parameter to the method: function dothisandthat(variable, myObject) {
type: Answer
accepted answer of: http://stackoverflow.com/q/25140815
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/39135463
has comment: http://stackoverflow.com/comment/39134269
downvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39136321
answers question: http://stackoverflow.com/q/25140815

google-oauth
type: Tag
tag name: google-oauth
tags question: http://stackoverflow.com/q/25160629

http://stackoverflow.com/comment/39254558
has text: Thank you so much, exactly what I was looking for. So why is it that you can't use just the click() function of jQuery? I'd like to understand the why of the problem :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25193197
type: Comment

http://stackoverflow.com/comment/39201820
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25165048
type: Comment
has text: I'm not sure why it wasn't working in the first place, but you're right, it's overriding it.

http://stackoverflow.com/q/25170502
accepted answer: http://stackoverflow.com/a/25200612
tagged with: javascript
tagged with: jquery
has title: WebShim: Show all the error messages at once for the form validation
has body: I need to show all the error messages at once for the form validation instead of showing one error message at a time. Is there any option to do it.
tagged with: webshim
score: 0
has answer: http://stackoverflow.com/a/25200612
type: AnsweredQuestion
type: Question
answer count: 1

http://stackoverflow.com/q/25091404
tagged with: kineticjs
has body: Building a canvas with KineticJS 5.0.1 and it looks awful on my Retina screen. I couldn't figure out what was going on because KineticJS jsfiddle's look just fine. Then I realized that jsfiddle uses version 4.3.1. Switched and now everything is beautiful and retina. Why doesn't v5 handle this automatically anymore? And how can I fix it? I tried to set Kinetic.pixelRatio=2 but that didn't do anything.
has answer: http://stackoverflow.com/a/25095774
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25095774
type: Question
has title: Cant' change KineticJS 5.0.1 PixelRatio
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/q/25092516
tagged with: cordova
downvote count: 1
tagged with: socket.io
type: Question
score: 3
tagged with: javascript
upvote count: 4
answer count: 1
has body: Since I've update my PhoneGap to version 3.5.0-0.20.10 I get problems in my project. When I'm running the PhoneGap service, then I see in the cli; [phonegap] 200 /socket.io/?EIO=2&amp;transport=polling&amp;t=....... But I don't use socket.io. Using the Chrome developer tools I see that in my project is a socket.io folder with a socket.io.js. So I think PhoneGap import it by itself. And my RequireJS have now a problem: Uncaught ReferenceError: io is not defined I tried to remove RequireJS, then it works but I need RequireJS. All works perfectly on the older version 3.5.0-0.20.5
has title: Has Phonegap integrate socket.io in version 3.5.0-0.20.10?
favorite count: 0
has answer: http://stackoverflow.com/a/25491301
type: UnansweredQuestion
tagged with: requirejs

http://stackoverflow.com/q/25193798
has answer: http://stackoverflow.com/a/25193822
score: 2
has body: Im trying to hide a div and show another on a keyup event. It doesn't work I don't know why: Inicia sesión con Facebook $("#beta_password").keyup(function(){ if ($(this).val() === '1789'){ $("#facebook_twitter").removeClass("hidden"); $("#beta_form").addClass("hidden"); } }); Thanks in advance for your help.
type: Question
tagged with: javascript
tagged with: jquery
has title: Jquery not removing class on keyup event
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/60704517
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25163019
score: 1
has text: I don't have the solution now, i work in other company. But the answer of rcarvalho should help you, his answer have help me to found a solution.

http://stackoverflow.com/comment/39119676
comment on: http://stackoverflow.com/a/25132896
type: AnswerComment
score: 0
has text: The question is tagged with javascript, not jquery
type: Comment

http://stackoverflow.com/a/25212601
has body: I see there is a jQuery dependency; maybe you need to add that into the HTML? https://developers.google.com/speed/libraries/devguide#jquery for more info.
type: Answer
answers question: http://stackoverflow.com/q/25212560
score: 0

http://stackoverflow.com/comment/39055795
comment on: http://stackoverflow.com/a/25098414
has text: My template string is somthing like this
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39109748
score: 5
comment on: http://stackoverflow.com/q/25127379
type: Comment
type: QuestionComment
has text: You're looking for "bracket notation", see here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Property_Accessors

http://stackoverflow.com/comment/39284230
score: 0
type: Comment
type: QuestionComment
has text: Okay sorry I didn't know I'll do it next time
comment on: http://stackoverflow.com/q/25216610

http://stackoverflow.com/comment/39123688
type: QuestionComment
has text: Well then log them. There is no reason for this not to work if the values are correct. Make sure they are numbers. You can use `parseInt()`.
score: 0
comment on: http://stackoverflow.com/q/25131997
type: Comment

http://stackoverflow.com/comment/47409295
comment on: http://stackoverflow.com/q/25211408
score: 0
has text: `<directive-element/>` is **never** correct according to the HTML specification. If it works you are lucky, because a compliant browser must not support it. Only certain native elements are allowed to be declared that way.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39048240
has text: 'not working', eh? what does it do? what should it do?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25094581
score: 1

http://stackoverflow.com/q/25194860
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25194989
type: AnsweredQuestion
tagged with: hammer.js
type: Question
has title: gestures with new hammer.js is not working like before
has answer: http://stackoverflow.com/a/25194989
score: 0
answer count: 1
has body: I just update hammer.js to newest version but after update I have error: Uncaught TypeError: Cannot read property 'target' of undefined because var fieldId = event.gesture.target.id.split('_')[0]; Gestures are working but how can I handle my fieldId in new hammer.js ? thanks for any help

http://stackoverflow.com/comment/39070160
score: 0
type: AnswerComment
type: Comment
has text: Let's see your AJAX request. Are you passing the data you need to pass from your form?
comment on: http://stackoverflow.com/a/25103911

obfuscation
tags question: http://stackoverflow.com/q/25148846
type: Tag
tag name: obfuscation

http://stackoverflow.com/q/25071489
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39005524
has comment: http://stackoverflow.com/comment/39005934
has comment: http://stackoverflow.com/comment/43909128
has title: Why does text modified by jQuery look lighter on hover in Safari?
answer count: 1
has comment: http://stackoverflow.com/comment/39005442
tagged with: jquery
has body: I haven't asked this earlier because it's difficult to explain, but when I have jQuery interacting with text elements, when the mouse is hovered on them, the font shows up noticeably thinner/lighter. For example, I have a main navigation menu on my page. jQuery interacts with it as the window is scrolled to keep it visible. If I am scrolled all the way up on the page (jQuery has not interacted with the menu), I can hover over each link and nothing changes. However, if I scroll down to where jQuery adds classes,etc. to the nav menu, when I hover over a link the text appears much thinner. This does not happen in other browsers that I've noticed (at least not in FireFox for sure), but only Safari. Any ideas?
has answer: http://stackoverflow.com/a/27748646
has comment: http://stackoverflow.com/comment/39018489
tagged with: css
tagged with: safari
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/27748646
score: 0

http://stackoverflow.com/q/25146506
has comment: http://stackoverflow.com/comment/39145148
accepted answer: http://stackoverflow.com/a/25146570
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has title: Efficiently removing items from the DOM
has answer: http://stackoverflow.com/a/25146570
has comment: http://stackoverflow.com/comment/39145155
type: AnsweredQuestion
tagged with: performance
has comment: http://stackoverflow.com/comment/39146106
tagged with: dom
has body: This is kind of a nitpicky question, but I'm curious which would be a more efficient implementation. I'm adding an overlay and a spinner over an element, then later I'm removing it. I can define two methods: addSpinner: function() { $('&lt;div&gt;&lt;/div&gt;').addClass('overlay').appendTo('#myDiv'); $('&lt;img&gt;').attr('src', 'images/spinner.gif').addClass('spinner').appendTo('#myDiv'); }, removeSpinner: function() { $('.overlay, .spinner', this.el).remove(); }, The remove spinner is going to have to look for those elements each time I call it. So my other option is to have addSpinner re-define removeSpinner with a more direct reference to the elements. addSpinner: function() { var overlay = $('&lt;div&gt;&lt;/div&gt;').addClass('overlay').appendTo('#myDiv'); var spinner = $('&lt;img&gt;').attr('src', 'images/spinner.gif').addClass('spinner').appendTo('#myDiv'); this.removeSpinner = function() { overlay.remove(); spinner.remove(); }; }, This means no searching the DOM for those two elements, but the function is redefined each time. Pros and Cons? I don't think it's relevant but these are Backbone/Marionette views.
type: Question

http://stackoverflow.com/a/25211236
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25211111
has body: Here's one example of it working : http://jsbin.com/zayih/1/edit?html,css,output Though it does not seem to work when targeting it with #placeholder Turn on "Show user agent shadow DOM" in Chrome devtools config tab, then inspect the &lt;input&gt; to see what I mean

http://stackoverflow.com/q/25212033
upvote count: 3
tagged with: wysiwyg
type: Question
has title: Stop CKEDITOR from Copying the Previous Element class into each new element on page
tagged with: javascript
tagged with: ckeditor
has answer: http://stackoverflow.com/a/49632286
has body: By default, whatever element your cursor is inside of when you hit the enter key will be duplicated with all of the same attributes. If you set "forceEnterMode: true" in the CKEDITOR config file, you can force ckeditor to not duplicate the element and instead use the default element each time you hit enter (http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.forceEnterMode), but unfortunately the classes are still copied over into this new element. To put it another way, if the code inside ckeditor is: {{cursor here}} And you press the enter key twice. You'll get: {{cursor here}} I you then set forceEnterMode: true, and hit enter key, you'll get: {{cursor here}} I'm not sure in what situation you would want your previous elements class to be copied into every future element as you spaced down the page, but I definitely don't want this functionality. I want the result to be this: How can I force CKEDITOR to stop copying the previous element attributes into each new element of the page each time I hit the enter key? Here's the jsfiddle: http://jsfiddle.net/B4yGJ/158/
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/65504214
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 3

http://stackoverflow.com/comment/39275097
type: QuestionComment
comment on: http://stackoverflow.com/q/25215813
score: 0
has text: You either generate page elements on your server (in PHP in your case) and then echo that to the client when they request the page. Or, you generate new elements in javascript in the browser and your PHP never sees those elements which is generally not an issue in any way.
type: Comment

http://stackoverflow.com/comment/39194053
score: 0
has text: I can share the plunker for sure. I did not downvote your question btw.
type: Comment
comment on: http://stackoverflow.com/a/25172784
type: AnswerComment

http://stackoverflow.com/a/25086877
score: 0
answers question: http://stackoverflow.com/q/25085897
has comment: http://stackoverflow.com/comment/39037276
type: Answer
has comment: http://stackoverflow.com/comment/39036133
has comment: http://stackoverflow.com/comment/39036034
has comment: http://stackoverflow.com/comment/39037585
has body: Use Page.ClientScript.RegisterStartupScript see sample code below: protected void btnSubmit_Click(object sender, EventArgs e) { //place c# code here that does something before your javascript Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", @"$(document).ready(function() { //Call your function here myFunction(); });", true); } Note, my code uses jQuery, modify as needed. I hope this helps you.
has comment: http://stackoverflow.com/comment/39038076
has comment: http://stackoverflow.com/comment/39037949
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25085897

http://stackoverflow.com/q/25173488
has title: Javascript to modify html from external site
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39196358
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25173530
has body: I've been researching for about 2 days now and am all out of ideas. I'm new to javascript but from what I have read it seems that my problem has to do with cross-site scripting rules/precautions. My goal is simple make a website based on an external site (which I have no control over). I want to use javascript or some other method to load a website's html and then remove tags etc. I looked at ajax but ran into issues with same-domain restrictions. I tried a "hack" by including the website in a hidden iframe and trying to access the code that way but sandboxing seems to prevent that. I really want to do this with web based techniques. Any advice or tips on how to handle this (or is it impossible)?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39197079
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39195508
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25093528
has comment: http://stackoverflow.com/comment/39046832
has comment: http://stackoverflow.com/comment/39046545
has comment: http://stackoverflow.com/comment/39046476
has comment: http://stackoverflow.com/comment/39046586
has comment: http://stackoverflow.com/comment/39046792
has comment: http://stackoverflow.com/comment/39046483
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39046501
has comment: http://stackoverflow.com/comment/39046742
type: Answer
has comment: http://stackoverflow.com/comment/39046906
answers question: http://stackoverflow.com/q/25093270
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39046449
accepted answer of: http://stackoverflow.com/q/25093270
has comment: http://stackoverflow.com/comment/39047238
has body: Edit: after reading and understanding the author's comments, he was actually meant to block the entire app if the user is not permitted. his desired to do it by reusing the same code written in his ApiService factory. -- You can 'hook' to app.run function which called before your controllers and you can utilize $window.location.href to relocate user to another page or site (if not permitted) Iv'e updated this plunker with app.run entry app.js var app = angular.module('app', ['app.services']); app.run(function(ApiService, $window) { result = ApiService.request(); // This is where you check your permissions var has_permissions = false; // ... if (!has_permissions) { alert('being transferred to plnkr.co due to lack of permissions'); $window.location.href = 'http://plnkr.co/'; } // Otherwise, continue normally }); Original: i made this plunker if you separate all logic to api.services module, include it in your app app.js var app = angular.module('app', ['app.services']); then you could use it by referencing the desired factory - ApiService app.controller('myCtrl', ['$scope', 'ApiService', function($scope, ApiService) { $scope.result = ApiService.request(); } ]); app.services.js var services = angular.module('app.services', []); services.factory('UserService', function() { var UserService = {}; UserService.foo = function() { return "foo"; }; return UserService; }); services.factory('ApiService', function($http, UserService) { var ApiService = {}; ApiService.request = function(url, data, next) { return UserService.foo() + " Hi"; }; return ApiService; }); plunker
has comment: http://stackoverflow.com/comment/39046802

http://stackoverflow.com/comment/39061399
type: AnswerComment
score: 0
has text: Super idea thanks! Other guy posted at same time saying same solution haha so Ill just up vote both you and leave no solution checked :P
type: Comment
comment on: http://stackoverflow.com/a/25101522

http://stackoverflow.com/q/25142615
tagged with: eval
has comment: http://stackoverflow.com/comment/39137761
has body: I am toying around with making a custom Javascript class system and am currently interested in making my object instances be well identified in the console / devtools, as described in this previous question of mine. So far, I am getting the impression that the only way to achieve what I want is to to use eval to create named functions, as described in this other question. Are there any tradeoffs I should expect if I use eval to create my classes? I am not worried about eval itself being slow1 or about security2 but I heard that using eval could possible disable JIT compilation for the rest of the code. Is this true? If it is, what code would be affected? Just the function with eval? The function and all its parent functions? The whole module? What steps could I take to make sure the eval affects my code as little as possible? 1 I would only need to use eval to do some metaprogramming at the start of the script. It wouldnt run inside a performance critical loop. 2 I would never call eval with user input and in my case I could even use a regex to check if the input string is a valid identifier / function name.
linked to: http://stackoverflow.com/q/9479046
has title: What are the performance implications of using `eval` in Javascript?
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25141170
tagged with: performance
answer count: 0
has comment: http://stackoverflow.com/comment/39137629
type: Question
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39137571
type: Comment
type: QuestionComment
has text: Um, `id` is supposed to be unique within an HTML document.
score: 0
comment on: http://stackoverflow.com/q/25142654

http://stackoverflow.com/comment/39111205
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25128165
has text: I dont get NULL on stack overflow.
score: 0

http://stackoverflow.com/comment/39120939
score: 0
type: Comment
type: QuestionComment
has text: it seems to be consistently 95px more, no matter how high you set the browser.. if you watch during the resize event, '.m-pikabu-overlay' gets set to the correct height.. its only on opening that the menu adds an additional 95px
comment on: http://stackoverflow.com/q/25133345

http://stackoverflow.com/comment/39230510
score: 0
has text: You are great my friend. Here the result: http://puu.sh/aIZ61/c41d868495.png Thank you very very much!
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25192169

http://stackoverflow.com/comment/39167146
score: 1
has text: The code looks fine, and it should work. There's not much we can help you with! What version of jQuery are you using, did you check the console for errors etc ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25158789

http://stackoverflow.com/comment/39215042
type: Comment
comment on: http://stackoverflow.com/q/25184495
score: 1
has text: @ZlatinZlatev : How do you know he has put the commas? It could be that "THAT" is the thing which was missing?
type: QuestionComment

http://stackoverflow.com/q/25107822
has title: Query not working for me
has body: I am using angularJs ng-resource.I have tried this angular.module('app.services', ['ngResource']) .factory('AngularIssues', function($resource){ return $resource('../test.json',{},{ query: { isArray: true, method:'GET' }} ) }) I have test.json file as below { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": { "para": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML"] }, "GlossSee": "markup" } } } } } Now in index.html I have written something like this Get element through rest My controller is like this angular.module('app.controllers', []) .controller('editor', ['$scope' ,'AngularIssues', function($scope , AngularIssues ) { $scope.get_rest = function(){ $('#message').text(AngularIssues.query()); } }]); I want to see use the get query using ng-resource feature but when I run this on my localhost I did not get anything on clicking the button .Is there any way to achieve this . Thanks in advance.
has comment: http://stackoverflow.com/comment/39073539
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39073499
downvote count: 1
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39073455
has comment: http://stackoverflow.com/comment/39074592
has comment: http://stackoverflow.com/comment/39073479
has answer: http://stackoverflow.com/a/25108750
score: -1
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/39073606
has comment: http://stackoverflow.com/comment/39073382
upvote count: 0
answer count: 1
tagged with: angular-ui
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/37726834
answers question: http://stackoverflow.com/q/25114158
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/62925018
has body: function getColumnSum(){ try { var unid = param.documentId; var columnData = @DbLookup(@DbName(), "totalScore", unid, 8); //column to be summed: counting from 1 will give you 8 instead of [7]; if(columnData != null){ var columnSum = @Sum(columnData).toFixed(0); return " " + columnSum; }else{ return " " + "0"; } }catch(e){ print(e.toString()); } } getColumnSum();
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/25200465
answers question: http://stackoverflow.com/q/25200305
has comment: http://stackoverflow.com/comment/39245672
downvote count: 0
type: Answer
score: 6
upvote count: 6
has body: For javascript, i've use only sPaginationType to initialize the data table. I'm always use this code for data table. Let build the data table step by step. Use this code only, then check whether it's working or not. Note: Please remove all other javascript files other than data table js and css files. I got a issue that data table is not working with jquery calender. Let try this and let me know. $('#table_name').dataTable({ "sPaginationType": "full_numbers" }) .columnFilter({sPlaceHolder: "head:before", aoColumns: [{type: "text" },{type: "text" },{type: "text" },{type: "text" },{type: "text" },{type: "text" }] });
has comment: http://stackoverflow.com/comment/43327255

http://stackoverflow.com/q/25227431
tagged with: jquery
favorite count: 0
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25227484
tagged with: asp.net
has title: how to use text from title dynamic
upvote count: 1
tagged with: css
downvote count: 1
has body: Im using the following tool-tip code which I found in SO and currently the text is hard-coded in the title section, the problem is I need to use it in different label with different text title and not hard-coded to all the labels ,how should I change it to support any label with different title text. &lt;div class="form-group"&gt; @Html.LabelFor(model =&gt; model.Name, new { @class = "control-label col-md-2" }) &lt;div class="col-md-10"&gt; @Html.EditorFor(model =&gt; model.Name) &lt;span class="label label-primary mytooltip"&gt;?&lt;/span&gt; @Html.ValidationMessageFor(model =&gt; model.Name) &lt;/div&gt; &lt;/div&gt; This is the script $(document).ready( function () { $(".mytooltip").tooltip({ animation: "true", placement: "right", title: "Tooltip texts....", trigger: "hover" });
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25227484
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25227525
accepted answer: http://stackoverflow.com/a/25227525
tagged with: javascript

http://stackoverflow.com/comment/39146489
comment on: http://stackoverflow.com/a/25147020
type: Comment
has text: Is it not possible to directly use them , the way we use them in server side?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39298400
type: QuestionComment
comment on: http://stackoverflow.com/q/25228754
has text: No I am asking you to debug your code....
score: 0
type: Comment

http://stackoverflow.com/q/25115477
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/39090509
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39100553
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25128547
accepted answer: http://stackoverflow.com/a/25128547
answer count: 1
has body: I have a HTML5 animation that uses a canvas of size 900x520. However ~60% of the canvas is not utilized in the most general case. If some of the parameters of the animation are varied, then the whole canvas is utilized which is the reason why I pegged the maximum canvas size to W:900px and H:520px. When a user opens the page with this HTML5 canvas, a general case is considered and only 280x280 at the center of the HTML5 canvas is used. As per my knowledge though I'm not using the other 60% of the canvas is not used but is rendered every time which is causing the animation to slow down, especially on tablets and mobile phones (Most of my intended users are tablets / mobile users). So, I would like to know if there are any techniques to render only a set of pixels everytime (say 300x300 at the center of the canvas) ? Are there any workaround solutions ? I'm already using RequestAnimationFrame (However, I want some more optimization)
type: AnsweredQuestion
has title: Optimizing HTML5 Animation
has comment: http://stackoverflow.com/comment/39090157
has comment: http://stackoverflow.com/comment/39107870

http://stackoverflow.com/comment/39115566
type: QuestionComment
comment on: http://stackoverflow.com/q/25130393
score: 1
has text: You should back off a bit in the tutorial if you cannot tell what `{}` does …
type: Comment

http://stackoverflow.com/comment/39228651
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25191494
has text: I think the right syntax would be `require("./FileOne.js");`...
score: 1

http://stackoverflow.com/a/25086907
has comment: http://stackoverflow.com/comment/39105007
score: 1
accepted answer of: http://stackoverflow.com/q/25086694
type: AcceptedAnswer
downvote count: 0
has body: Ugh... Classes are not meant to be used that way. Rather: FOO BAR $(function () { // DOM ready shorthand $('.imgLink').click(function ( e ) { e.preventDefault(); var imgPath = $(this).attr('href'); var targetID = $(this).data('targetid'); $('#theImage'+ targetID).attr('src', imgPath); }); }); |→ jsBin demo So basically you add the same class to all your clickables, and a data-* attribute with the number of the image ID suffix you want to target. There's also other nice ways (even simpler) to achieve the same, but without seeing some HTML it's blind guessing.
type: Answer
answers question: http://stackoverflow.com/q/25086694
has comment: http://stackoverflow.com/comment/39147764
has comment: http://stackoverflow.com/comment/39034990
upvote count: 1

http://stackoverflow.com/comment/39039979
type: QuestionComment
has text: In that case, the DOM is available immediately after `$('#wrapper').html(template());`
score: 0
comment on: http://stackoverflow.com/q/25089748
type: Comment

http://stackoverflow.com/comment/39068981
has text: damn.. I have links in my .heading-container which on-click shows pop-ups, it dont work with clone .heading-container :(
comment on: http://stackoverflow.com/a/25105400
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25203119
has comment: http://stackoverflow.com/comment/39249989
has comment: http://stackoverflow.com/comment/39251593
has body: In your sample you are already calculating the business days between the dates when you change the dates with the datepickers. Here I improved this part, still using the calcBusinessDays method you copied from another stackOverflow question: $("#datepicker, #datepicker1").change(function() { //alert("getPricing just got called"); var d1 = $("#datepicker").datepicker("getDate"); var d2 = $("#datepicker1").datepicker("getDate"); // Calculate only if both dates are defined if(d1 != undefined &amp;&amp; d2 != undefined) { var days = calcBusinessDays(d1,d2); if(days &gt; 0) { $("#leaves_left").val(days); } else { $("#leaves_left").val(0); } } }); You can externalize a part of this method to use it on button click: var d1 = $("#datepicker").datepicker("getDate"); var d2 = $("#datepicker1").datepicker("getDate"); // Calculate only if both dates are defined if(d1 != undefined &amp;&amp; d2 != undefined) { var days = calcBusinessDays(d1,d2); alert(days); } By the way you should also not use dl dd dt tags for the kind of things you are trying to implement. I cannot give you a fiddle corresponding to your structure, just a basic sample: http://jsfiddle.net/nrobert/6h85yvrg/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39251535
score: 0
answers question: http://stackoverflow.com/q/25202077
type: Answer
accepted answer of: http://stackoverflow.com/q/25202077
has comment: http://stackoverflow.com/comment/39249926

http://stackoverflow.com/comment/39307509
has text: I've haven't had my chance at it but I've seen some success stories such as [this person's blog.](http://www.truevalhalla.com/blog/) He also provides a large list of publishers, but right off the bat I have heard [Spil Games](http://developers.spilgames.com/) is a very good publisher.
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25216529

http://stackoverflow.com/q/25214199
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25214314
tagged with: events
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39271332
has answer: http://stackoverflow.com/a/25214253
has comment: http://stackoverflow.com/comment/39271319
linked to: http://stackoverflow.com/q/11172087
has title: Assign a click event to Image object
tagged with: onclick
score: 0
has body: I am working in JavaScript and I am trying to click on an object and make something simple happen, like an alert for example. So I've declared the object as such: var panel = new Image(); panel.src = IMAGES_PATH + "panel.png"; Then I've drawn it to the screen. ctx.drawImage(panel, 475, 140); The problem I am facing now is that I want to click on it and I want a function to fire. Attempt #1 panel.onclick = function () { alert("You clicked!"); } Attempt #2 panel.addEventListener('click', function () { alert('blah'); }, false); I know the click events are working in Google Chrome because I can do: window.addEventListener("click", click, false); Any ideas to why I can't do an onclick for the Image class?

http://stackoverflow.com/a/25107916
has comment: http://stackoverflow.com/comment/39073272
score: 8
accepted answer of: http://stackoverflow.com/q/25107905
downvote count: 0
answers question: http://stackoverflow.com/q/25107905
has comment: http://stackoverflow.com/comment/39073287
has comment: http://stackoverflow.com/comment/39074406
has comment: http://stackoverflow.com/comment/39073240
upvote count: 8
has comment: http://stackoverflow.com/comment/39073070
has comment: http://stackoverflow.com/comment/39074543
has comment: http://stackoverflow.com/comment/39073254
has comment: http://stackoverflow.com/comment/39074464
has comment: http://stackoverflow.com/comment/39073115
has body: Use word boundaries, &gt; var a = "@1234abc 12 34 5 67 sta5ck over @ numbrs ." undefined &gt; numbers = a.match(/\b\d+\b/g) [ '12', '34', '5', '67' ] Explanation: \b Word boundary which matches between a word charcter(\w) and a non-word charcter(\W). \d+ One or more numbers. \b Word boundary which matches between a word charcter and a non-word charcter. OR &gt; var myString = '@1234abc 12 34 5 67 sta5ck over @ numbrs .'; undefined &gt; var myRegEx = /(?:^| )(\d+)(?= |$)/g; undefined &gt; function getMatches(string, regex, index) { ... index || (index = 1); // default to the first capturing group ... var matches = []; ... var match; ... while (match = regex.exec(string)) { ..... matches.push(match[index]); ..... } ... return matches; ... } undefined &gt; var matches = getMatches(myString, myRegEx, 1); undefined &gt; matches [ '12', '34', '5', '67' ] Code stolen from here.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39073529
has comment: http://stackoverflow.com/comment/39073048
has comment: http://stackoverflow.com/comment/39073218
has comment: http://stackoverflow.com/comment/39073335
has comment: http://stackoverflow.com/comment/39073205
has comment: http://stackoverflow.com/comment/39074332
type: Answer

http://stackoverflow.com/comment/115955355
has text: Is that site still up?
comment on: http://stackoverflow.com/a/25224024
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25221017
has body: you can use firstElementChild to bypass that whitespace (or just use an existing js library if what are you doing isn't meant just for learning purposes, dealing with the DOM yourself isn't a very pleasant experience)
type: Answer
answers question: http://stackoverflow.com/q/25220801
has comment: http://stackoverflow.com/comment/39283960
score: 0

http://stackoverflow.com/q/25164279
has comment: http://stackoverflow.com/comment/39177887
has comment: http://stackoverflow.com/comment/39178157
type: UnansweredQuestion
tagged with: php
answer count: 0
has comment: http://stackoverflow.com/comment/39177962
type: Question
has comment: http://stackoverflow.com/comment/39177819
has comment: http://stackoverflow.com/comment/39177889
tagged with: javascript
has comment: http://stackoverflow.com/comment/39178735
score: 0
has body: I am populating a select box using javascript. When a different store name is selected, it changes back to the default. the code is as follows: var selected_store = "<?php if (!empty($_POST['store'])) { echo $_POST['store']; } else { echo "-1"; } ?>"; function loadStores() { $('#store').html(' Store Name '); for (var i = 0; i < stores.length; i++) { console.log(selected_store); console.log(stores[i]); if (stores[i] == selected_store) { $('#store').append(' '+stores[i]+' '); } else { $('#store').append(' '+stores[i]+' '); } } } Loan Type Payday Title District Manager Store Name selected_store is always returning a -1, even when a different store is selected.
has title: Why won't the select box append when form is submitted?
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39083908
type: QuestionComment
has text: "JsLine will report errors on my code" - Any chance you're more specific about that? I don't even know what JsLine is (do you mean JSLint?)
comment on: http://stackoverflow.com/q/25113690
score: 0
type: Comment

http://stackoverflow.com/a/25107925
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/118386582
has comment: http://stackoverflow.com/comment/125527233
score: 133
has comment: http://stackoverflow.com/comment/139685722
accepted answer of: http://stackoverflow.com/q/25107774
has comment: http://stackoverflow.com/comment/52459827
type: Answer
answers question: http://stackoverflow.com/q/25107774
has comment: http://stackoverflow.com/comment/99376204
downvote count: 1
has comment: http://stackoverflow.com/comment/125523372
has comment: http://stackoverflow.com/comment/47278871
has comment: http://stackoverflow.com/comment/78292061
has comment: http://stackoverflow.com/comment/139685032
has body: First, you'll need to edit your manifest.json and add the permission for www.example.com: For the new Manifest V3, use the host_permissions field: { "manifest_version": 3, ... "host_permissions": [ "https://www.example.com/*" ], ... } If you are still using the old Manifest V2, use the permissions field: { "manifest_version": 2, ... "permissions": [ "https://www.example.com/*" ], ... } Then in your background page (or somewhere else) you can do: fetch('http://www.example.com?par=0').then(r => r.text()).then(result => { // Result now contains the response text, do what you want... }) See also MDN doc for fetch(). Deprecated version using XMLHttpRequest (ES5): function callback() { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { result = xhr.responseText; // ... } } }; var xhr = new XMLHttpRequest(); xhr.open("GET", "http://www.example.com?par=0", true); xhr.onreadystatechange = callback; xhr.send(); NOTE the warning at the top of the relative documentation page: In Manifest V3, XMLHttpRequest is not supported in background pages (provided by Service Workers). Please consider using its modern replacement, fetch()
upvote count: 134
has comment: http://stackoverflow.com/comment/52246919

http://stackoverflow.com/comment/39062459
score: 0
type: Comment
has text: I used the option starting with "To hide something else, try". It works nicely. Thank you.
type: AnswerComment
comment on: http://stackoverflow.com/a/25101698

http://stackoverflow.com/comment/39085608
type: Comment
comment on: http://stackoverflow.com/a/25112808
score: 0
type: AnswerComment
has text: @pasargad - you wanted name of object, while this solution gives you just the location

http://stackoverflow.com/comment/39198150
score: 0
type: AnswerComment
has text: jQuery IS Javascript.
type: Comment
comment on: http://stackoverflow.com/a/25175175

http://stackoverflow.com/comment/39063167
type: AnswerComment
comment on: http://stackoverflow.com/a/25102682
type: Comment
has text: it is nice approach but autfocus is not supported in Internet Explorer 9 and earlier versions
score: 2

http://stackoverflow.com/comment/39066069
score: 1
has text: @RobSchmuecker you hit it square on the head, and even simpler. I do recall something about detaching events for properness, but that can be another lesson.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25104171

http://stackoverflow.com/q/25210324
has title: Facebook: The parameter app_id is required after pressing share button
answer count: 0
has body: I have this code that works fine for BLOGGER, but now I am getting this error: "The parameter app_id is required" I have tried many methods to add app_id but I haven't found one that worked. Share to Unlock this page
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: facebook-like
has comment: http://stackoverflow.com/comment/39264023
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: facebook

http://stackoverflow.com/a/25224888
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39295037
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25224737
has comment: http://stackoverflow.com/comment/39292130
has body: At one point, long ago, the recommendation was that you never put elements on the document that you weren't using, and you removed the element once it was done. You have to realize, however, that this recommendation was at a time when browsers didn't always handle CSS and layout control was horrible. This was an era of text-based browsers such as lynx. The world is much different now and even most blind users [citation needed] use full-fledged browsers with screen readers and these screen readers are smart enough to understand hidden elements. Today, it is much easier to simply put everything that isn't sensitive in the document and style sheet rules or JavaScript to hide, unhide and re-arrange as needed. That said, sensitive information should be restricted. If a end user isn't allowed to see something, then don't give it to them, even hidden. Remember, the client can never be trusted. EDIT PER COMMENT Lets imagine that your system has a sensitive field that we'll call coolness. Coolness is something that regular users can't ever see, but the web admins get to set on folks they like and don't like. If you simply say: Coolness then even though it is hidden on the screen, a user can still look at the HTML markup and see that value. Its hidden, but easily findable. Continuing on the same though, the back end code also needs a guard around that coolness value, so that someone can't tweak what is being sent and add that in. The back end code needs to look something like this: if (loggedInuser.AccessLevel === AccessLevel.Admin) { // Only let Admins change the level referencedAccount.Coolness = formData.coolness; }
answers question: http://stackoverflow.com/q/25224737
has comment: http://stackoverflow.com/comment/39291775
has comment: http://stackoverflow.com/comment/39291722
upvote count: 2

http://stackoverflow.com/a/25091147
type: AcceptedAnswer
score: 1
accepted answer of: http://stackoverflow.com/q/25091034
has comment: http://stackoverflow.com/comment/39071227
has body: You do not need to necessarily edit the array, instead you can add to the values before you use them in Jquery. Individual items var arr = ['foo', 'bar', 'baz']; $(arr).each(function(key, value)){ var id = '#' + value; $(id).css({ 'border', 'red solid 1px'}); }); Using them all at the same time var arr = ['foo', 'bar', 'baz']; var ids = '#' + arr.join(', #'); $(ids).css({ 'border', 'red solid 1px'}); Explanation Array.join() takes a parameter, this parameter is a string that will be put in between each of the array element, if left blank it will use ''
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25091034
downvote count: 0

http://stackoverflow.com/comment/39232483
comment on: http://stackoverflow.com/q/25193607
score: 0
type: QuestionComment
has text: What exactly are you expecting to get in a loop by this code? n = n * 2 + "000";
type: Comment

http://stackoverflow.com/q/25091967
has title: Using draggable functionality with onClick event
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25092578
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: How do I make a DIV degradable by the use of an image. This is my code: var tDV = 0; $("#aTx").click(function() { var diagonalScl; var txSiz; tDV++; $("#ltn").append(' '); $("#aTextDV"+tDV) .append(' ') }); function mTxt(mndM){ $("#"+mndM).draggable(); }
type: Question

http://stackoverflow.com/q/25179234
has comment: http://stackoverflow.com/comment/39207178
has body: I'm trying to process form data using jQuery post as follows: &lt;script type="text/javascript"&gt; $('#settingsForm').submit( function(){ $('input[type=submit]', this).attr('disabled', 'disabled ');}); function scheck(){ var oldanswer = $("#oldanswer"); var newanswer = $("#newanswer"); var url = "settingsupdate.php"; //This part of the code works fine. Errors are displayed normally if(oldanswer.val() == ""){ $('#output').html('Oops you left a field empty. Please fill it').show().fadeOut(6000); } else if (newanswer.val() == ""){ $('#output').html('Oops you left a field empty. Please fill it').show().fadeOut(6000); } else{ $.post(url,{oldans: oldanswer.val(), newans: newanswer.val()},function (data){ $("#security_check").slideup("fast");//this is a div containing the form $("#output").html(data).show().fadeOut(10000);//this div outputs the returned data document.settingsForm.oldanswer.value = ""; document.settingsForm.newanswer.value = ""; }); } } &lt;/script&gt; In the code above, the error check works well. If a field is empty the page will display the appropriate error message. However when both fields aren't empty and the form is submitted, the page just remains static. Nothing is echoed from the php script back to the page. settingsupdate.php if(isset($_POST['newans'])){ $oldans = htmlspecialchars($_POST['oldans']); $newans = htmlspecialchars($_POST['newans']); echo $newans; } the form &lt;form action="javascript:scheck();"id="settingsForm" name="settingsForm" method="post"&gt; &lt;input type="text" id="oldanswer" name="oldanswer"/&gt; &lt;input type="text" id="newanswer" name="newanswer"/&gt; &lt;input type="submit" id="submitset" name="submitset"/&gt; &lt;/form&gt; I checked print_r($POST) and it returns an empty array. I'm not sure why. Can anyone aid me in getting this code to work properly. Thanks
tagged with: javascript
tagged with: jquery-post
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39206831
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39205497
tagged with: php
has comment: http://stackoverflow.com/comment/39205286
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/39205332
has comment: http://stackoverflow.com/comment/39207003
has title: How do I get JQuery post to work
has comment: http://stackoverflow.com/comment/39205221

http://stackoverflow.com/q/25186757
upvote count: 3
tagged with: angularjs
favorite count: 0
downvote count: 0
type: AnsweredQuestion
score: 3
has title: AngularJS mouse event is fired multiple times in a loop
type: Question
has comment: http://stackoverflow.com/comment/39219627
answer count: 1
has comment: http://stackoverflow.com/comment/39219484
tagged with: javascript
has answer: http://stackoverflow.com/a/25186884
accepted answer: http://stackoverflow.com/a/25186884
has body: I am trying to trigger the function setHighlight when a li element is hovered by mouse. The ng-mouseover event is set in an ng-repeat loop. The issue is that when I hover a li element, the ng-mouseover is triggered multiple time. The number of trigger times equals to the number of iteration times. Here is my code snippet: {{review.name}} {{review.stars}} Stars -- {{review.location}} {{review.description}} written by {{review.author}} Did I put the hover event in a wrong place?

http://stackoverflow.com/comment/50033408
has text: Careful with this, it locked me out of my vagrant box, now ssh times out, and the box can't be reloaded anymore.
score: 1
comment on: http://stackoverflow.com/a/26025076
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25132255
has title: Comparing objects in JavaScript
upvote count: 36
has comment: http://stackoverflow.com/comment/39164277
has answer: http://stackoverflow.com/a/25132334
tagged with: javascript
has comment: http://stackoverflow.com/comment/39278317
has comment: http://stackoverflow.com/comment/39167847
has answer: http://stackoverflow.com/a/25132306
favorite count: 0
has body: I have this code: var object1 = {same:'test'} var object2 = {same:'test'}; console.log(object1 === object2) It returns false in the console. I also have this code: var object1 = {same:'test'} var object2 = object1; console.log(object1 === object2) It returns true in the console. I know '===' is an equality operator, but I don't know how it works on objects. Why does the first example return false?
linked to: http://stackoverflow.com/q/359494
has comment: http://stackoverflow.com/comment/39164461
has comment: http://stackoverflow.com/comment/39118432
has comment: http://stackoverflow.com/comment/39163087
has answer: http://stackoverflow.com/a/25139329
possible better answer: http://stackoverflow.com/a/25132306
answer count: 10
has comment: http://stackoverflow.com/comment/39162386
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25132310
has comment: http://stackoverflow.com/comment/39144295
downvote count: 3
linked to: http://stackoverflow.com/q/201183
type: Question
linked to: http://stackoverflow.com/q/1068834
has answer: http://stackoverflow.com/a/51760315
linked to: http://stackoverflow.com/q/22828341
accepted answer: http://stackoverflow.com/a/25139329
has answer: http://stackoverflow.com/a/25132337
has answer: http://stackoverflow.com/a/25138825
has answer: http://stackoverflow.com/a/25132313
has answer: http://stackoverflow.com/a/25132480
score: 33
has answer: http://stackoverflow.com/a/25132307

http://stackoverflow.com/a/25108296
downvote count: 1
has comment: http://stackoverflow.com/comment/39074047
has comment: http://stackoverflow.com/comment/39074389
accepted answer of: http://stackoverflow.com/q/25108219
has comment: http://stackoverflow.com/comment/39074813
has comment: http://stackoverflow.com/comment/39073904
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39074715
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39074278
has comment: http://stackoverflow.com/comment/39074290
answers question: http://stackoverflow.com/q/25108219
has body: You can't put code inside an e-mail and expect that it will work because of some simple reasons: When people receive your e-mail, the service that handles it automatically blocks any code inside of it from being executed. So javascript will not work, PHP neither, and so on. It would be a huge security flaw if this could be possible. PHP will never work anyway because is a server-side language. This means that it can't be executed on your pc. It needs to be executed on a server that sends a response back when finished. Lear more about what server-side means: http://en.wikipedia.org/wiki/Server-side_scripting
upvote count: 1

http://stackoverflow.com/a/25171459
accepted answer of: http://stackoverflow.com/q/25167850
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39191890
has comment: http://stackoverflow.com/comment/39191971
type: Answer
has body: I made a Plunk using your codebase and it's working. Give it a try. I added a back button for my convenience. An odd thing I noticed is, if the <ons-button> is removed from the template (dessert.html), the interpolation doesn't work. I can honestly say I am not sure why that is. I have developed ons-page without ons-button and never had this issue. Hope this helps.
answers question: http://stackoverflow.com/q/25167850
upvote count: 1

http://stackoverflow.com/q/25131727
has answer: http://stackoverflow.com/a/25131914
has comment: http://stackoverflow.com/comment/39117574
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25132061
has answer: http://stackoverflow.com/a/25131903
type: Question
has body: I have two html pages named order.html,check.html and test.js(included in both html files) When i click on submit button in order.html,amount field value from order.html should get updated/populate into cost field of check.html. Below is the code i am using but its not working,can someone let me know whats wrong?? order.html name: check.html test.js function cost(){ var amount= $("#amount").val(); jQuery.load("check.html",function(){ $("#cost").html(amount); }); }
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: Populate data from one html file to another

http://stackoverflow.com/comment/39063009
comment on: http://stackoverflow.com/a/25098277
type: Comment
score: 0
type: AnswerComment
has text: This is not a help desk. You should debug on your own.

http://stackoverflow.com/a/25145225
has comment: http://stackoverflow.com/comment/39142749
has comment: http://stackoverflow.com/comment/39148091
type: Answer
accepted answer of: http://stackoverflow.com/q/25145100
has comment: http://stackoverflow.com/comment/39143516
score: 2
answers question: http://stackoverflow.com/q/25145100
has body: try: trigger with jquery: $(app).trigger("myCustomEvent"); http://jsfiddle.net/9w8A5/ trigger as backbone event: first You will need to extend the object with Backbone.Events: var app = {}; _.extend(app, Backbone.Events); // underscore.js '_.extend', We can also use jquery '$.extend()' ... on("myCustomEvent")... app.trigger("myCustomEvent"); demo: http://jsfiddle.net/A5484/1/ Update from agconti. Here's a simple way to accomplish attaching events in backbone: var app = _.extend({}, Backbone.Events); var myView = Backbone.View.extend({ initialize: function(){ ... other configuration stuff ... app.on( "myCustomEvent", function(){ this.doStuff(); }, myView); }, doStuff: function(){ alert("Yo!"); } }); app.trigger('myCustomEvent'); * its much more advantageous to use backbone's event object then attaching a listener with app.on(); like i was trying to do.
downvote count: 0
has comment: http://stackoverflow.com/comment/39147552
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/39186647
has text: Ok I found your package on atmosphere: [define](http://atmospherejs.com/package/define) ;) I'll give it a try ...
score: 0
comment on: http://stackoverflow.com/q/25158786
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25135392
accepted answer: http://stackoverflow.com/a/25135444
possible better answer: http://stackoverflow.com/a/25135778
score: 0
has body: How to set class or style in script tag ? i try to do this buy not work i fill style='font-size: 50px; '
has title: How to set class or style in script tag?
has comment: http://stackoverflow.com/comment/39124117
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25135778
has comment: http://stackoverflow.com/comment/39124195
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25135444
tagged with: jquery

http://stackoverflow.com/q/25219341
has comment: http://stackoverflow.com/comment/39281081
answer count: 0
score: 0
tagged with: windows-phone-8.1
type: Question
tagged with: mobile-application
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39280831
has body: This link sets up the context for this question. I am trying to use Javascript as the backend code for my mobile application(windows) which has a native UI(not HTML UI). That means I don't have HTML. Hence I don't have DOM. I have successfully been able to create functions which does some computation locally like add, call them from my C# or Java code and get the return values. Now I am running into 2 problems 1) I am trying to take my javascript functions one step further by trying to call server apis from the Javascript using XMLHttpRequest. But I am getting a script execution exception in my C#(This usually occurs if the script was unable to run). I think this is because XMLHttpRequest needs DOM and I don't have DOM. If my first problem is solved then 2)How to get hold of a different Javascript file when I don't have DOM. For example let's say I want to use Jquery to simplify my requests using $.Ajax etc, but how do I load the Jquery library because I don't have the luxury of script tag neither do I have the luxury of using $.getScript because I am trying to get Jquery itself. One possible solution There is one solution that I can think on top of my head. Use a webview and load your html in the WebView and use Jint for Javascript. But then the question arises How do I use WebView in par with Jint. I would be glad if someone can point me in the right direction. Thanks in advance.
has title: How to use Javascript as a backend script to make server side api calls without using HTML in Jint
has comment: http://stackoverflow.com/comment/39280895
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39280768
has comment: http://stackoverflow.com/comment/39280797

http://stackoverflow.com/comment/39286204
type: QuestionComment
comment on: http://stackoverflow.com/q/25221742
has text: @matan7890: What do you mean? Eric *is* using jQuery's `ready` event. (`img` elements don't have a `ready` event, there's just one DOM-wide one that jQuery provides.)
score: 1
type: Comment

http://stackoverflow.com/comment/39194175
type: AnswerComment
score: 0
type: Comment
has text: If we knew we only wanted to deal with a single element we would use an `id` not a `class` on the element and use `getElementById` (as you originally did), thus eliminating the need for a `for()` loop when performing operations on its returned result (as we know it would only be 1 element returned)
comment on: http://stackoverflow.com/a/25172685

http://stackoverflow.com/comment/39190403
comment on: http://stackoverflow.com/q/25170756
type: Comment
type: QuestionComment
score: 1
has text: `location.href = link`.

http://stackoverflow.com/q/25082081
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39024796
has answer: http://stackoverflow.com/a/25082257
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39024983
has answer: http://stackoverflow.com/a/25082406
accepted answer: http://stackoverflow.com/a/25082406
has comment: http://stackoverflow.com/comment/39024725
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39024976
possible better answer: http://stackoverflow.com/a/25082257
upvote count: 2
has body: I've got a directive with this markup: &lt;button type="button" ng-class="{ 'btn-disabled': button.isDisabled }"&gt; As you can see, btn-disabled is added as a CSS class if the scope's button.isDisabled is truthy. Also on the scope is a property button.glyphicon. If glyphicon is truthy, I'd like to add the value of it to the &lt;button&gt;'s class as well. How can I do this?
answer count: 2
downvote count: 1
linked to: http://stackoverflow.com/q/18871277
has title: Dynamic ng-class value

http://stackoverflow.com/q/25080897
score: 0
has comment: http://stackoverflow.com/comment/39022790
answer count: 3
accepted answer: http://stackoverflow.com/a/25081305
has comment: http://stackoverflow.com/comment/39022476
has body: I'm creating a jQuery script that add a pin to a map on click event, the problem is that i need that event to work only on the map not his sons too.. This is my code: $("div#map").click(function (e) { $('&lt;div class="pin"&gt;&lt;/div&gt;').css({ left: a_variable, top: another_variable }).appendTo(this); $("div.pin").click(function (e) { e.stopPropagation(); }); }) Another problem is that under this code i have something like this: $("div.pin").mousedown(function (e) { if(e.which == 1) { console.log("down"); moving = true; $(this).addClass("moving"); } else if(e.which == 3) { console.log("right"); } }); Will this work with pins created after the script load too? JsFiddle: http://jsfiddle.net/vB2Gb/
has comment: http://stackoverflow.com/comment/39022538
has title: jQuery event.stopPropagation() and event issues
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25081324
has answer: http://stackoverflow.com/a/25081305
has comment: http://stackoverflow.com/comment/39023354
has comment: http://stackoverflow.com/comment/39023269
has comment: http://stackoverflow.com/comment/39023027
possible better answer: http://stackoverflow.com/a/25081301
has comment: http://stackoverflow.com/comment/39022684
linked to: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/25081301
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39023532
has comment: http://stackoverflow.com/comment/39022978

http://stackoverflow.com/q/25136416
tagged with: wordpress
has comment: http://stackoverflow.com/comment/39125915
has body: I have an error with my ajax request and it cannot be sent, I have others ajax request that works fine, but not this one. jQuery(".bestellen_button").click(function() { jQuery.ajax({ url: ajaxurl + "?" + (new Date()).getTime(), timeout: 30000, type: "GET", data: { 'action': 'login', 'url': document.URL, 'block': jQuery(this).attr('id') }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert("An error has occurred making the request: " + errorThrown) }, cache: false, success: function(data) { //window.location.replace(data); document.body.innerHTML = data } }); });
tagged with: javascript
type: UnansweredQuestion
has title: Ajax request cannot be sent?
answer count: 0
tagged with: jquery
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/39126013
score: 0

http://stackoverflow.com/a/25171234
accepted answer of: http://stackoverflow.com/q/25170939
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39191464
answers question: http://stackoverflow.com/q/25170939
has body: When dealing with primitives or using bindings generally try to prefer using a . in the model property that is being bound. So that when a child scope is created prototypical inheritance will carry down the properties (which are reference types) down to the children. (using $parent almost always is considered as a hack). In your case the property modelSelected is a primitive (even if it is present on the parent scope) and ng-repeat creates a child scope which does not finds this property (since inheritance does not carry it down even if it were present) and creates a new property on its scope, so the changes made to that are not seen to the outer scope. Initialize a property on the scope as an object, selection={} in your scope (in your example it would be the outerscope). And bind the model as ng-model="selection.modelSelected Ex:- Selected {{ selection.modelSelected }} shown outside paragraph {{ model.name }} - Selected {{ selection.modelSelected }} shown inside paragraph Demo Read: Understanding Scopes
has comment: http://stackoverflow.com/comment/39192009
type: Answer
score: 6
upvote count: 6
has comment: http://stackoverflow.com/comment/39191504

http://stackoverflow.com/comment/39155619
comment on: http://stackoverflow.com/a/25151932
score: 0
type: Comment
has text: Can you give me the right code? Sorry, I'm stupid in programming
type: AnswerComment

http://stackoverflow.com/q/25143751
type: AnsweredQuestion
tagged with: gojs
accepted answer: http://stackoverflow.com/a/25166546
has title: Increase distance between links that both go from nodeA to nodeB
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
linked to: http://stackoverflow.com/q/24676887
has body: My question is quite similar to this post gojs: howto increase distance between links or links labels?, which was about increasing distance between two links with opposite direction by setting "curviness"(one link from A to B and the other from B to A). But "curviness" doesn't work when two links have the same direction(both from A to B). Whatever value I set to curviness, the two links will totally overlap. So is there a way to increase the distance between links with the same direction ?
has answer: http://stackoverflow.com/a/25166546
upvote count: 1
type: Question

http://stackoverflow.com/comment/39020236
type: AnswerComment
score: 0
type: Comment
has text: I use google chrome. But that isn't the problem users can click on the link without getting the message so no alert for all three. I only want the alert when they type the hashtag url in the browser directly.
comment on: http://stackoverflow.com/a/25079615

http://stackoverflow.com/a/25184340
score: 0
has comment: http://stackoverflow.com/comment/39214701
answers question: http://stackoverflow.com/q/25184190
has body: There are many ways to do this. You could split and than loop over the even indexes and wrap and join back together. Or you could do all types of regular expression patterns to pull out the pattern var string = "Argentina,2,Australia,17,Azerbaijan,1,Bangladesh,1,Belgium,2" var updatedStr = string.replace(/(\D+),(\d+),/g,'"$1",$2,'); But if you want an array at the end, wrapping is the wrong approach. Split the array at the comma and than convert the string to a number in the odd indexes. var string = "Argentina,2,Australia,17,Azerbaijan,1,Bangladesh,1,Belgium,2"; var parts = string.split(","); for (var i=1; i&lt;parts.length; i+=2) { parts[i] = parseInt(parts[i],10); } And to do the rest of your job for you.... var string = "Argentina,2,Australia,17,Azerbaijan,1,Bangladesh,1,Belgium,2"; var parts = string.split(","); var out = []; for (var i=1; i&lt;parts.length; i+=2) { parts[i] = parseInt(parts[i],10); out.push([parts[i-1],parts[i]]); }
type: Answer
has comment: http://stackoverflow.com/comment/39214603

http://stackoverflow.com/comment/39033497
score: 0
type: Comment
type: QuestionComment
has text: It says there is no way...
comment on: http://stackoverflow.com/q/25081879

http://stackoverflow.com/q/25192572
type: Question
has answer: http://stackoverflow.com/a/25192762
tagged with: cell
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25192762
tagged with: class
score: 0
possible better answer: http://stackoverflow.com/a/25193284
has title: Adding/Removing cell classes with JavaScript
answer count: 2
has answer: http://stackoverflow.com/a/25193284
has comment: http://stackoverflow.com/comment/39230605
has comment: http://stackoverflow.com/comment/39230795
has comment: http://stackoverflow.com/comment/39230557
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39231122
has body: I posted a similar question a few hours ago, but I've made a couple breakthroughs(in my mind) and i feel as if I can explain better now. First off, it's important to say that all of my images, the ones that I'm trying to edit the classes of, are in cells. Like, the cells that are within rows that are within a HTML table. I have a class named .disableMenu, and it's supposed to simply hide the pictures. Here's that class - .disableMenu { visibility: hidden; } It's simple and it works like a charm. So basically, I want a button that when it is pressed, it removes that class from the element(in this case, it's a single cell in a table). Here's an example of a cell that I'm trying to get this to work on - Now, here's the JS button that I'm trying to get to trigger this change of class - GO I'm really sorry for half-double posting this and my general lack of knowledge, but I'm trying to learn(and having fun doing so). Here's the full code, if anyone wants to have a look - Complete the puzzle! Thanks for looking, any help would be greatly appreciated.

http://stackoverflow.com/comment/39052372
has text: You are using inline css and inline css cann't be overridden,secondly you have problems in your markup you are using inside div its not possible like this you would have to use it inside .Kindly fix your issues.write css in seperate style sheet and then include it as a class or as a id selector rather than using inline styles.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25096728

http://stackoverflow.com/comment/39276509
comment on: http://stackoverflow.com/a/25216616
type: Comment
score: 0
type: AnswerComment
has text: can you please answer of this Question ?

http://stackoverflow.com/comment/39141081
comment on: http://stackoverflow.com/q/25144428
has text: Also, what have you tried, bud? :)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25149093
answers question: http://stackoverflow.com/q/25140113
type: Answer
score: 2
has body: If you take a closer look at compiled dust template, there is a line of code: ... dust.register("basicName.tl", ... This line of code adds compiled template under key "basicName.tl" into dust.cache. Under the hood dust.render will try to find given template name in dust.cache Code below won't work since dust won't find "basicName" template in dust.cache: dust.render("basicName", json_payload, function(err, out) { ... Calling it like so should work: dust.render("basicName.tl", json_payload, function(err, out) { ...
upvote count: 2
downvote count: 0

http://stackoverflow.com/comment/39087192
comment on: http://stackoverflow.com/a/25115284
score: 1
type: AnswerComment
has text: Okay, now that the screenshot in the question has been updated I'm 100% sure.
type: Comment

http://stackoverflow.com/comment/39223442
comment on: http://stackoverflow.com/q/25188811
has text: [This is a good explanation of what's going on.](http://stackoverflow.com/questions/11661078/javascript-oop-instanceof-and-base-class/11669057#11669057)
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/25085680
score: 1
has body: You need to use a self variable so you can refer to the BaseModel's instance variables: function BaseModel($http, $q) { var self = this; self.response = null; /* ... rest of code ... */ q.promise.then(function (response) { console.log(response, ' got response'); self.response = response; }); /* ... rest of code ... */ } The issue isn't angularjs related ,it's related to how objects work in JavaScript and how you have to create a separate self reference because this refers to the inner-most function.
upvote count: 1
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25085618
accepted answer of: http://stackoverflow.com/q/25085618
downvote count: 0

http://stackoverflow.com/q/25079329
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: -1
type: Question
has comment: http://stackoverflow.com/comment/39019450
has comment: http://stackoverflow.com/comment/39019512
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39020796
has answer: http://stackoverflow.com/a/25079396
tagged with: popup
has comment: http://stackoverflow.com/comment/39019328
has body: I am creating a small photo viewing script, but I have a problem which is IE. The jquery works proeprly in every other browser, but not in IE. Here is the following script: $(function() { $( '.open-img' ).on('click', function() { var src = $( this ).attr( 'src' ); $( '.inner-pop-up' ).html( ' ' ); $( '.cs-outer-pop-up' ).fadeIn(800); $( '#cs-main-header-top').fadeOut(500); $( '.op-img' ).on('click', function() { $( '.cs-outer-pop-up' ).fadeOut(800); $( '#cs-main-header-top').fadeIn(800); }); $(document).keyup(function(e) { if (e.keyCode == 27) { $( '.cs-outer-pop-up' ).fadeOut(800); } }); }); }); Here is html: (where the img goes) here is html: (where the img is to click to) I don't know why it doesn't work, so please help me to solve the problem :) Thank you :)
has title: Why doesn't on('click', function() {}); work properly on IE?
has comment: http://stackoverflow.com/comment/39019387
upvote count: 0
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/25203362
has comment: http://stackoverflow.com/comment/39251759
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39251084
has comment: http://stackoverflow.com/comment/39251308
has body: The following answer is to the general question of negating a regular expression. In your specific case you just need to negate a character group, or more precisely remove the negation of a character group - which is detailed in other answers. Regular languages – those consisting of all strings entirely by matched some RE – are in fact closed under negation: there is another RE which matches exactly those strings the original RE does not. It is however not trivial to construct, which perhaps explains why RE implementations often do not offer a negation operator. However the Javascript regexp language has extensions that make it more expressive than regular languages; in particular there is the construct of negative lookahead. If R1 is a regexp then ^(?!.*(R1)) matches precisely the strings that does not contain a match for R1. And ^(?!R1$) matches precisely the strings where the whole string is not a match for R1. Ie. negation. For rewriting any substring not matching a given regexp, the above is insufficient. One would have to do something like ((?!R1).)* Which would catch any substring not containing a subsubstring that matches R1. - But consideration of the edge cases show that this does not quite do what we are after. For example ((?!ab).)* matches "b" in "ab", because "ab" is not a substring of "b". One can cheat, and make your regexp like; (.*)(R1|$) And rewrite to T1$2 Where T1 is the target string you want to rewrite to. This should rewrite any portion of the string not matching R1 to T1. However I would be very careful about any edge cases for this. So much so that it might be better to write the regexp from scratch rather than trying a general approach.
answers question: http://stackoverflow.com/q/25203108
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/51806798
has comment: http://stackoverflow.com/comment/51832083
has comment: http://stackoverflow.com/comment/51831692

http://stackoverflow.com/q/25119037
tagged with: angularjs-animation
answer count: 2
downvote count: 0
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
tagged with: animation
has answer: http://stackoverflow.com/a/25120745
has body: Staggering Animations are great! But I don't get it to work without user interaction. There is a total normal ng-repeat list: &lt;div ng-controller="controller"&gt; &lt;div class="category" ng-repeat="category in categories"&gt; {{category}} &lt;/div&gt; &lt;/div&gt; Defined in a controller: var controller = function($scope) { $scope.categories = ['12345', '6789', '9876', '54321']; }; And a few CSS Rules for animation: .category.ng-enter { -webkit-transition: 2s linear all; transition: 2s linear all; opacity:0; } .category.ng-enter-stagger { -webkit-transition-delay: 1s; transition-delay: 1s; } .category.ng-enter.ng-enter-active { /* standard transition styles */ opacity:1; } But on page load its displayed without animation. I inserted a button for replacing the categories array with random numbers and it fades in just fine. What do I have to do to get the animation to work, when the user visits the page the first time? Demo is here: http://plnkr.co/edit/3zXENPbYA3cxJQ3Pyb34?p=preview I found some answers that hacking around with $timeout() but I get an animation only on the first item. And it don't feel well.
type: AnsweredQuestion
score: 2
accepted answer: http://stackoverflow.com/a/25120663
upvote count: 2
type: Question
linked to: http://stackoverflow.com/q/31193836
has title: AngularJS 1.2 ng-repeat animation on page load
has answer: http://stackoverflow.com/a/25120663
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25120745

http://stackoverflow.com/comment/39294979
comment on: http://stackoverflow.com/a/25227085
has text: tried and the problem isnt that , its start when im adding the jqurey links .
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39214153
has text: welcome to stackoverflow! what effort have you made?
comment on: http://stackoverflow.com/q/25184190
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39243201
type: Comment
comment on: http://stackoverflow.com/q/25199439
score: 0
has text: Is there a `"` in one of the PHP variables? There could also be an error in the code above this snippet.
type: QuestionComment

http://stackoverflow.com/comment/95172511
score: 0
has text: @MatthijsKooijman Depends on interpretation of html specs. If you say a filename of length 0 is a valid resource-name ... it does match all browsers.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/49299675

http://stackoverflow.com/q/25167940
type: AnsweredQuestion
downvote count: 2
accepted answer: http://stackoverflow.com/a/25168601
type: Question
has body: Here is the function: function LoadBanner(img) { var d = new Date(); var Today = d.getDate(); var Month = d.getMonth(); Month++; //Months are 0 based var src; if (Month === 8 &amp;&amp; (Today &gt;= 1 &amp;&amp; Today &lt;= 17)) { src = "banner1.jpg"; } else if (Month === 8 &amp;&amp; (Today &gt;= 18 &amp;&amp; Today &lt;= 31)) { src = "banner3.jpg"; } else if (Month === 9 &amp;&amp; (Today &gt;= 1 &amp;&amp; Today &lt;= 7)) { src = "banner2.jpg"; } else if (Month === 9 &amp;&amp; (Today &gt;= 8 &amp;&amp; Today &lt;= 14)) { src = "banner5.jpg"; } else if (Month == 9 &amp;&amp; (Today &gt;= 15 &amp;&amp; Today &lt;= 21)) { src = "banner4.jpg"; } else if (Month == 9 &amp;&amp; (Today &gt;= 22 &amp;&amp; Today &lt;= 28)) { src = "banner6.jpg"; } else if (Month == 9 &amp;&amp; (Today &gt;= 29 &amp;&amp; Today &lt;= 30)) { src = "banner7.jpg"; } else { document.getElementById("bannerdiv").style.display = "none"; } img.src = src; } Here is the HTML: &lt;div class="banner" id="bannerdiv"&gt; &lt;!--&lt;img id="Logo" src="banner2.jpg" alt="KnowledgeBase" width="100%" height="100%" onload="LoadBanner(this)" /&gt;--&gt; &lt;img id="Logo" src="banner1.jpg" alt="KnowledgeBase" width="100%" height="100%"" /&gt; &lt;/div&gt; Note: When I call the function in the onLoad the error is thrown in IE 8, but works fine in the current version of IE and Chrome. I read something about recursively calling a function more than 12 times may cause the error... or requesting too much memory for IE but I don't think I am doing either here.
tagged with: internet-explorer
tagged with: internet-explorer-8
upvote count: 0
score: -2
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25168601
favorite count: 0
has comment: http://stackoverflow.com/comment/39184999
has title: I'm getting a 'Stack overflow at line 0' error in IE 8 when I am using a simple Javascript function. How can I fix this error?

http://stackoverflow.com/a/25149893
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25149825
has body: When you replace an HTML element via JavaScript, you remove its DOM node, and thereby all information associated with it. There are (at least) two ways to deal with this: before replacing, save the data you need into a temporary variable and inject it after replacing (will most likely not work for event handlers). use an outer element which carries the data and handlers.

http://stackoverflow.com/a/25191155
upvote count: 1
type: AcceptedAnswer
has body: You should just drop the support to IE8. But, if you really want to use IE8, are you sure you can't use POST for that? According to this, the limit is on the URL length, but shouldn't affect the POST length (that's what I made of what's written there, perhaps I'm wrong; but I don't have any IE8 installed, so I can't test that).
has comment: http://stackoverflow.com/comment/39228289
has comment: http://stackoverflow.com/comment/39227955
has comment: http://stackoverflow.com/comment/39228122
has comment: http://stackoverflow.com/comment/39227892
type: Answer
has comment: http://stackoverflow.com/comment/39228081
has comment: http://stackoverflow.com/comment/39227991
has comment: http://stackoverflow.com/comment/39227926
downvote count: 0
has comment: http://stackoverflow.com/comment/39228196
score: 1
has comment: http://stackoverflow.com/comment/39228147
accepted answer of: http://stackoverflow.com/q/25191068
answers question: http://stackoverflow.com/q/25191068

http://stackoverflow.com/a/25101623
has body: Both setTimeout() and $.ajax() kick off an asynchronous process and then immediately continue on to the next line. So your for loop will complete before any of the timeouts run, and before any of the ajax success callbacks run, and all of the timeouts are scheduled to run 2000 milliseconds after the loop finishes, i.e., more or less at the same time. If you want each one to happen two seconds after the previous then either wait for the previous ajax request to finish before starting the next, or increase the timeout delay for each subsequent timeout by multiplying the delay by the loop counter: for(var k=0;k&lt;MAX;k++) { (function (_k) { setTimeout( function() { $.ajax({ //do something success: function(data, textStatus, jqXHR) { //using wrap &lt;span&gt; tag to highlight words according to ajax return data } }); } , 2000 * k); // &lt;--- this line is the only change }) (k); } That way the first timeout is 0ms away, the second is 2000ms away, the third is 4000ms, etc. Demo: http://jsfiddle.net/gsRL7/
has comment: http://stackoverflow.com/comment/39061783
type: Answer
answers question: http://stackoverflow.com/q/25101441
accepted answer of: http://stackoverflow.com/q/25101441
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25201355
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
has body: I have tried many ways to create a square box which will show content when clicked on hyperlink. Please help me with the code in html/JavaScript.
has title: Open a square box to show content when clicked on hyperlink using html/java script
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39246852
has comment: http://stackoverflow.com/comment/39246463
has comment: http://stackoverflow.com/comment/39246715
type: Question
has comment: http://stackoverflow.com/comment/39246864
has answer: http://stackoverflow.com/a/25201525
score: -2
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/25216032
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39274725
has comment: http://stackoverflow.com/comment/39274635
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25216094
has answer: http://stackoverflow.com/a/25216269
has body: I have two html files. One file has a table which is constantly updated by the script written in the same. The table part is in body of the html and its contents are updated once the document.ready is executed. I want to run the document.ready of file from the another file and show the table(which is constantly updating and present in another file) in that file. FILE -1 FILE- 2(index.html page) ......
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39274782
has title: Calling document.ready function of file from another

http://stackoverflow.com/comment/39024302
type: QuestionComment
score: 0
has text: store image path in option as custom attribute like rel="imagepath". Then on change you can retrieve image path like: $("option:selected",this).attr("rel");
comment on: http://stackoverflow.com/q/25081776
type: Comment

http://stackoverflow.com/a/25227293
has body: Replace member = response.mem + x; with member = response['mem' + x]; Your final code should look like, $.post("retrieveDetails.php", { teamID: teamID, // data to pass into php }, // data to pass into php function(response) { console.log(response.mem1 + " " + response.mem2 + " " + response.mem3 + " " + response.mem4); var x = 1, member = null;//note that, i declared member while (x &lt;= 4) { member = response['mem' + x]; if (member != "") { // if member column is not empty $("#listview").append('&lt;li&gt; &lt;img src="images/displaypic.jpg"&gt; &lt;h2&gt;' + member + '&lt;/h2&gt; &lt;/li&gt;').listview("refresh"); console.log("current addee is " + member); } x++; } }, 'json' ); });
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25227284
answers question: http://stackoverflow.com/q/25227284
type: AcceptedAnswer
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/25135444
has body: You can put double quotes or escape the single ones: $(function() { $('.J_countdown2').countdown({ tmpl : '%{d}days' }); }); or escape the inner single quotes with \: tmpl : '%{d}days' even you can try this too: $('.J_countdown2').countdown({ tmpl : $('', { class: "font50", // <----set class name style : "font-size:50px", // <---style if you want against class text : '%{d}days' //<-----put the text like this }) }); where font50 is the class name: .font50{ font-size: 50px; }
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25135392
score: 1
answers question: http://stackoverflow.com/q/25135392
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/25124406
type: Answer
has body: Moment.js defines itself as an AMD module and RequireJS won't call init. From the documentation of RequireJS: The init function will not be called for AMD modules. For example, you cannot use a shim init function to call jQuery's noConflict. See Mapping Modules to use noConflict for an alternate approach to jQuery. From the master source of Moment.js: https://github.com/moment/moment/blob/develop/moment.js#L2796
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39104217
accepted answer of: http://stackoverflow.com/q/25124367
answers question: http://stackoverflow.com/q/25124367
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39104439
has comment: http://stackoverflow.com/comment/39104762

http://stackoverflow.com/comment/39071617
has text: elm.textContent.indexOf(str) SHOULD be the same as strHTML.indexOf(str)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25107086
score: 0

http://stackoverflow.com/a/25227272
downvote count: 0
has comment: http://stackoverflow.com/comment/39295607
has body: You cannot define a Polymer component by simply calling the Polymer() function with the id of some arbitrary element. Either you need to create a Polymer element that contains the button and the handler code like so: or you need to wrap the button in an auto-binding template: With the first version, you can create a reusable link-button element if you convert the hard-coded link (and maybe some other values) into attributes. And btw. you can use 'on-tap' or 'on-click'. Both events are fired when you click the button with the mouse. Edit: If all you want is the fancy paper button, you could go without any Polymer specific programming by simply adding an event listener to the element: But i think you miss a lot of the power of Polymer (and web components in general) if you only focus on the component-consumer-side of it.
has comment: http://stackoverflow.com/comment/39295286
accepted answer of: http://stackoverflow.com/q/25226917
type: Answer
upvote count: 16
score: 16
answers question: http://stackoverflow.com/q/25226917
has comment: http://stackoverflow.com/comment/63131713
type: AcceptedAnswer

http://stackoverflow.com/comment/39233289
score: 1
has text: So what you mean is JSON.stringify(localStorage); ?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25192080

http://stackoverflow.com/comment/39309638
has text: ok, so I just did that and it says in the network tab that my jquery file has an error of 404 not found. But thats weird because I have the src pointing to my jquery file in includes/script
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25225242
type: Comment

http://stackoverflow.com/q/25205619
has title: jquery validate for my login page is not working
accepted answer: http://stackoverflow.com/a/25206019
has comment: http://stackoverflow.com/comment/39255014
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39254956
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39254820
has comment: http://stackoverflow.com/comment/39255502
type: Question
has answer: http://stackoverflow.com/a/25206019
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/39254864
has body: I am very new to jquery &amp; javascript working on login page where Iam using simple jquery validation code. To check whether my username as john and the password pass if it was correct it has to redirect to other page. Else I need to show an error message. &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#form1").validate({ debug: false, rules: { name: "required", password: { required: true, minlength: 8 } }, messages: { name: "Please enter your name.", password: "Please enter 8 letters minimum.", } }); }); &lt;/script&gt; The above code was checking the first rule where if it is empty or not but this itself not working. I am not getting any error label message. Here is the fiddle Link Thanks in advance Regards M
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39254844

http://stackoverflow.com/q/25170842
has answer: http://stackoverflow.com/a/56630245
score: 1
has answer: http://stackoverflow.com/a/28740220
accepted answer: http://stackoverflow.com/a/25171208
type: Question
has title: Parse xml with namespaces using JQuery and working for all browser ..
tagged with: javascript
has answer: http://stackoverflow.com/a/25171208
tagged with: jquery
answer count: 3
tagged with: xml-parsing
upvote count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/xml
possible better answer: http://stackoverflow.com/a/28740220
has body: I'm trying to parse an XML response from a service using JQuery 1.11 At the moment my code works but only in Chrome, not for IE or Firefox and I need it works for all "modern" browsers. Here you are a sample of my XML &lt;?xml version='1.0' encoding="ISO-8859-1" ?&gt; &lt;wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Numeri_Civici_2012.map&amp;amp;SERVICE=WFS&amp;amp;VERSION=1.0.0&amp;amp;REQUEST=DescribeFeatureType&amp;amp;TYPENAME=IN.NUMERICIVICI.2012&amp;amp;OUTPUTFORMAT=XMLSCHEMA"&gt; &lt;gml:boundedBy&gt; &lt;gml:Box srsName="EPSG:4326"&gt; &lt;gml:coordinates&gt;7.700007,44.802147 7.749396,44.849996&lt;/gml:coordinates&gt; &lt;/gml:Box&gt; &lt;/gml:boundedBy&gt; &lt;gml:featureMember&gt; &lt;ms:IN.NUMERICIVICI.2012 fid="IN.NUMERICIVICI.2012.2728384"&gt; &lt;gml:boundedBy&gt; &lt;gml:Box srsName="EPSG:4326"&gt; &lt;gml:coordinates&gt;7.735138,44.810267 7.735138,44.810267&lt;/gml:coordinates&gt; &lt;/gml:Box&gt; &lt;/gml:boundedBy&gt; &lt;ms:boundary&gt; &lt;gml:Point srsName="EPSG:4326"&gt; &lt;gml:coordinates&gt;7.735138,44.810267&lt;/gml:coordinates&gt; &lt;/gml:Point&gt; &lt;/ms:boundary&gt; &lt;ms:id&gt;13800026457291&lt;/ms:id&gt; &lt;ms:nome&gt;Borgata Tetti Sotto&lt;/ms:nome&gt; &lt;ms:civico&gt;16&lt;/ms:civico&gt; &lt;ms:istat&gt;01004041&lt;/ms:istat&gt; &lt;ms:cap&gt;12030&lt;/ms:cap&gt; &lt;ms:comune&gt;CARAMAGNA PIEMONTE&lt;/ms:comune&gt; &lt;ms:nome_ted&gt; &lt;/ms:nome_ted&gt; &lt;ms:provincia&gt;CUNEO&lt;/ms:provincia&gt; &lt;ms:regione&gt;PIEMONTE&lt;/ms:regione&gt; &lt;/ms:IN.NUMERICIVICI.2012&gt; &lt;/gml:featureMember&gt; &lt;gml:featureMember&gt; &lt;ms:IN.NUMERIC…
type: AnsweredQuestion
downvote count: 0

scroll
tags question: http://stackoverflow.com/q/25139521
tags question: http://stackoverflow.com/q/25126302
tags question: http://stackoverflow.com/q/25216594
tags question: http://stackoverflow.com/q/25227868
tags question: http://stackoverflow.com/q/25095111
tags question: http://stackoverflow.com/q/25163163
tags question: http://stackoverflow.com/q/25205661
tags question: http://stackoverflow.com/q/25212146
tags question: http://stackoverflow.com/q/25082712
tags question: http://stackoverflow.com/q/25197231
tags question: http://stackoverflow.com/q/25160764
tags question: http://stackoverflow.com/q/25095665
tags question: http://stackoverflow.com/q/25228158
tags question: http://stackoverflow.com/q/25188240
tags question: http://stackoverflow.com/q/25207019
type: Tag
tags question: http://stackoverflow.com/q/25210796
tags question: http://stackoverflow.com/q/25210341
tags question: http://stackoverflow.com/q/25126191
tags question: http://stackoverflow.com/q/25138465
tags question: http://stackoverflow.com/q/25223350
tags question: http://stackoverflow.com/q/25163216
tags question: http://stackoverflow.com/q/25137835
tags question: http://stackoverflow.com/q/25137783
tag name: scroll
tags question: http://stackoverflow.com/q/25097304
tags question: http://stackoverflow.com/q/25204282
tags question: http://stackoverflow.com/q/25229358
tags question: http://stackoverflow.com/q/25218778
tags question: http://stackoverflow.com/q/25187000

http://stackoverflow.com/comment/39274314
type: QuestionComment
has text: 900913 and 3857 are the same thing. What projection is your base map in?
comment on: http://stackoverflow.com/q/25208262
score: 0
type: Comment

http://stackoverflow.com/q/25098210
tagged with: jquery
favorite count: 0
has body: I have a Index.html file, where I am using container class. I have another html file with which contains mustache variables. Here is the code which I am using, Lets say this is a.html. Can some one please guide me. Why I am not getting the data in the main template.
has title: Read Json and update template from mustache
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: mustache
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/25098431
has answer: http://stackoverflow.com/a/25098414
has comment: http://stackoverflow.com/comment/39055166
has comment: http://stackoverflow.com/comment/39055181
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39055202
score: 2
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25136650
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: maskedinput
type: Question
score: 3
tagged with: datepicker
accepted answer: http://stackoverflow.com/a/25137181
upvote count: 3
has comment: http://stackoverflow.com/comment/39127333
answer count: 1
has title: jquery datepicker and jquery mask not working
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/25137181
has comment: http://stackoverflow.com/comment/39127372
type: AnsweredQuestion
has body: I have this piece of code that uses jquery datepicker and jquery masked input. jQuery(function($) { $(document).on('click', '#date', function () { var me = $("#date"); me.datepicker({ showOn: 'focus', altFormat: "mm/dd/yy", dateFormat: "mm/dd/yy", minDate: '12/12/2000', maxDate: '12/12/2020' }).focus(); me.mask('99/99/9999'); }).on('select', '#date', function () { var me = $("#date"); me.mask('99/99/9999'); }); }); JSFiddle The code uses jquery on because the input element in the application is dynamically added into the page. And the masked input is also registered from select event because user can come to the input by pressing tab from previous input. It doesn't work on Firefox 31, but it works fine on Chrome 36 and IE 11. When the input field is empty, user should be able to type anything (based on masked filter) in the input element. Kindly suggest me what's wrong with the code.

http://stackoverflow.com/q/25075172
has comment: http://stackoverflow.com/comment/39012087
has comment: http://stackoverflow.com/comment/39128119
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I have a need to separate my jQuery code from my html page but am having a problem when it comes to the resize event. I have an index.html and a main.js where I want to keep all the jQuery code. The event doesn't seem to trigger from the external js: $(window).on('resize', function() { The resize event does work as intended when used inline on the html page, but not when in the external js file. It is worth noting that both "Load" and "Click" events work perfectly from the external js file, but not the resize?
type: Question
has comment: http://stackoverflow.com/comment/39012425
answer count: 1
has comment: http://stackoverflow.com/comment/39012215
score: 0
has answer: http://stackoverflow.com/a/25137679
has title: jQuery .resize event listener in separate file
has comment: http://stackoverflow.com/comment/39011624
accepted answer: http://stackoverflow.com/a/25137679
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39012559

http://stackoverflow.com/a/25181182
upvote count: 1
type: AcceptedAnswer
has body: $("#box_area").addClass('expanded'); just add this piece of code to the keyup function $("#box_area").keyup(function() { if ($("#box_area").height() &gt; 300) { if ($("#box_area").hasClass("expand")) { $("#box_area").trigger('autosize.destroy'); $("#box_area").attr('class', 'detract'); $("#box_area").addClass('expanded'); } } else { $("#box_area").autogrow(); $("#box_area").attr('class', 'expand'); } }); &lt;style&gt; .expanded{height:300px; overflow-x:auto} &lt;/style&gt;
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39208532
has comment: http://stackoverflow.com/comment/39208917
answers question: http://stackoverflow.com/q/25180412
accepted answer of: http://stackoverflow.com/q/25180412
has comment: http://stackoverflow.com/comment/39208666

http://stackoverflow.com/comment/39065853
type: AnswerComment
has text: @1linecode Have a look at this learn.jquery.com/events/event-delegation/
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25104171

http://stackoverflow.com/comment/39185777
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25166750
has text: The `rendered` property is easy to understand. If the condition is true, the component is rendered. Build your menu with all the possibility in your jsff and then condition all nodes with `rendered` property. When the page is loaded, the server will render only the components where rendered is true. You don't add components, you just render them or not.

http://stackoverflow.com/a/25203315
downvote count: 0
answers question: http://stackoverflow.com/q/25203049
type: Answer
score: 1
has body: It's ofcourse true you could avoid javascript for such a simple task but if you really need to, you can make it more dynamic and with a smoother scroll. Your data-target can refer to target's id (better) or to target's text if that's what you really want... Scroll to if it is an id you are targeting, the target html would be like that some title but it could as well be the text you are targeting test</test> How to target, using jQuery: Target ID $('.inpagelink').on('click', function(e){ e.preventDefault(); //get the targets position var $whereto = $('#'+ $(this).attr('data-target')); var gotopx = parseInt($whereto.offset().top); //and scroll there, in 1 sec $('html, body').animate({ scrollTop: gotopx }, 1000); }); Target text $('.inpagelink').on('click', function(e){ e.preventDefault(); //get the targets position var $whereto = $('h1:contains(' + $(this).attr('data-target') + ')'); var gotopx = parseInt($whereto.offset().top); //and scroll there, in 1 sec $('html, body').animate({ scrollTop: gotopx }, 1000); }); :contains is case sensitive so have that in mind.
upvote count: 1

http://stackoverflow.com/comment/39308025
type: QuestionComment
has text: better than a code update (useful) would be a fiddle and an explanation of what it fails to do and what needs to be changed!
score: 0
comment on: http://stackoverflow.com/q/25189278
type: Comment

http://stackoverflow.com/comment/39020324
type: AnswerComment
has text: I understand what you're doing, but I'm looking to switch the directive (in this case ng-class) dynamically.
type: Comment
comment on: http://stackoverflow.com/a/25079807
score: 0

http://stackoverflow.com/a/25121547
score: 2
upvote count: 2
has body: You could redirect users to a different page if the time criteria isn't met with the Apache Rewrite mod. The below will issue a 403 if the time is later than 1300 and before 0700. RewriteEngine On RewriteCond %{TIME_HOUR} &gt;= 13 [OR] RewriteCond %{TIME_HOUR} &lt; 07 RewriteRule ^/site.html - [F]
has comment: http://stackoverflow.com/comment/39098865
accepted answer of: http://stackoverflow.com/q/25121464
has comment: http://stackoverflow.com/comment/39099922
answers question: http://stackoverflow.com/q/25121464
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/78262245
score: 0
type: AnswerComment
has text: I don't have IE9 or IE10 to test now, but I left a reference from MDN stating that it does have onwheel. Here is another less authoritative resource: https://www.w3schools.com/jsref/event_onwheel.asp Can you please provide evidence it doesn't work?
comment on: http://stackoverflow.com/a/32215631
type: Comment

http://stackoverflow.com/q/25119253
tagged with: javascript
tagged with: jquery
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/39102047
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25121182
has comment: http://stackoverflow.com/comment/39097506
has comment: http://stackoverflow.com/comment/39105514
has answer: http://stackoverflow.com/a/25121182
favorite count: 0
has title: Using Javascript or jQuery to clean WYSIWYG editor's HTML output
has body: The CMS I'm using has a really annoying WYSIWYG editor called Summernote. This editor is nice looking and actually works quite well, but the HTML it outputs is shockingly bad and doesn't have any configuration options for styling output. For example, this is some bold, italic text with an underline: Help!! I'm being squashed by 3 heavy tags. Images have inline CSS styles, giving the images fixed widths, which is uber-useless for responsive sites: And YouTube iFrame's have fixed sizes which fly off mobile phone screens: So, as you can see, it's not great, but I don't have the option of changing the editor (not allowed to) and I need to come up with a way of rectifying these issues before the HTML is saved in the database. In my case, using jQuery. So, after a little trial and error, I've managed to fix the responsive issues with this little snippet: var code = $('#summernote').code(); var newCode = $(' ').append(code) .find('iframe').wrap(' ') .end() .find('img').removeAttr('style').wrap(' ') .end() .html(); Working JSFIDDLE demo. As you can see, this wraps all iFrame's in a responsive wrapper, wraps all images in another wrapper (for non-responsive purposes) and removes all inline styles from the images making them more fluid. This works great, but I'm really struggling on the last part; replacing all of those span tags with proper elements and I unfortunately need to ask for some help. I understand that using something like this could select the SPAN elements for BOLD and using wrapInner() and unwrap() I could replace the spans with proper textual elements: $('span').filter(function() { return $(this).css('font-weight') == 'bold'; }).wrapInner('').unwrap() BUT 1) I cannot even get the wrapInner() to work on it's own (check this fiddle). 2) If this is actually possible, both physically and efficiently, please advice how and also advise on how to chain them all together. 3) Sometimes the spans orders are different, dependant on the order of buttons clicked. This is m…
downvote count: 2
has answer: http://stackoverflow.com/a/25119946
has comment: http://stackoverflow.com/comment/39105978
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39105001
has comment: http://stackoverflow.com/comment/39102842
linked to: http://stackoverflow.com/q/2200590
type: Question
accepted answer: http://stackoverflow.com/a/25119946

http://stackoverflow.com/comment/40604333
score: 0
type: AnswerComment
has text: Please include the information from the comment into the answer to make it more informative. This would also help other viewers with similar issues. Thanks again.
type: Comment
comment on: http://stackoverflow.com/a/25934980

http://stackoverflow.com/a/29868430
type: Answer
has body: to make things easy my approch is: animation_arr = ['idle', 'walk', 'jump', 'idle_towel', 'walk_towel', 'jump_towel' ]; for(var i=0; i &lt; animation_arr.length; i++){ player.animations.add(animation_arr[i], [0+(i*10), 1+(i*10), 2+(i*10), 3+(i*10), 4+(i*10), 5+(i*10), 6+(i*10), 7+(i*10), 8+(i*10), 9+(i*10)], 10, true); }
score: 0
answers question: http://stackoverflow.com/q/25108221

http://stackoverflow.com/comment/39268534
score: 0
type: Comment
type: QuestionComment
has text: you are trying to use a sync workflow by using an async function. you need to bring the action to the data, not the data to the action. you do that with the first one by moving console (an action) to the data (filesaved).
comment on: http://stackoverflow.com/q/25212726

http://stackoverflow.com/comment/39214098
score: 0
type: QuestionComment
has text: If you want light weight write your own that pulls out the month and year. Seems like a very simple thing to do.
type: Comment
comment on: http://stackoverflow.com/q/25184023

http://stackoverflow.com/q/25210181
has comment: http://stackoverflow.com/comment/39263638
has answer: http://stackoverflow.com/a/25210771
tagged with: sharepoint
has comment: http://stackoverflow.com/comment/39263729
accepted answer: http://stackoverflow.com/a/25210771
upvote count: 0
answer count: 1
tagged with: javascript
has body: I want to get access to download files from SharePoint 2007 (different Libraries) using javascript or java. So i want to code application which will allow to download files from SharePoint 2007. I have a full access to SharePoint. Can i do it? If i can, reference me please to some libraries or tools to do it. I have not experience with SharePoint at all. Actually i want to code application which can give access to all information which contains in SharePoint: files, lists and etc. Update: I did not ask you to find library or something. I ask you: "Can i do it?". Is there technically possibility. Because i did not find some thing useful after googling and have no experience with SharePoint.
favorite count: 0
has comment: http://stackoverflow.com/comment/39264049
has title: Access to files in Sharepoint 2007 using javascript from external site
has comment: http://stackoverflow.com/comment/39263860
type: AnsweredQuestion
tagged with: sharepoint-2007
downvote count: 2
tagged with: file
has comment: http://stackoverflow.com/comment/39264381
type: Question
score: -2
tagged with: java

http://stackoverflow.com/comment/39129605
has text: @mobbarley No, the immediate invocation of the function screwed it. You simply called the function before `onload`.
comment on: http://stackoverflow.com/a/25138174
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/39222581
score: 2
has text: Be consistent on where you add spaces. You add to the beginning with `board = " " + board` and to the end with `board += "#'`.
comment on: http://stackoverflow.com/q/25188319
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25096243
has body: I hope I understand your problem correctly. You want to add a button via javascript and then add an icon to that button. This example adds a button to the DOM and when you click the button; it appends the icon to itself. JSFiddle: http://jsfiddle.net/e9f2M/1/ function createRemoveIcon(){ var button = document.createElement("button"); button.setAttribute('class', 'btn btn-default'); button.innerHTML = 'click me'; button.onclick = function(){ var icon = document.createElement("span"); icon.className ="glyphicon glyphicon-remove-circle"; this.appendChild(icon); } document.getElementById("container").appendChild(button); }
answers question: http://stackoverflow.com/q/25095401
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25095401
type: Answer

http://stackoverflow.com/q/25225550
tagged with: progress-bar
score: 0
has title: Progress bar on http request
answer count: 1
has answer: http://stackoverflow.com/a/25249727
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20572734
has comment: http://stackoverflow.com/comment/39292040
type: Question
has body: I am looking to display a progress bar for the first part of the an ordinary non-ajax browser request, when the browser is waiting for a response from the server. On my drupal sites, I have found this waiting time can be several seconds depending on the conditions. I have been messing with pace.js (http://github.hubspot.com/pace/docs/welcome/) and it loads and behaves nicely once the response is received and the content is loading. Is this a viable thing to do? Or will it be a dead end because ultimately the browser knows not what it is waiting for...
tagged with: javascript

http://stackoverflow.com/comment/39021793
score: 0
comment on: http://stackoverflow.com/q/25080395
type: QuestionComment
type: Comment
has text: @A1rPun I am using bootstrap2.

http://stackoverflow.com/comment/39030213
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25084732
has text: May be something wrong with your path ? Try changing this `/admin/index.php` to `admin/index.php`. Or even better, post the directories tree
score: 0

http://stackoverflow.com/comment/39063615
type: Comment
comment on: http://stackoverflow.com/a/25102928
score: 0
type: AnswerComment
has text: Thanks for your answer, I forgot to do that.

http://stackoverflow.com/a/25135077
has comment: http://stackoverflow.com/comment/39164303
downvote count: 0
has comment: http://stackoverflow.com/comment/39165616
type: Answer
has comment: http://stackoverflow.com/comment/39194099
has comment: http://stackoverflow.com/comment/39162694
upvote count: 3
answers question: http://stackoverflow.com/q/25134693
has comment: http://stackoverflow.com/comment/39125582
has body: I am assuming that you are getting models in the collection in response to your request as JSON. Method 1: You can simply set the collection to the JSON. and bind the collection to change event. In case of any change in the collection, callback function will be triggered. In the callback function you can render your view. Note: change event on collection will be triggered only if there is any change in the models it contain. e.g. someCollection.on('change', function(){ someView.render() }); Method 2: You can use Backbone's listenTo method, to render the view on change of collection. someView.listenTo(someCollection, 'change', someView.render); Hope it helps...
score: 3
has comment: http://stackoverflow.com/comment/39126123
has comment: http://stackoverflow.com/comment/39124999

http://stackoverflow.com/comment/39256281
has text: This however does not account for not finding hidden inputs.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25206319
type: Comment

http://stackoverflow.com/comment/39297621
comment on: http://stackoverflow.com/a/25228523
has text: Yeah, its just a simple function to show recursive calls.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25148514
answers question: http://stackoverflow.com/q/25148479
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/39149057
has body: It seems like you have the basic pieces so far as code is concerned (i.e., counting words, etc.). I'd recommend you register for the 'input' event on that control, and perform your check then. If the user has too many words, you can trim back the string to the desired content and/or update the UI to reflect the error condition.
downvote count: 0
has comment: http://stackoverflow.com/comment/39149081
type: Answer

http://stackoverflow.com/q/25076227
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Angular and code mirror
tagged with: angularjs
has answer: http://stackoverflow.com/a/25076389
tagged with: codemirror
has body: I've been trying to add some features to a javascript tool, and I need to highlight a line in codemirror. I'm using AngularJs. First I tried to follow a tutorial function highlightLine(lineNumber) { //Line number is zero based index var actualLineNumber = lineNumber - 1; //Select editor loaded in the DOM var myEditor = $("#body_EditorSource .CodeMirror"); //Write the item to the console window, for debugging console.log(myEditor); //Select the first item (zero index) just incase more than one found &amp; get the CodeMirror JS object var codeMirrorEditor = myEditor[0].CodeMirror; //Write the item to the console window, for debugging console.log(myEditor[0].CodeMirror); //Set line CSS class to the line number &amp; affecting the background of the line with the css class of line-error codeMirrorEditor.setLineClass(actualLineNumber, 'background', 'line-error'); } But it doesn't work, doesn't detect the myEditor var... I've tried: var myEditor = document.getElementById('codeMirrorDiv'); var myEditor = angular.element(document.querySelector((".codeMirrorDiv"))); and nothing. What does seem to be the problem?
type: UnansweredQuestion
tagged with: dom

http://stackoverflow.com/comment/39154014
has text: thank you, i will try to make modifications as you suggested.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25151066
type: Comment

http://stackoverflow.com/a/25146978
answers question: http://stackoverflow.com/q/25146762
has comment: http://stackoverflow.com/comment/39146418
upvote count: 1
has comment: http://stackoverflow.com/comment/39146310
has body: I have tested your fiddle and I can see straight away that on Firefox won't work because you are using mp4. You can embed an alternative format for the video and you can use .ogg for firefox and opera. Check this MDN resource: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats?redirectlocale=en-US&amp;redirectslug=Media_formats_supported_by_the_audio_and_video_elements &lt;video controls&gt; &lt;source src="somevideo.webm" type="video/webm"&gt; &lt;source src="somevideo.mp4" type="video/mp4"&gt; I'm sorry; your browser doesn't support HTML5 video in WebM with VP8 or MP4 with H.264. &lt;!-- You can embed a Flash player here, to play your mp4 video in older browsers --&gt; &lt;/video&gt;
has comment: http://stackoverflow.com/comment/39146207
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/39133723
has text: shame... then i don't know. Was a wild guess :-)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25140298

http://stackoverflow.com/a/25229758
has body: The first thing I would do is use a browser network inspector to verify exactly what URL is being requested by the $.get() call. Make sure the URL is correct, and load it up in it's own browser tab directly to troubleshoot the getuser.php file. My guess is that the URL is not correct and you're getting a server or WordPress 404 page, hence the HTML in your response. It's probably wisdom to use a full URL in your javascript, because pretty permalinks can cause problems with relative URLs like "getuser.php". Better yet, route your ajax request through WordPress's "admin-ajax.php" endpoint, as it's safer (those requests never get cached by plugins, etc), and use a WordPress action to respond to the request. Then, as Kevin pointed out, the getuser.php file isn't sending any information to the browser. You'll need to print or echo something to allow javascript to have a response to do anything with. The easiest thing for you to do would be get your database info in array format and then send it to the browser encoded as JSON, using json_encode( $array_of_data ). Then, your javascript code easily work with it as a simple javascript object.
has comment: http://stackoverflow.com/comment/39300290
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39300916
type: Answer
has comment: http://stackoverflow.com/comment/39303231
accepted answer of: http://stackoverflow.com/q/25229647
answers question: http://stackoverflow.com/q/25229647

http://stackoverflow.com/a/25121293
type: Answer
downvote count: 0
score: 1
has body: You are missing .arrow in both selectors for your css Use this div[class="helptext"] .arrow,span[class="helptext"] .arrow{ position: absolute; display: none; right: 15px; margin-top: 3px; padding: 10px; border: 1px solid #3c578c; background-color: #FCFCF0; opacity: 0.9; color: red; border-radius: 5px; box-shadow: 5px 5px 15px 1px dimgray; text-align: justify; font-size: 12px; z-index:100000; } I think you can .helptext .arrow as selector, if you don't have another element with classname helptext.
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25121193
answers question: http://stackoverflow.com/q/25121193

http://stackoverflow.com/a/25208351
has comment: http://stackoverflow.com/comment/39339658
answers question: http://stackoverflow.com/q/25208284
type: Answer
has comment: http://stackoverflow.com/comment/39260148
has comment: http://stackoverflow.com/comment/39339806
has comment: http://stackoverflow.com/comment/39271107
has comment: http://stackoverflow.com/comment/39260273
downvote count: 1
score: 19
has body: Known issue. Give your button a name OTHER THAN submit. That name interferes with the form's submit. EDIT A link was requested for this -- I don't have a link for pure JavaScript, but the jQuery docs do mention this issue: http://api.jquery.com/submit/ Forms and their child elements should not use input names or ids that conflict with properties of a form, such as submit, length, or method. Name conflicts can cause confusing failures. For a complete list of rules and to check your markup for these problems, see DOMLint. EDIT 2 http://jsfiddle.net/m55asd0v/ You had the CSS and JavaScript sections reversed. That code never ran in JSFiddle. You never re-called equalCheck. I added a call to your keyUp handler. For some reason you wrapped pictureValue inside a jQuery object as $(pictureValue) which couldn't have possibly done what you wanted. Basic debugging 101: A console.log inside of your equalCheck would have shown you that function was only called once. A console log checking the values you were comparing would have shown that you had the wrong value. Basic attention to the weird highlighting inside of JSFiddle would have shown you had the code sections in the wrong categories.
upvote count: 20
has comment: http://stackoverflow.com/comment/39271636
has comment: http://stackoverflow.com/comment/39261974
accepted answer of: http://stackoverflow.com/q/25208284
type: AcceptedAnswer

http://stackoverflow.com/q/25219587
has answer: http://stackoverflow.com/a/25219740
has answer: http://stackoverflow.com/a/64874293
has body: I need some help with my new template :). Before the webpage loads I want to show a preloader gif. I done it, however it shows just a little, because the page loads very fast. So I would like to delay the page (with 2 seconds, as an exemple), without affecting the preloader, so it (the preloader) would appear for 2 seconds, so until the page loads. Here is my code (note that it will not work on jsfiddle, because I can't upload the .gif file): jsfiddle.net/hLmxpsnw/
has comment: http://stackoverflow.com/comment/39281193
score: 6
has comment: http://stackoverflow.com/comment/39281143
type: Question
type: AnsweredQuestion
has title: Html preloader - delay page load
has answer: http://stackoverflow.com/a/70904804
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25219740
has comment: http://stackoverflow.com/comment/39281151
answer count: 3
has comment: http://stackoverflow.com/comment/39281135
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39281290
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39281257
tagged with: css
upvote count: 6
possible better answer: http://stackoverflow.com/a/64874293

http://stackoverflow.com/a/25118577
has body: Use an event Javascript and pass the new value parameter. HTML: &lt;input type="date" name="dateOne" value="" onChange="setDate(this.value);"/&gt; Javascript: var date; function setDate(val) { date = val; } Edit (based on comment) For set the variable into a form, create an input type hidden (or other). &lt;input id="jsValue" type="hidden" name="jsValue" value="" /&gt; In Javascript put the value into your input document.getElementById("jsValue").value = yourVariable; To see a result in your web page, create a span tag (or other) &lt;span id="seeYourVariable"&gt;&lt;/span&gt; In Javascript use the property innerHtml to put your variable into the tag document.getElementById("seeYourVariable").innerHTML = yourVariable;
has comment: http://stackoverflow.com/comment/39093144
has comment: http://stackoverflow.com/comment/39093641
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25118481
accepted answer of: http://stackoverflow.com/q/25118481
type: Answer
has comment: http://stackoverflow.com/comment/39093061
has comment: http://stackoverflow.com/comment/39093272
downvote count: 0
score: 1

http://stackoverflow.com/comment/39229048
has text: Ah, ok, Barmar is right. You can type this.name = name || "no name"; as well
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25191731

http://stackoverflow.com/q/25101662
has answer: http://stackoverflow.com/a/25101698
accepted answer: http://stackoverflow.com/a/25101698
type: Question
has body: I pulled this simple javascript function for showing or hiding a div from here. The function is: function ReverseDisplay(d) { if(document.getElementById(d).style.display == "none"){ document.getElementById(d).style.display = "block"; }else{ document.getElementById(d).style.display = "none"; } } This requires making a link like this: &lt;a href="javascript:ReverseDisplay('uniquename')"&gt; Click to show/hide. &lt;/a&gt; It's my understanding that having the link call javascript like that is bad practice. I'd like to make the javascript unobtrusive following https://stackoverflow.com/a/688228/2063292. But, that template provides a way to make some javascript execute for any link with a specified ID (e.g. all links with id="test" will call some function). I need to have a way to allow any link to pass the name of a specific div to the function, as in the original example, but I don't know how to do it.
has comment: http://stackoverflow.com/comment/39061441
has title: How do I unobtrusivify this javascript?
tagged with: javascript
has answer: http://stackoverflow.com/a/25101914
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/688196
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25101914
has answer: http://stackoverflow.com/a/25102042

http://stackoverflow.com/comment/39080423
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25111589
has text: No, when he says "hash map", he means *internally represented as a hash map*, which *only* happens in specific cases, for instance if you have oddly named properties. Your example is not one of them. And again, he has a "workaround" section right at the end which mentions how to iterate over it.

http://stackoverflow.com/comment/39136459
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25141518
type: Comment
has text: I'd say: move the function I sent you outside the function you have placed it in. Then, right after the `//insert code for mouse click here` just put a call to the function for the main anchor (if you only want the main one): `scrollToTag("main")`

http://stackoverflow.com/comment/39170392
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25160544
has text: It does, it is a, in HTML, the `<options>` tag.

http://stackoverflow.com/comment/39286835
type: QuestionComment
has text: Actually I did copy and paste it, but I missed the ctrl key when saving apparently in my editor. My bad. I wouldn't retype all of that code.
comment on: http://stackoverflow.com/q/25222643
score: 0
type: Comment

http://stackoverflow.com/comment/39215726
has text: People will also be interested in [IE Implementations](http://msdn.microsoft.com/en-us/library/ie/cc848867(v=vs.85).aspx) - `This pseudo-class requires that Windows Internet Explorer be in IE8 Standards mode or higher`
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25184880
type: Comment

http://stackoverflow.com/comment/39170520
comment on: http://stackoverflow.com/a/25156643
has text: That's doesn't work. Notice that, I don't want to use JS in component but object of component.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25085897
has answer: http://stackoverflow.com/a/25086877
has comment: http://stackoverflow.com/comment/39032423
has comment: http://stackoverflow.com/comment/39032392
downvote count: 4
duplicate of: http://stackoverflow.com/q/5731224
answer count: 1
tagged with: asp.net
favorite count: 0
has body: How do you call a JavaScript function behind C#? I have a button that I created and there's C# code behind to execute specific tasks, but I also want to add JavaScript function, where it changes the action when the button it is fired. Here is the JavaScript function, function myFunction() { document.getElementByID("Form").action="/submit.aspx"; } Here is my C# code for the button: protected void btnSubmit_Click(object sender, EventArgs e) { }
accepted answer: http://stackoverflow.com/a/25086877
linked to: http://stackoverflow.com/q/1828566
has comment: http://stackoverflow.com/comment/39032510
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39033477
upvote count: 2
has title: Calling Javascript function behind C#
linked to: http://stackoverflow.com/q/5731224
type: Question
tagged with: c#
score: -2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25139847
tagged with: nvd3.js
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/25198771
type: AnsweredQuestion
has body: I'm working with NVD3 charting library. I have created some basic charts from examples of different type of graphs/charts with some hard-code dummy data and its working fine. I'm able to render charts with the hard-coded data. Now I want to render charts with Json feeds coming from another URL but I'm having problem in fetching the json data from the url. So far I have tried different solutions from different websites but failed to get data. I have tried nvd3 library as d3.json('http://nvd3.org/examples/cumulativeLineData.json', function(data) { .... ... . } but this didnt worked and giving following error on console on Chrome Origin null is not allowed by Access-Control-Allow-Origin. while FireFox is not giving any error and shows status "200 ok" but I'm still not able to get data from the file. then i tried $.get("http://nvd3.org/examples/cumulativeLineData.json", function (jsonp) { var processImages = function (data) { alert('ok' + data); } }); but getting same results for both chrome and Firefox. I tried JsonP to get the file having data in json format like $.ajax({ url: 'http://nvd3.org/examples/cumulativeLineData.json', dataType: 'jsonp', success: function(dataWeGotViaJsonp){ console.log("data we got "+dataWeGotViaJsonp); } }); but couldn't get data. It show no error nor any data. The json file i'm trying to access is directly accessible through browser (i.e. no lgin security etc is required to access it) and it contains data something like following [ { "key": "Series 1", "values": [ [ 1025409600000 , 0] , .... , [ 1330491600000 , 93.388148670744]] }, { "key": "Series 2", "values": [ [ 1025409600000 , 0] , .... , [ 1330491600000 , -6.4417038470291]] }, { "key": "Series 3", "values": [ [ 1025409600000 , 0] , .... , [ 1330491600000 , 86.946444823715]] }, { "key": "Series 4", "values": [ [ 1025409600000 , -7.0674410638835] , .... , 61.099720234693]] } ] I have tried many solutions but couldn't get it resolve. Am I missing something or doing something wrong? Any …
score: 0
type: Question
tagged with: jsonp
tagged with: javascript
has answer: http://stackoverflow.com/a/25198771
has title: unable to get json feeds for Nvd3 chart
answer count: 1
tagged with: ajax

http://stackoverflow.com/q/25085550
favorite count: 0
possible better answer: http://stackoverflow.com/a/25085784
has answer: http://stackoverflow.com/a/25085669
tagged with: angularjs
has answer: http://stackoverflow.com/a/25085784
accepted answer: http://stackoverflow.com/a/25085669
has title: Data not updating at the expected time in Angular
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39031682
score: 1
upvote count: 1
type: Question
tagged with: javascript
has body: I have an AngularJS application that lists out data from a server in a view that looks like this: {{ query.query_string }} The saved_queries object is populated from a button with an id "refresh" that runs a function called refreshSubmit() from this controller: angular.module('myApp') .controller('QueryCtrl', ['$scope', 'Query', function ($scope, Query) { $scope.kill_entry = function(id){ var kill = $.post('http://my_ip:3000/api/delete_query', {'id': id}); kill.done(function(result){ $('#refresh').click(); }); } $scope.refreshSubmit = function(){ var savedQueries = $.post('http://my_ip:3000/api/saved_queries'); savedQueries.done(function(result){ $scope.saved_queries = result; }) } $scope.saveSubmit = function() { var save_query = $.post('http://my_ip:3000/api/save_query', { 'query_string': $scope.query_box }); save_query.done(function(result){ $('#refresh').click(); }); } } ]) The problem is, I have to click the "refresh" button TWICE in order for the data in the view to update after a record has been created or destroyed. Ideally, it would only need to be clicked once. Any idea why this is happening?
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25121032
answers question: http://stackoverflow.com/q/25120764
score: 0
type: Answer
has body: If you are ok with using a JavaScript solution I would check out flowtype.js http://simplefocus.com/flowtype/

http://stackoverflow.com/a/25168064
has comment: http://stackoverflow.com/comment/39185224
upvote count: 6
has comment: http://stackoverflow.com/comment/39185128
answers question: http://stackoverflow.com/q/25167909
score: 5
accepted answer of: http://stackoverflow.com/q/25167909
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39185060
has body: You can use .value, as: var textarea = document.getElementById('textareabox'); var word = 'something'; var textValue=textarea.value; //-&gt; don't use .innerHTML since there is no HTML in a textarea element if (textValue.indexOf(word)!=-1) { alert('found') }
has comment: http://stackoverflow.com/comment/39185343
type: Answer
has comment: http://stackoverflow.com/comment/39185115
has comment: http://stackoverflow.com/comment/39185254
downvote count: 1
has comment: http://stackoverflow.com/comment/39185307

http://stackoverflow.com/comment/39239807
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25197480
score: 0
has text: run with `"use strict"`

http://stackoverflow.com/q/25077422
tagged with: notifications
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/39018764
has body: I want send notification by Google Chrome Extension Manifest { "name": "Test", "description": "Test", "version": "1.1", "background": { "scripts": ["background.js"] }, "permissions": [ "tabs", "http://*/*", "https://*/*", "notifications" ], "browser_action": { "default_title": "Test", "default_icon": "test_16x16.png" }, "manifest_version": 2 } background.js chrome.browserAction.onClicked.addListener(function() { chrome.notifications.create( 'name-for-notification',{ type: 'basic', iconUrl: 'image.jpeg', title: "This is a notification", message: "hello there!" }, function() {} ); });] Why doesn't it work?
answer count: 0
score: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39016096
has title: Google Chrome notifications don't show
tagged with: javascript

http://stackoverflow.com/comment/39069140
has text: if I do alert(AllItem); then also it shows [object Object] , where did its all indexes and values go? isn't it an array whose all values and indexes can be accessed?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25103382
type: Comment

http://stackoverflow.com/a/25148738
has comment: http://stackoverflow.com/comment/39150682
score: 0
has comment: http://stackoverflow.com/comment/39150553
has body: What you have shown is a normal JS object and not a JSON (so it has nothing to do with JSON.stringify()). The quotes must be only escaped in string literals in code, so that interpreter did not confuse it with delimiting quotes. After it's parsed - they are stored in memory as-is without any escape characters. Example: http://jsfiddle.net/83GUe/ Guide: open developer tools, press Run and see the Scope variables Conclusion: what you provided on a screenshot is a 100% expected and correct behaviour.
has comment: http://stackoverflow.com/comment/39150654
type: Answer
has comment: http://stackoverflow.com/comment/39150483
has comment: http://stackoverflow.com/comment/39150735
has comment: http://stackoverflow.com/comment/39149522
answers question: http://stackoverflow.com/q/25148651
has comment: http://stackoverflow.com/comment/39149681
has comment: http://stackoverflow.com/comment/39149570
has comment: http://stackoverflow.com/comment/39149796

http://stackoverflow.com/q/25194606
has title: Unexpected string error when dynamically injecting js script
type: Question
tagged with: code-injection
tagged with: syntax-error
has answer: http://stackoverflow.com/a/25194649
tagged with: javascript
has answer: http://stackoverflow.com/a/25213400
score: 0
possible better answer: http://stackoverflow.com/a/25194649
answer count: 3
tagged with: string
has comment: http://stackoverflow.com/comment/39234475
has comment: http://stackoverflow.com/comment/39234294
has body: I need to execute a insert and execute javaScript in the following way: $("body").append(" "); I have tried following two encoding methods Manually move everything to the same line and replace all double quotes with single quotes using search and replace Fiddle:http://jsfiddle.net/benPearce/vaxo00eb/ String escape the javaScript using stringescape_tool Both of these methods result in "Unexpected string" syntax errors. If anyone can help me out I'd be greatly appreciative! The Script I need to inject seal_gif_url="images/nortonseal.gif"; dn="www.mysite.com"; sap="getnortonsealimage.js"; splash_url="https://trustsealinfo.verisign.com"; tpt="transparent"; language="en"; u1=splash_url+"/splash?form_file=fdf/splash.fdf&dn="+dn+"&lang="+language; function vrsn_splash() { tbar = "location=yes,status=yes,resizable=yes,scrollbars=yes,width=560,height=500"; sw = window.open(u1,'VRSN_Splash',tbar); sw.focus(); } { var ver=-1; var v_ua=navigator.userAgent.toLowerCase(); var re=new RegExp("msie ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(v_ua) != null) ver = parseFloat( RegExp.$1 ); var v_old_ie=(v_ua.indexOf("msie")!=-1); if (v_old_ie) { v_old_ie = ver < 5; } function maction(e){ if (document.addEventListener) { var seal=(e.target.name=="seal"); if (seal) { vrsn_splash(); return false; } } else if(document.captureEvents) { var tgt=e.target.toString(); var seal=(tgt.indexOf("splash")!=-1); if (seal){ vrsn_splash(); return false; } } return true; } function mouseDown() { if (event.button==1){ if (v_old_ie) { return true; } else { vrsn_splash(); return false; } } else if (event.button==2) { vrsn_splash(); return false; } } document.write(" "); if((v_ua.indexOf("msie")!=-1) && (ver>=7)) { var plat=-1; var re=new RegExp("windows nt ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(v_ua) != null) plat = parseFloat( RegExp.$1 ); if (plat >= 5.1) { document.write(" "); document.write(" "); document.write(" "); } } if (document.addEventListener){ document.addEventListener('mouseup', maction, true); } els…
accepted answer: http://stackoverflow.com/a/25213400
type: AnsweredQuestion
tagged with: escaping
has comment: http://stackoverflow.com/comment/39234318
has answer: http://stackoverflow.com/a/25194667

http://stackoverflow.com/comment/39044456
type: QuestionComment
comment on: http://stackoverflow.com/q/25092391
score: 0
has text: @PitaJ Well I could as well just make dimmed image and just display it instead, but I have like 50 of these images, and they are subject to change, so this will be time-consuming, but I guess I'll have to do this if there's no better solution.
type: Comment

http://stackoverflow.com/comment/39162594
score: 0
has text: Should that not be `var self = $(this);` ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25156094
type: Comment

http://stackoverflow.com/comment/39168520
has text: if you are using it in BG script it won't work. That code needs to be in content script. I've just tested it,and it works fine ... function myfunction() { alert('click'); } window.addEventListener('click', myfunction, false);
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25158666
type: QuestionComment

http://stackoverflow.com/a/25106316
downvote count: 0
has body: The change event only gets fired when focus leaves the textbox. For key-by-key responsiveness listen for the keyup event on your textboxes instead of the change event. Example code: Type text to wrap into canvas.
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39179887
upvote count: 1
answers question: http://stackoverflow.com/q/25102650
accepted answer of: http://stackoverflow.com/q/25102650
has comment: http://stackoverflow.com/comment/39179074
type: AcceptedAnswer

http://stackoverflow.com/q/25189237
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25189823
type: Question
has comment: http://stackoverflow.com/comment/39224320
has title: HTML view cannot see AngularJS
has comment: http://stackoverflow.com/comment/39228648
tagged with: javascript
has comment: http://stackoverflow.com/comment/39226465
score: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39226497
answer count: 3
has body: I am making a backend call using AngularJS using AJAX. My call returns the JSON successfully. This code is written in a JavaScript file. I have a html file in the same code base which is unable to iterate through this JSON. My JavaScript snippet is as below: angular.module('kmapp').controller("FieldCodesCtrl", ['$scope', function($scope){ var model = {}; console.log("FieldCodesCtrl"); $http.get("/my/rest/URL").success(function (data) { model.items = data; console.log("data set on items"); $scope.fieldCodes = model; console.log($scope.fieldCodes.items.length); }); // $scope.fieldCodes = model; }]); My html is as below: &lt;tr ng-repeat="item in fieldCodes.items"&gt; &lt;td&gt;{{item.id}}&lt;/td&gt; &lt;td&gt;{{item.comment}}&lt;/td&gt; &lt;/tr&gt; My issue is that the "fieldCodes.items" has nothing in the html. So it does not display the ID and Comment that I get from my JSON. Can someone please help. I am new to AngularJS. So please excuse me if it is something obvious.
has answer: http://stackoverflow.com/a/25190980
has answer: http://stackoverflow.com/a/25189734
has comment: http://stackoverflow.com/comment/39224251
has comment: http://stackoverflow.com/comment/39224593

http://stackoverflow.com/comment/39196040
type: QuestionComment
has text: Have you ever tried it on your own? maybe you should show us your code?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25173661

http://stackoverflow.com/comment/83312733
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25139577
score: 0
has text: I am trying this, but I find that if I register about 40 callbacks that performance seriously deteriorates (functions take as long as 10 seconds to start executing)

http://stackoverflow.com/comment/39215983
score: 0
type: Comment
has text: so my resource looks like this: `$resource('/api/Blogs/:id')`
comment on: http://stackoverflow.com/a/25185055
type: AnswerComment

http://stackoverflow.com/q/25104569
possible better answer: http://stackoverflow.com/a/25104641
has answer: http://stackoverflow.com/a/25104594
accepted answer: http://stackoverflow.com/a/25104594
tagged with: javascript
tagged with: string
has body: For a script I'm doing I need to verify a CSS selector exists in the DOM. I'm wondering how to handle multiple :pseudo selectors with a generic rule. Something like this is simple: var selector = "div.foo div.bar:active" which could be handled by selector.split(":").shift(); // &gt; div.foo div.bar but when I have multiple selectors, I'm don't know how I could remove them. Something like this: var selector = "div.foo:hover div.bar:after" Question: How would I remove all CSS pseudo selectors (":something") from a string?
favorite count: 0
has comment: http://stackoverflow.com/comment/39066684
tagged with: pseudo-class
tagged with: regex
downvote count: 0
has answer: http://stackoverflow.com/a/25104641
type: AnsweredQuestion
has title: How to remove all pseudo selectors from a CSS selector string using Javascript?
score: 1
type: Question
answer count: 2
tagged with: css-selectors
upvote count: 1

http://stackoverflow.com/a/25115224
has body: Try this: Fiddle $(document).ready(function() { $('#test').select2({ minimumInputLength: 3, placeholder: "Search", ajax: { url: "http://www.weighttraining.com/sm/search", dataType: 'jsonp', quietMillis: 100, data: function(term, page) { return { types: ["exercise"], limit: -1, term: term }; }, results: function(data, page ) { return { results: data.results.exercise } } }, formatResult: function(exercise) { return "&lt;div class='select2-user-result'&gt;" + exercise.term + "&lt;/div&gt;"; }, formatSelection: function(exercise) { return exercise.term; }, initSelection : function (element, callback) { var elementText = $(element).attr('data-init-text'); callback({"term":elementText}); } }).select2("enable", false); });
answers question: http://stackoverflow.com/q/25114898
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/q/25112033
has comment: http://stackoverflow.com/comment/39085439
type: Question
tagged with: deep-linking
has comment: http://stackoverflow.com/comment/39081039
tagged with: javascript
has body: I followed a tutorial on angularJS with subviews using ng-views I'm using html5Mode in my locationProvider and a nodejs backend If I wanted to link to or hit refresh while on a specific ng-view, I could use a hashtag. So like, to explain: if my angular app lived on localhost:3000/app and I had a view at localhost:3000/app/subview, if I hit refresh my node server didn't know how to go to a specific view on the front end. But if, on the server side, a request came through for /app/subview and I redirected to or rendered /app#/subview (with the hashtag in there), then I went to the correct ng-view on the front end. That's what I wanted. Of course, there's more than one way to skin a cat I guess, but it was working. Now, I'm trying to do that again. But this time it's not working. If I try to go to localhost:3000/app#/subview via a link or refresh, instead of going to the ng-view that lives at /app/subview like it did before, it's going to /app#%2Fsubview instead. And I'm ..heh .. heh.. not sure what's different. I thought I was doing everything exactly the same. Has anyone had this problem? Does anyone know what is happening? Edit: I think I kind of found a workaround. If I set base href = "/app" in the head of the html document, and then respond to a request to app/subview with a redirect to app#/subview, then I can serve up app with the correct subview (only the url goes to /subview). I think this might be acceptable for me even if it's not quite ideal but OH WELL
has comment: http://stackoverflow.com/comment/39087278
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/39083003
has title: AngularJs deep linking to a specific ng-view

http://stackoverflow.com/q/25081346
has title: Extjs: upload file with submit form
type: Question
has body: I'm trying to upload file (excel) using ExtJs and Spring without luck, so I hope you will help me. In panel I have a button (fileuploadfield) and with that I select a file, which I want to upload. . . ,{ xtype: 'fileuploadfield', buttonOnly: true, hideLabel: true, buttonText: "Importuoti excel failą", border: false, itemId: "uploadBtn", name: 'file' }, . . This is my controller. Every time I choose file with fileuploadfield it activates function uploadFile(). init: function() { var me = this; this.listen({ '#uploadBtn': { 'change': function(fld, value) { console.log(value); this.getTurtasPanel().setLoading(true, true); if(value != ""){ me.uploadFile(); fld.reset(); } } }, }) uploadFile function. uploadFile: function(){ var fp = Ext.create('Ext.form.Panel', { fileUpload: true, autoHeight: true, bodyStyle: 'padding: 10px 10px 0 10px;', labelWidth: 50, method: 'POST', defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side' } }) if(fp.getForm().isValid()){ fp.getForm().submit({ url: Turtas.Properties.getServicePath()+'/save/' + record.data.resource, headers: {'Content-Type':'multipart/form-data; charset=UTF-8'}, }) } }, And Spring controller: @RequestMapping(value="turtas/save/gelezinkeliai", method=RequestMethod.POST) public @ResponseBody void saveGelezinkeliaiFromExcel(@RequestParam("file") MultipartFile file){ System.out.println(file); } And error which I get: Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found the request was rejected because no multipart boundary was found I think the problem is in my client side request. I think my request doesn't attach the file I want to upload. I tried to set Headers in client side as undefined, but then content type becomes "application/json" and i get error that th…
has answer: http://stackoverflow.com/a/25092505
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25092505
tagged with: multipart
downvote count: 0
answer count: 1
tagged with: file-upload
favorite count: 0
tagged with: extjs
tagged with: spring
upvote count: 6
type: AnsweredQuestion
score: 6

http://stackoverflow.com/q/25203533
has answer: http://stackoverflow.com/a/25203574
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39250496
has comment: http://stackoverflow.com/comment/39250629
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39252519
tagged with: php
has body: Can someone explain why this code shows me blank select box ? When I select first box which name is "firstbox" then it should be showing info in second box which id is "komandos" but it won't showing anything... &lt;script&gt; jQuery(function($) { $("#komandos").change(function() { var id = $("#id").val(); if(isNaN(id)) {return;} $.ajax({ type: "GET", url: "ajax.php", data: {'update_tm': '', 'id': id}, dataType: 'json', success: function(data){ $("#komandos").empty(); for (var i = 0; i &lt; data.length; i++) { $("#komandos").append('&lt;option&gt;'+data[i].team+'&lt;/option&gt;'); } } }); }); }); &lt;/script&gt; ajax.php &lt;?php include_once('inc/conn.php'); include_once('inc/futbolas.php'); if(isset($_GET['update_tm']) &amp;&amp; is_numeric($_GET['id'])) { $query = $pdo-&gt;prepare("SELECT `pirma_komanda`,`antra_komanda` FROM futbolas WHERE `id` = ?"); $query-&gt;execute(array($_GET['id'])); if($query) { $query = $query-&gt;fetch(); $rez[0]['team'] = $query['pirma_komanda']; $rez[1]['team'] = $query['antra_komanda']; echo json_encode($rez); } }
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/39250662
tagged with: javascript
score: 0
has title: Select box jquery

http://stackoverflow.com/comment/39027232
type: Comment
comment on: http://stackoverflow.com/a/25081105
has text: Ah, that was me testing and forgetting to undo the changes. I've updated the code, but even with the === "true" it still only logs "true" in the console. I'm thinking at this point I should probably not be using ionic/angular until I understand the concepts better. It shouldn't be this difficult to get the state of a checkbox.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25167311
has body: You have other issues than just "(100 + x) instead of (100 + a). First, arrays in JavaScript are "zero-based" but your loops start at 1. This means you're putting things in but leaving spot '0' undefined, which will probably break things later. Next. at the beginning of the loop you set labelArrayGroup0[a] to a new blank label, but you never do anything to put it on the page. At the end the loop, you overwrite labelArrayGroup0[a] to a floatingButton element you pull from the page. In fact, you do this in every loop - the last line resets the value of the 1st line. It's not clear what you're trying to accomplish. Presumably you intend to append labelArrayGroup0[a] to the page instead? Also, in the middle, you set floatingButtonArrayGroup0[a] = document.getElementById('floatingButton0' + (100 + a)); which is the same element you grab in the last line of the loop...
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25166790
answers question: http://stackoverflow.com/q/25166790

http://stackoverflow.com/a/25213643
answers question: http://stackoverflow.com/q/25213530
accepted answer of: http://stackoverflow.com/q/25213530
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: If I understand correctly you want extract the argument names from the function, and inject data from an object based on those names. This can be accomplished by converting the function to a string, extracting the arguments, and applying the function with those arguments: function inject(data, f) { var args = f.toString() .match(/function\s*?\((.+?)\)/) .pop() .split(',') .map(function(a){return data[a.trim()]}) return function() { return f.apply(this, args) } } var data = { apple: 'nice', banana: 'decent', cherry: 'yuck', } var eat = inject(data, function(cherry, apple) { console.log(cherry, apple) }) eat() //=&gt; yuck, nice The obvious problem with this approach is that it is highly dependent on the variable names, so when you minify your code, the variables will get mangled and the function will stop working. This is a known problem in AngularJS, which uses something similar for their dependency injection. This is often an XY problem, or an anti-pattern at the very least.

http://stackoverflow.com/a/40456110
has comment: http://stackoverflow.com/comment/99924764
has body: var $option = $("&lt;option selected&gt;&lt;/option&gt;").val('1').text("Pick me"); $('#select_id').append($option).trigger('change'); Try this append then select. Doesn't duplicate the option upon AJAX call.
has comment: http://stackoverflow.com/comment/93966351
answers question: http://stackoverflow.com/q/25187926
upvote count: 14
has comment: http://stackoverflow.com/comment/68157787
type: Answer
downvote count: 0
score: 14

http://stackoverflow.com/q/25121798
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/27897192
tagged with: javascript
has answer: http://stackoverflow.com/a/25161581
type: Question
score: 0
answer count: 2
tagged with: jquery
has body: I need a specific date value for my web application. I change the Date prototype. But it is not valid date for Jquery Date. InitDate = Date; InitDate.prototype = Date.prototype; Date = function () { if (arguments.length == 0) { var now = new InitDate(); var date = new InitDate(2013, 8, 3); date.setHours(now.getHours()); date.setMinutes(now.getMinutes()); date.setSeconds(now.getSeconds()); date.setMilliseconds(now.getMilliseconds()); date.prototype = Date.prototype; return date; } else { var date = InitDate.apply(this, arguments); return date; } }; Date.prototype = InitDate.prototype; Error: "Uncaught TypeError: this is not a Date object. " How can I change Javascript Date object? Fiddle Exam : http://jsfiddle.net/fe3W2/
tagged with: datepicker
tagged with: datetime
has title: Override Date Object Error: "this is not a Date object."

http://stackoverflow.com/q/25099095
type: AnsweredQuestion
upvote count: 2
score: 1
has answer: http://stackoverflow.com/a/25099136
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/8380042
has answer: http://stackoverflow.com/a/25099128
possible better answer: http://stackoverflow.com/a/25099133
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/8380042
has title: Append an element to be a parent
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/25099173
has answer: http://stackoverflow.com/a/25099133
has answer: http://stackoverflow.com/a/25099324
accepted answer: http://stackoverflow.com/a/25099324
tagged with: append
has comment: http://stackoverflow.com/comment/39056691
has body: I was wondering was it possible to append an element using jquery to be a parent. Imagine I had this on my page: &lt;div id="inner"&gt; &lt;/div&gt; And I wanted to put #inner inside another div #outer with jquery after some kind of event. The result would be: &lt;div id="outer"&gt; - This element was appended with JQUERY &lt;div id="inner"&gt; &lt;/div&gt; &lt;/div&gt; Not sure that this is possible. Any help appreciated.

http://stackoverflow.com/q/25087758
has comment: http://stackoverflow.com/comment/39035907
score: 0
has body: I am not sure what is the best approach to load all .js files from a folder from within index.html The number of .js files will change so I cannot define them in the index.html the usual way. I cannot use php or jQuery solutions which would make it easier. &lt;script&gt; var count = 1; function LoadNext() { var newScript = document.createElement("script"); newScript.setAttribute("type", "text/javascript"); newScript.setAttribute("src", "page-" + count++ + ".js"); //Increment the counter so we get the next page each time newScript.onload = LoadNext; //When the script loads call this function again document.getElementsByTagName("head")[0].appendChild(newScript) } LoadNext(); &lt;/script&gt;
has title: load javascript files from folder
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39036010
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25087913
has comment: http://stackoverflow.com/comment/39036125
type: Question
has answer: http://stackoverflow.com/a/25087913
upvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39036033

http://stackoverflow.com/a/25137337
accepted answer of: http://stackoverflow.com/q/25137275
has comment: http://stackoverflow.com/comment/39127731
score: 0
has body: You may try like this using Javascript: function handleChange() { var x = document.getElementById("name").value; if (x.indexOf("$") != 0) { x = "$" + x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } document.getElementById("name").value = x; } JSFIDDLE Demo
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25137275
has comment: http://stackoverflow.com/comment/39156731
has comment: http://stackoverflow.com/comment/39127522
type: Answer
has comment: http://stackoverflow.com/comment/39156715

http://stackoverflow.com/a/25071050
answers question: http://stackoverflow.com/q/25070999
score: 0
has body: Personnally, I use a "spy" object provided by Jasmine to "spy" http calls => a mock. Therefore, no need to call the real implementation, or configuring fake routes. The goal is to ensure that the expected calls are made in certain circumstances and unexpected aren't. Like @BuDen evokes, Sinon is perfect too for stubbing.
type: Answer

http://stackoverflow.com/a/25165669
answers question: http://stackoverflow.com/q/25165193
has comment: http://stackoverflow.com/comment/39256337
has comment: http://stackoverflow.com/comment/39204939
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39181129
type: Answer
has comment: http://stackoverflow.com/comment/39253871
score: 1
has body: A few things I notice: You are calling a jquery selector to get the element with the id of movie-list multiple times because the selector is in a loop. Rather than using jquery to look up the same element over and over again, you should set it into a variable and reuse it! You are creating html using string concatenation. While this is usually fine for small amounts of dynamic html, it can very quickly become difficult to maintain. I suggest creating the DOM elements and appending them to each other (without the use of jquery) instead of making a giant html string. You're building html in javascript! If at all possible, I would suggest adjusting your API to return the chunk of html that you need and build it server side rather than building it client side. If you build the html server side, then you can take advantage of whatever rendering framework you are using (PHP, Jade, JSF, etc...) and write the html as html. With those things in mind, setting the background-image style property should work just fine. You may also need to use background-repeat and background-size to get the desired effect. Here's what I came up with: var ajax = { parseJSONP:function(response){ var results = response.results; movieInfo.result = results; var $movieList = $("#movie-list"); for(var i = 0; i &lt; results.length; i++) { var row = results[i]; console.log("Title: " + row.title); var listItem = document.createElement("li"); var anchor = document.createElement("a"); var header = document.createElement("h3"); var paragraph = document.createElement("p"); anchor.setAttribute("href", ""); anchor.setAttribute("data-id", row.id); header.textContent = row.title; paragraph.textContent = row.vote_average + "/10"; var backgroundImageUrl = "http://d3gtl9l2a4fn1j.cloudfront.net/t/p/w185" + row.poster_path; listItem.style.backgroundImage = "url('" + backgroundImageUrl + "')"; listItem.style.backgroundRepeat = "no-repeat"; listItem.style.backgroundSize = "cover"; anchor.appendChild(header); anchor.ap…
has comment: http://stackoverflow.com/comment/39219668
upvote count: 1
has comment: http://stackoverflow.com/comment/39180972
accepted answer of: http://stackoverflow.com/q/25165193

http://stackoverflow.com/q/25222143
has comment: http://stackoverflow.com/comment/39286345
type: Question
tagged with: phaser-framework
has body: Newbie: I am following this tutorial I tried adding up and down motion also like: if (cursors.left.isDown) { // Move to the left player.body.velocity.x = -150; player.animations.play('left'); } else if (cursors.right.isDown) { // Move to the right player.body.velocity.x = 150; player.animations.play('right'); }else if (cursors.up.isDown) { // Move to the top player.body.velocity.y = -50; player.animations.play(‘top’); } else if (cursors.down.isDown) { // Move to the bottom player.body.velocity.y = 50; player.animations.play(‘bottom’); } The character is moving but when we press up arrow key, player will go till top of the game screen, and when down arrow is pressed it will fall from top. I tried setting player.body.gravity.y = 0; still it falls down or flies up. Lelt and right motion is perfect, I need a similar behavior when moving up or down.
has comment: http://stackoverflow.com/comment/39286213
has title: How to make up and down motion in phaser js without gravity
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39287054
has answer: http://stackoverflow.com/a/25223969
accepted answer: http://stackoverflow.com/a/25223969
type: AnsweredQuestion

greasemonkey
tags question: http://stackoverflow.com/q/25113800
tags question: http://stackoverflow.com/q/25118087
type: Tag
tag name: greasemonkey
tags question: http://stackoverflow.com/q/25098691
tags question: http://stackoverflow.com/q/25102691
tags question: http://stackoverflow.com/q/25148446

http://stackoverflow.com/comment/39154298
comment on: http://stackoverflow.com/q/25092243
type: Comment
type: QuestionComment
score: 0
has text: Did the last solution worked?

http://stackoverflow.com/q/25150956
tagged with: php
has body: Is there any possible to detect if the user downloaded the file? If it was downloaded by the user, the file now will be remove from its account because it will be a one time download only. I don't know if there's any but if there is a possible way to do it, how? Any help is appreciated. Thanks in advance. This is my codes for downloading a pdf file: HTML &lt;a href="ebooks/ebook.php?file=&lt;?php echo $row['FILE_NAME'];?&gt;" class="btn btn-inverse" role="button"&gt;Download&lt;/a&gt; ebooks.php &lt;?php $file = $_GET["file"].".pdf"; header("Content-disposition: attachment; filename=" . urlencode($file)); header("Content-type: application/pdf"); readfile($file); ?&gt;
has comment: http://stackoverflow.com/comment/131399776
tagged with: download
answer count: 0
has comment: http://stackoverflow.com/comment/39153444
type: Question
has title: How to detect if user downloaded the file
has comment: http://stackoverflow.com/comment/39153768
score: 0
has comment: http://stackoverflow.com/comment/39153449
tagged with: javascript
has comment: http://stackoverflow.com/comment/39153430
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/pdf

http://stackoverflow.com/comment/40795147
score: 0
type: AnswerComment
type: Comment
has text: I use gulp.watch to detect new created file when gulp has already started.
comment on: http://stackoverflow.com/a/25171924

http://stackoverflow.com/comment/39249959
has text: I wouldn't change normal behavior, but first start with sniffing out the zoom, http://stackoverflow.com/a/6365777/1004312, then -- if that is working -- I guess write a script to load up a desktop css file that doesn't have media queries. Just guessing.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25198573

http://stackoverflow.com/q/25123100
has body: I have successfully used core-ajax to pass a json object, but I want to write a custom element that can pass simple values. Here is what I have, but it is not working. testOutput element This doesn't do anything but output a value. testInput element Here is the value from the other element: {{input}} index.html output This doesn't do anything but output a value. Here is the value from the other element:
has comment: http://stackoverflow.com/comment/39101864
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25124970
type: Question
has answer: http://stackoverflow.com/a/25130112
tagged with: polymer
tagged with: javascript
has title: Return simple value from polymer element?
answer count: 3
upvote count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/25050120
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25123248
has comment: http://stackoverflow.com/comment/39101818

http://stackoverflow.com/q/25113957
has title: open specific html slide from iOS code
has body: i have html file with 5 slides i need to go to page when enter its number in text Field (or if press button) where can i go from here (how to get reference &amp; open it ) and this is my code localContent = [[UIWebView alloc] initWithFrame:CGRectMake(0, 60, 1024, 768)]; NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"inDirectory:@"Edge"]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [localContent loadRequest:request]; [self.view addSubview: localContent];
type: Question
tagged with: ios
tagged with: javascript
has answer: http://stackoverflow.com/a/25288829
score: 0
answer count: 1
tagged with: objective-c
tagged with: uiwebview
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25288829
type: AnsweredQuestion

http://stackoverflow.com/q/25210190
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25210518
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: my problem between socket.io and HTML5 Javascript Server: var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); app.get('/', function (req, res) { res.sendfile('index.html'); }); io.on('connection', function (socket) { socket.emit('news', 'Hello'); }); http.listen(3000, function () { console.log('listening on *:3000'); }); HTML5: My Title When I click on the button (ID: getButton) I don't get an alert. The server ist working and I can access the page without any problems. I am currently a newbie in socket.io/javascript (installed yesterday), if you have good informative pages about socket.io please post the link under this topic, thanks. best regards
favorite count: 0
type: UnansweredQuestion
tagged with: node.js
has title: Socket.io > Simple server to client message
downvote count: 0
score: 1
tagged with: socket.io
type: Question

http://stackoverflow.com/comment/39169977
score: 0
comment on: http://stackoverflow.com/a/25151779
type: Comment
has text: too thanks :) this worked and I understand source of problem :)
type: AnswerComment

marker
tag name: marker
tags question: http://stackoverflow.com/q/25108281
type: Tag

http://stackoverflow.com/q/25210104
favorite count: 0
has title: if/else statement with setTimeout causes flicker
type: AnsweredQuestion
score: 4
has comment: http://stackoverflow.com/comment/39263590
type: Question
has answer: http://stackoverflow.com/a/25210488
has comment: http://stackoverflow.com/comment/39263886
has comment: http://stackoverflow.com/comment/39263262
tagged with: javascript
upvote count: 4
possible better answer: http://stackoverflow.com/a/25210167
answer count: 2
has body: I'm displaying an element on scrolling down and hiding it when scrolling up again. Without using setTimeout, this works just as expected. However, using setTimeout causes the 'display' class to be added and removed in short intervals when scrolling down. How can I avoid this while keeping the delay? onscroll = function() { var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; if (scrollTop &gt; 110) { menuButton.classList.add('display'); } else { setTimeout(function() { menuButton.classList.remove('display'); }, 400); } }
has answer: http://stackoverflow.com/a/25210167
downvote count: 0
accepted answer: http://stackoverflow.com/a/25210488

http://stackoverflow.com/q/25138102
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39129252
type: Question
answer count: 2
tagged with: asp.net-mvc
possible better answer: http://stackoverflow.com/a/25156389
tagged with: javascript
tagged with: jquery
score: 0
tagged with: radio-button
accepted answer: http://stackoverflow.com/a/25138656
has comment: http://stackoverflow.com/comment/39129355
has body: code in controller : this action get data from database and fill (classlist) with this data public ActionResult GetClassListForTeacher() { List<string> classlist = null; ProfileEntities pe= new ProfileEntities(); string uID = HttpContext.Session["NID"].ToString(); int year = 2011; //int year = DateTime.Now.Year; int session = set_session(); if (session == 1)//teacher { classlist = (from c in pe.CLASSES join lc in pe.LESSON_CARDS on new { EDUSTG_CODE = c.EDUSTG_CODE, STATISTICAL_CODE = c.STATISTICAL_CODE, FIRST_YEAR = c.FIRST_YEAR, GRD_CODE = c.GRD_CODE , OCF_CODE = c.OCF_CODE , CLS_SN = c.CLS_SN} equals new { EDUSTG_CODE = lc.EDUSTG_CODE, STATISTICAL_CODE = lc.STATISTICAL_CODE_BELONGS_TO, FIRST_YEAR = lc.FIRST_YEAR, GRD_CODE = lc.GRD_CODE , OCF_CODE = lc.OCF_CODE_BELONGS_TO , CLS_SN = lc.CLS_SN} where (lc.NID == uID && lc.FIRST_YEAR_HAVE == year) select c.NAME ).ToList(); } if (session == 2)//student {} return Json(classlist, JsonRequestBehavior.AllowGet); } And this code in view @Html.RadioButton("type","Friendes",false,new { id = "Friendes"}) All Friendes @Html.RadioButton("type","Teachers",false,new { id = "Teachers"}) All Teachers As Friends @Html.RadioButton("type","Same School",false,new { id = "Same_School" }) Same School @Html.RadioButton("type","Other School",false,new { id = "Other_Schools"}) Other School @Html.RadioButton("type","Schoolmates",false,new { id = "Schoolmates"}) All Students As Friends i want add list of radio buttons after last radio button which called (Schoolmates) and this is the code in js $("#MoreOptionModal").dialog({ autoOpen: false, modal: true, }); $("#options").live("click", function () { debugger; $("#MoreOptionModal").dialog('open'); $.ajax({ url: "/Mail/GetClassListForTeacher", type: "POST", datatype: "json", data: { }, traditional: true, success: function (result) { } }); }); the problem is i already have model in my view and i retrieve data from database and i want to show it my view
has answer: http://stackoverflow.com/a/25138656
has answer: http://stackoverflow.com/a/25156389
has title: fill radiobutton with data from data base in mvc 4 without using model

jakarta-ee
tags question: http://stackoverflow.com/q/25201761
type: Tag
tags question: http://stackoverflow.com/q/25166287
tag name: jakarta-ee

http://stackoverflow.com/comment/39263566
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25210157
type: Comment
has text: `' '.` still returns the same thing.

http://stackoverflow.com/q/25124229
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39103867
has comment: http://stackoverflow.com/comment/39104351
score: 0
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39103770
has comment: http://stackoverflow.com/comment/39103718
has comment: http://stackoverflow.com/comment/39103781
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39104484
has title: Managing javascript without refreshing DOM in singlepage webapp
has comment: http://stackoverflow.com/comment/39104438
tagged with: web-applications
has body: I am currently building a single page web app and running into a few issues which I think are all related to the same thing. In short, I use ajax to pull in new content and a simple jquery .remove() to remove the old content. I am finding the issue to be that I am removing off old javascript and bringing on new javascript (for the front end functionality of the new content, button clicks and things of the like). The old javascript still seems to be in the dom and running, which is causing issues with the new javascript. I am not refreshing the page, and would like to avoid refreshing it. I did some poking around, it seems stuff like backbone.js might have a handle on this. I would like to stick with what I am currently using if possible. So in short, is it possible to remove that old javascript from the dom? Or anything close to something like that. Thank you for your time.

http://stackoverflow.com/comment/39062360
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25101980
type: Comment
has text: Thank you, your suggestion is successfully worked.

http://stackoverflow.com/comment/39126624
type: QuestionComment
comment on: http://stackoverflow.com/q/25136845
has text: Trying!!!! It's simple as that ;-)
score: 0
type: Comment

http://stackoverflow.com/comment/39252276
type: Comment
comment on: http://stackoverflow.com/a/25204399
type: AnswerComment
has text: The tutorial on the link is old, but `colorbox()` is probably the best maintained modal plugin out there, imo!
score: 0

http://stackoverflow.com/comment/39373783
has text: No, we don't support it.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25233321

http://stackoverflow.com/a/50488481
score: 4
has body: Here is an example spec for input file/image using angular2+. it('should call showError on toastService Api on call of onSaveOfImage() method', () =&gt; { spyOn(component.commonFacade.fileIOApi, 'uploadFile'); let file = new File([new ArrayBuffer(2e+5)], 'test-file.jpg', { lastModified: null, type: 'image/jpeg' }); let fileInput={ files: [file] }; component['onSaveOfImage'](fileInput,"",null,"",""); expect(component.commonFacade.fileIOApi.uploadFile).toHaveBeenCalledTimes(1); expect(component.uploadedFileData).toBeUndefined(); expect(component.commonFacade.employeeApi.toastService.showError).toHaveBeenCalledTimes(1); })
type: Answer
answers question: http://stackoverflow.com/q/25097738
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/39096707
type: Comment
has text: @user3864308: then please post the top of your file too. i don't know where you insert the ` `, but it should be at the very start of your html output, not at the start of your php script.
comment on: http://stackoverflow.com/a/25117517
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39112477
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25128480
has text: do you get anything from the `.fail` callback? Try to `alert("oops")` from the fail callback and see if its your `jslongfunc` function.

http://stackoverflow.com/q/25138763
has comment: http://stackoverflow.com/comment/39130445
score: 1
has comment: http://stackoverflow.com/comment/39130540
has title: alert statement not blocking in chrome browser
has comment: http://stackoverflow.com/comment/39130850
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39130411
has comment: http://stackoverflow.com/comment/39130415
has body: IM using the below code to check if a session is valid and run every 15 seconds......When I test this piece of code in IE it works fine but ie;alert stmt pops up and once I click "OK" it redirects to the main page...but when I run in chrome it directly redirects to home page without any pop up.. How can I fix this issue ie;chrome should pop up the alert stmt? setInterval(checksession, 15000) function checksession() { $.ajax({ aynsc: false, type: 'POST', url: 'CheckSession', success: validateresult, data: { antiCSRF: '{{acsrf}}', session_id: '{{session_id}}' }, error: function () { alert('Session check failed') } }) return false; } function validateresult(result) { if (result == "N") { valid_flag = "N" alert("Your session has been timed-out based upon Security Policy. Please click OK to be redirected to the login page to start a new session."); window.location.assign('./') } else { valid_flag = "Y"; return valid_flag } }
answer count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/39130532

http://stackoverflow.com/comment/39052350
has text: http://pastebin.com/Y2vyiv3E - DELETE FORM http://pastebin.com/NQTECGdf - Function Still same result.
type: AnswerComment
comment on: http://stackoverflow.com/a/25096629
score: 0
type: Comment

http://stackoverflow.com/comment/39120261
has text: There are always callbacks you can use to act after the data has returned. That's what you should be doing, not turning off async.
score: 5
comment on: http://stackoverflow.com/q/25133294
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39066820
type: AnswerComment
has text: Just FYI, while it is naïve, `a:link, a:visited` and `a[href]` are indeed exactly equivalent in HTML. As for `:enabled` and `:disabled`, you also have to account for the fact that some elements will never match either of those - those are the elements that have no notion of being enabled/disabled, such as non-form elements.
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25104641

parse-platform
tags question: http://stackoverflow.com/q/25196127
tags question: http://stackoverflow.com/q/25101057
tags question: http://stackoverflow.com/q/25187403
type: Tag
tags question: http://stackoverflow.com/q/25211362
tags question: http://stackoverflow.com/q/25085314
tags question: http://stackoverflow.com/q/25110420
tags question: http://stackoverflow.com/q/25195773
tags question: http://stackoverflow.com/q/25091196
tags question: http://stackoverflow.com/q/25149865
tags question: http://stackoverflow.com/q/25087949
tags question: http://stackoverflow.com/q/25108936
tags question: http://stackoverflow.com/q/25114339
tags question: http://stackoverflow.com/q/25095333
tags question: http://stackoverflow.com/q/25082262
tags question: http://stackoverflow.com/q/25100111
tags question: http://stackoverflow.com/q/25213616
tags question: http://stackoverflow.com/q/25096453
tags question: http://stackoverflow.com/q/25166495
tags question: http://stackoverflow.com/q/25128327
tags question: http://stackoverflow.com/q/25161594
tags question: http://stackoverflow.com/q/25187165
tags question: http://stackoverflow.com/q/25166238
tags question: http://stackoverflow.com/q/25168359
tags question: http://stackoverflow.com/q/25072053
tags question: http://stackoverflow.com/q/25201834
tags question: http://stackoverflow.com/q/25196023
tags question: http://stackoverflow.com/q/25085918
tags question: http://stackoverflow.com/q/25150064
tags question: http://stackoverflow.com/q/25089911
tag name: parse-platform
tags question: http://stackoverflow.com/q/25094803
tags question: http://stackoverflow.com/q/25085103

http://stackoverflow.com/comment/39140341
comment on: http://stackoverflow.com/a/25141750
score: 0
type: Comment
has text: Thank you runTarm your right. I changed in to as and now it works. It also works with ng-controller="AppCtrl as app"
type: AnswerComment

http://stackoverflow.com/q/25088425
type: AnsweredQuestion
tagged with: post
type: Question
has answer: http://stackoverflow.com/a/25277810
accepted answer: http://stackoverflow.com/a/25277810
answer count: 1
tagged with: javascript
has title: Marquee Recent Posts (Wordpress)
tagged with: marquee
score: 0
has body: I use the following code to display recent posts in Wordpress with a date and timestamp in a Marquee. <a title="<?php echo the_title() ?>" href="<?php the_permalink() ?>"> <?php echo $title_short ?> <?php the_time('F jS, g:i a') ?> I would like to make it so only 4 out of the 14 posts are displayed at a time. The scrolling mechanism is irregular and I'd like to make it smooth and steady. Furthermore, if anyone knows how to display specific category posts, that would be helpful.
tagged with: wordpress
tagged with: php

http://stackoverflow.com/a/25167689
answers question: http://stackoverflow.com/q/25155616
has body: What version of Firefox are you using? Running this code in Firefox 31 in a content script seems to work fine for me: var arr = new Uint16Array(6); console.log(window.crypto.getRandomValues(arr));
score: 0
type: Answer

http://stackoverflow.com/a/25178395
has comment: http://stackoverflow.com/comment/39204131
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39204444
has comment: http://stackoverflow.com/comment/39204548
has comment: http://stackoverflow.com/comment/39204009
answers question: http://stackoverflow.com/q/25119868
has comment: http://stackoverflow.com/comment/39204497
downvote count: 0
score: 1
has body: Ok so after a little research, it appears this is really only capable of being done with JS as a companion. Research: How do I make a div fill an entire table cell? How to make &lt;div&gt; fill &lt;td&gt; height Make a DIV fill an entire table cell They led me to this awesome little CSS Tricks page. (requires jQuery, tested using 1.9.1 [should be IE8 compatible]). That helps to let div elements get position:absolute; within a td and not spill out. As such, here is a link to a JSFiddle with your code as a base. It was necessary to position:absolute some elements, and others i added it to for cleanliness (as much as is possible with a table based layout). Tested on IE8, IE9, IE10, and working as expected. (If you right click on the output and view source, you should be able to see an html file that you can save and test with as a file outside of jsfiddle)
has comment: http://stackoverflow.com/comment/39204508
has comment: http://stackoverflow.com/comment/39204167

http://stackoverflow.com/comment/39154469
type: AnswerComment
comment on: http://stackoverflow.com/a/25151447
type: Comment
has text: This loads the first image perfectly, but how would I change the image to the next one in the array?
score: 0

http://stackoverflow.com/q/25126673
type: Question
has answer: http://stackoverflow.com/a/25127262
downvote count: 0
tagged with: javascript
has title: Save modified json file with AngularJS
has comment: http://stackoverflow.com/comment/39109610
has comment: http://stackoverflow.com/comment/39109782
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25127262
tagged with: cordova
tagged with: angularjs
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/39118952
upvote count: 3
has comment: http://stackoverflow.com/comment/39108362
tagged with: http://stackoverflow.com/tag/json
has body: I'm creating a phonegap app with AngularJS that uses a .json file to store an array of entries. My aim is to allow the user to mark some of them as favorites, and then use that data somewhere else (another page with the favorites only, for example). First time doing a web development and I have to say I'm pretty new to web technologies such as AngularJS, JSON, PhoneGap, etc. (and I'm using them all), so maybe this question is a nonsense, but here I go anyway. I've tried to save that data in an IndexedDB, in a WebSQL DB, in WebStorage.... but those approaches seem to be complex combined with PhoneGap, so I'm trying now to modify a field in the .json file and save the modified file. I know JS can't write files, but I was trying to send the file by POST instead to fill that gap. Here's the code of the function I'm using: $scope.save = function() { $http({ method: 'POST', url: 'data.json', //this is the json file with all the information I use data: $scope.json_data //this contains the modified data }).success(function(response) { addLog("Success message."); }).error(function(response){ addLog("Error message."); }); } I don't want to write a lot of code to handle a request server side (I don't even know if PhoneGap will handle that...), since I honestly don't even know where to start to do that. I don't know if a transformRequest or another simple thing can allow me to save the json file... Any insights on what to do? Should I save the modified .json file with some magic code, or maybe I'm looking at this problem in the wrong way and should go down a different path? Thanks!

http://stackoverflow.com/q/25191580
accepted answer: http://stackoverflow.com/a/25195827
has title: Synchronize Dygraphs where some have a double y-axis?
tagged with: http://stackoverflow.com/tag/csv
score: 0
has body: I have followed the example on: https://groups.google.com/forum/#!topic/dygraphs-users/9RL8-4-e35Y to synchronize 4 dygraphs. Some of these graphs will have multiple time series. However I would like to have the possibility to use two y axis for some graphs to account for the fact that not all data is on the same (y)scale and I don't want too many unnecessary graphs. Is this possible? The code I'm using: &lt;script type="text/javascript"&gt; files = [ "DataFiles/NRTData.csv", "DataFiles/data1.csv", "DataFiles/data1.csv", "DataFiles/data1.csv" ]; gs = []; var blockRedraw = false; for (var i = 1; i &lt;= 4; i++) { gs.push( new Dygraph( document.getElementById("div" + i), files[i - 1], { rollPeriod: 7, //errorBars: true, errorBars: false, drawCallback: function(me, initial) { if (blockRedraw || initial) return; blockRedraw = true; var range = me.xAxisRange(); for (var j = 0; j &lt; 4; j++) { if (gs[j] == me) continue; gs[j].updateOptions( { dateWindow: range } ); } blockRedraw = false; } } ) ); } &lt;/script&gt; I assume I should insert the code below (from another [working] dygraph) somewhere in the code above, however after trying many options I can't get it to work.. labels: [ 'DateTime', 'a', 'b' ], ylabel: 'a ', y2label: ' b ', series : { 'a': { axis: 'y1', errorBars: false, }, 'b': { axis: 'y2' } }, axes: { y: { // set axis-related properties here drawGrid: true, independentTicks: true, axisLabelColor: 'green' }, y2: { // set axis-related properties here labelsKMB: true, drawGrid: true, independentTicks: true, axisLabelColor: 'blue' }, x: { axisLabelFormatter: function(d) { return d.strftime('%Y %m-%d %H'); } }
type: AnsweredQuestion
tagged with: dygraphs
has answer: http://stackoverflow.com/a/25195827
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/47007715
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25130975
has text: @Badmaster all it matters to chartJS that it should have the dataset while initiating. it's upto to you init every minute or every hour in ajax success callback.
type: Comment

http://stackoverflow.com/comment/39205829
type: QuestionComment
has text: http://www.w3.org/wiki/Creating_and_modifying_HTML
comment on: http://stackoverflow.com/q/25179608
score: 0
type: Comment

http://stackoverflow.com/q/25212107
downvote count: 0
score: 1
type: Question
has title: AngularJS Scope and tab directive
accepted answer: http://stackoverflow.com/a/25218782
tagged with: javascript
upvote count: 1
has answer: http://stackoverflow.com/a/25218782
has body: I just can't get how AngularJS scope works. I have an ui-tabs Directive, with a tab controller. This is supposed to handle tabbed content. This tab directive can contains 2 others directive, heading-template Directive, which is the template for the tab heading, and tab-pane Directive, which is the panes to show/hide. The tab directive can have 2 behaviors : if the attr templated is on the element, then we use an empty template, and we will use later the heading-template Directive to generate tabs heading. Else, we use a template which generates ul list with each panes title. The problem is the heading-template Directive : this Directive simply binds the ng-repeat Directive to the template and compiles it. But I can't have access to the scope.panes, which are located in Tab Directive's controller scope. The directive simply don't find them, and I don't understand why. Here's the JSFiddle : http://jsfiddle.net/whitep4nther/mwk9gp9x/ Thank you for your help, I'm turning crazy
answer count: 1
tagged with: scopes
favorite count: 0
tagged with: tabs
tagged with: angularjs
type: AnsweredQuestion

http://stackoverflow.com/q/25214709
has answer: http://stackoverflow.com/a/25214935
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25214935
type: AnsweredQuestion
type: Question
tagged with: angularjs-directive
has body: I'm doing some HTML5 Video to Canvas manipulations. I've made a directive where I need to select a few children elements. I've had no problem doing this until now because I have 2 canvas tags. html: js: //grabs the childrend of the directive for selection e.g. video && canvas tag var el = { video: element.find('video')[0], // how do i select between these two canvas tags properly canvas: element.find('canvas')[0], back: element.find('canvas')[0] }; Also If i try to el.canvas.append(' ) i get a type error Extra code .directive('canvasVideoMap', function($window) { return { link: function(scope, element, attrs) { angular.element(document).ready(function() { //grabs the childrend of the directive for selection e.g. video && canvas tag var el = { video: element.find('video')[0], canvas: element.find('canvas')[0], back: element.find('canvas')[0] }; //tests to see if the video is ready el.video.addEventListener("loadedmetadata", function(){ scope.$emit('load::video'); }, false); //inits the context and sizes var context = el.canvas.getContext('2d'); var cw = Math.floor(el.canvas.clientWidth ); var ch = Math.floor(el.canvas.clientHeight); el.canvas.width = cw; el.canvas.height = ch; //waits for broadcast from mainctrl scope.$on('load::menu', function() { el.video.play(); }); //adds the event listener if the video is playing el.video.addEventListener('play', function(){ draw(this,context,cw,ch); },false); }, false); //the recursive draw loop function draw(v,c,w,h) { if(v.paused || v.ended) return false; c.drawImage(v,0,0,w,h); //creates gradient var grd = c.createLinearGradient(0,0, w,h); //configures gradient fill grd.addColorStop(0,"hsla(268,92%,19%,.9)"); grd.addColorStop(1,"hsla(30,100%,50%,.9)"); //sets gradient c.fillStyle = grd; c.fillRect(0,0,w,h); //sets blending mode of gradient c.globalCompositeOperation = "color"; //recursive loop setTimeout(draw,20,v,c,w,h); } } }; });
tagged with: javascript
score: 0
has title: using Angular's jqlite to select elements of the same type
answer count: 1
tagged with: angularjs

http://stackoverflow.com/a/25169989
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39189671
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25169018
has body: As this is subjective question, I can only show you how we organized our application. Works very well and stuff is easy to find. It is divided by functional area.

http://stackoverflow.com/a/25078587
upvote count: 1
answers question: http://stackoverflow.com/q/25077836
has comment: http://stackoverflow.com/comment/41727333
downvote count: 0
score: 1
type: Answer
has body: use below autofill directive app.directive("autofill", function () { return { require: "ngModel", link: function (scope, element, attrs, ngModel) { scope.$on("autofill:update", function() { ngModel.$setViewValue(element.val()); }); } } });

http://stackoverflow.com/comment/39119690
comment on: http://stackoverflow.com/q/25132278
score: 0
has text: @Tom yes ive used a http server.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25077058
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39017295
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25077518
has body: I want to detect the country selection and store selected option on a cookie during 1 days and when you reload the website before 1 day, the website preferences should load via: $('#country-options')[0].value = getCookie("selectedLanguage"); How do i achieve this? Please advise. following is my .js code. function setCookie(c_name, value, exdays) { var exdate = new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString()); document.cookie = c_name + "=" + c_value; } function getCookie(c_name) { var i, x, y, ARRcookies = document.cookie.split(";"); for (i = 0; i < ARRcookies.length; i++) { x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("=")); y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1); x = x.replace(/^\s+|\s+$/g, ""); if (x == c_name) { return unescape(y); } } } function languageSelected() { //= $('#country-options')[0].value; var languageSelected = $('#country-options').val(); alert(" tt " + languageSelected); var selected = $('#country-options').options[$('#country-options').selectedIndex]; selected.setAttribute("selected", "selected"); var oldselected = $('#country-options').options[0]; oldselected.removeAttribute("selected"); if (languageSelected !== "fr") { setCookie("selectedLanguage", languageSelected, 1); alert("Welcome again " + languageSelected); } else { alert("W " + languageSelected); } //$('#countryform').submit(); } $(document).ready(function() { // --- language dropdown --- // // turn select into dl createDropDown(); var $dropTrigger = $(".dropdown dt a"); var $languageList = $(".dropdown dd ul"); // open and close list when button is clicked $dropTrigger.toggle(function() { $languageList.slideDown(200); $dropTrigger.addClass("active"); }, function() { $languageList.slideUp(200); $(this).removeAttr("class"); }); // close list when anywhere else on the screen is clicked $(document).bind('click', function(e) { var $clicked = $(e.target); if (!$clicked.par…
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39046286
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39015361
has title: change event not working on select list
has answer: http://stackoverflow.com/a/25077518

http://stackoverflow.com/q/25219741
has comment: http://stackoverflow.com/comment/39281396
tagged with: javascript
answer count: 2
linked to: http://stackoverflow.com/q/111102
linked to: http://stackoverflow.com/q/1470488
has answer: http://stackoverflow.com/a/25219778
downvote count: 0
has comment: http://stackoverflow.com/comment/39281627
favorite count: 0
has title: Javascript Scope
tagged with: scope
has comment: http://stackoverflow.com/comment/39284218
type: AnsweredQuestion
has body: This is pretty self explanatory, I don't know why I'm getting the error since process() should be executing, but it's not. function process () { var List = new Array("a","b","c"); } function print () { if (typeof List == undefined) { process(); } var doc = SpreadsheetApp.getActive(); for (var i = 0; i &lt; List.length; i++) { var c = i+1 doc.getRange("A"+c.toString()).setValue(List[i]); } } print(); ERROR: Line 10, List is not defined
accepted answer: http://stackoverflow.com/a/25219778
has answer: http://stackoverflow.com/a/25219763
has comment: http://stackoverflow.com/comment/39281738
score: 1
upvote count: 1
duplicate of: http://stackoverflow.com/q/111102
duplicate of: http://stackoverflow.com/q/1470488
type: Question
possible better answer: http://stackoverflow.com/a/25219763

http://stackoverflow.com/q/25190321
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: backspace
has body: I am trying to use the code below posted by Biff MaGriff for an earlier solution to preventing backspace use that causes the browser to go back a page in history. My issue is that the code will not allow backspace (deletion) of characters in type="number". $(document).keydown(function (e) { var preventKeyPress; if (e.keyCode == 8) { var d = e.srcElement || e.target; switch (d.tagName.toUpperCase()) { case 'TEXTAREA': preventKeyPress = d.readOnly || d.disabled; break; case 'INPUT': preventKeyPress = d.readOnly || d.disabled || (d.attributes["type"] &amp;&amp; $.inArray(d.attributes["type"].value.toLowerCase(), ["radio", "checkbox", "submit", "button"]) &gt;= 0); break; case 'DIV': preventKeyPress = d.readOnly || d.disabled || !(d.attributes["contentEditable"] &amp;&amp; d.attributes["contentEditable"].value == "true"); break; default: preventKeyPress = true; break; } } else preventKeyPress = false; if (preventKeyPress) e.preventDefault(); }); My code is as follows: &lt;input id="tesnprice" type="number" step=0.01 name="price" size="50" maxlength="6" /&gt;
has comment: http://stackoverflow.com/comment/39263188
type: UnansweredQuestion
tagged with: numbers
answer count: 0
has comment: http://stackoverflow.com/comment/39262860
linked to: http://stackoverflow.com/q/1495219
has comment: http://stackoverflow.com/comment/39226522
type: Question
has title: Unable to backspace in input type="number" using Chrome 64bit in Ubuntu 14.04. Works in Firefox
has comment: http://stackoverflow.com/comment/39690698
upvote count: 5
tagged with: javascript
score: 5
tagged with: types

dayofweek
type: Tag
tags question: http://stackoverflow.com/q/25167856
tag name: dayofweek

angularjs-directive
tags question: http://stackoverflow.com/q/25190951
tag name: angularjs-directive
tags question: http://stackoverflow.com/q/25214709
tags question: http://stackoverflow.com/q/25100731
tags question: http://stackoverflow.com/q/25136760
tags question: http://stackoverflow.com/q/25201475
tags question: http://stackoverflow.com/q/25212991
tags question: http://stackoverflow.com/q/25218896
tags question: http://stackoverflow.com/q/25073808
tags question: http://stackoverflow.com/q/25106157
tags question: http://stackoverflow.com/q/25113884
tags question: http://stackoverflow.com/q/25125616
tags question: http://stackoverflow.com/q/25166316
tags question: http://stackoverflow.com/q/25204277
tags question: http://stackoverflow.com/q/25157011
tags question: http://stackoverflow.com/q/25217933
tags question: http://stackoverflow.com/q/25097140
tags question: http://stackoverflow.com/q/25072608
tags question: http://stackoverflow.com/q/25175317
tags question: http://stackoverflow.com/q/25214384
tags question: http://stackoverflow.com/q/25111831
tags question: http://stackoverflow.com/q/25162241
tags question: http://stackoverflow.com/q/25130595
tags question: http://stackoverflow.com/q/25212194
tags question: http://stackoverflow.com/q/25129418
tags question: http://stackoverflow.com/q/25084265
tags question: http://stackoverflow.com/q/25133840
tags question: http://stackoverflow.com/q/25180332
tags question: http://stackoverflow.com/q/25172572
tags question: http://stackoverflow.com/q/25229368
tags question: http://stackoverflow.com/q/25149765
tags question: http://stackoverflow.com/q/25079504
tags question: http://stackoverflow.com/q/25199606
tags question: http://stackoverflow.com/q/25171979
tags question: http://stackoverflow.com/q/25111436
tags question: http://stackoverflow.com/q/25176216
tags question: http://stackoverflow.com/q/25227320
tags question: http://stackoverflow.com/q/25126331
tags question: http://stackoverflow.com/q/25184137
tags question: http://stackoverflow.com/q/25228580
tags question: http://stackoverflow.com/q/25103966
tags question: http://stackoverflow.com/q/25187958
tags question: http://stackoverflow.com/q/25227087
tags question: http://stackoverflow.com/q/25159464
tags question: http://stackoverflow.com/q/25149978
tags question: http://stackoverflow.com/q/25173581
tags question: http://stackoverflow.com/q/25148976
type: Tag
tags question: http://stackoverflow.com/q/25148993
tags question: http://stackoverflow.com/q/25077918
tags question: http://stackoverflow.com/q/25155276
tags question: http://stackoverflow.com/q/25225895
tags question: http://stackoverflow.com/q/25080392
tags question: http://stackoverflow.com/q/25189278
tags question: http://stackoverflow.com/q/25080224
tags question: http://stackoverflow.com/q/25110558
tags question: http://stackoverflow.com/q/25069967
tags question: http://stackoverflow.com/q/25215876
tags question: http://stackoverflow.com/q/25191245
tags question: http://stackoverflow.com/q/25218664
tags question: http://stackoverflow.com/q/25228118
tags question: http://stackoverflow.com/q/25218379
tags question: http://stackoverflow.com/q/25086532
tags question: http://stackoverflow.com/q/25074805
tags question: http://stackoverflow.com/q/25149859
tags question: http://stackoverflow.com/q/25146385
tags question: http://stackoverflow.com/q/25215295
tags question: http://stackoverflow.com/q/25095794
tags question: http://stackoverflow.com/q/25165636
tags question: http://stackoverflow.com/q/25196722
tags question: http://stackoverflow.com/q/25107822
tags question: http://stackoverflow.com/q/25144945
tags question: http://stackoverflow.com/q/25124019
tags question: http://stackoverflow.com/q/25220478

http://stackoverflow.com/comment/39274122
type: AnswerComment
has text: Thanks :) will accept your answer tomorrow if I found no solution.
comment on: http://stackoverflow.com/a/25215747
type: Comment
score: 0

http://stackoverflow.com/comment/117991373
comment on: http://stackoverflow.com/a/54129254
type: AnswerComment
type: Comment
has text: I love your attitude but it just creates a new problem related to some random other character like `|`
score: 1

http://stackoverflow.com/comment/39248497
type: AnswerComment
comment on: http://stackoverflow.com/a/25201846
score: 0
has text: for me blog is not visible and for next tabs it shows previous contents.
type: Comment

http://stackoverflow.com/comment/39007132
has text: a number in quotes is still a number in javascript-landia, I purposefully left out data types in my response. Being pedantic in a weakly typed language about data types seems a little silly to me.
comment on: http://stackoverflow.com/a/25072101
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/25199235
type: Answer
has comment: http://stackoverflow.com/comment/39243181
has comment: http://stackoverflow.com/comment/39242957
answers question: http://stackoverflow.com/q/25199149
has comment: http://stackoverflow.com/comment/39243057
has comment: http://stackoverflow.com/comment/39367674
score: 0
has comment: http://stackoverflow.com/comment/39243243
has body: alert("Dates!!!" + aDates.getDate()+"/"+ (aDates.getMonth()+1)+"/"+ aDates.getFullYear());

http://stackoverflow.com/a/25220882
has body: You'd have to define "really big," and you'd have to test it with your representative data, but the short answer is yes, it's more overhead to use forEach than direct property access, for a couple of reasons: Modern JavaScript engines are pretty smart about objects and can optimize direct property access quite well. To use forEach, you have to make function calls. Function calls are extremely cheap, but they aren't free. In the course of finding the element in the array, you'll be doing various direct property accesses (human.id), so right there you're doing the same work you'd've done with direct access, but you're doing it over and over again. Now, not all objects are equal in terms of property access time. In particular, with a modern engine like V8, if you do something to the object that makes the engine throw away its optimizations and fall back on "dictionary mode" (treating the object like a hash table, instead of doing smarter things), property access on that object will be a lot slower than on one where the optimizations remain in place. One such operation is delete, which causes V8 to put the object in "dictionary mode." Example on jsperf (Firefox's engine, SpiderMonkey, bizarrely shows an improvement with the object delete was used on; perhaps it's so fast it's a measurement error, but I ran it several times with consistent results...) So in theory, if you had a small number of entries in your array, and you built up the array in a way that let the engine optimize it as a true array behind-the-scenes, and the object you would have used instead would have been in "dictionary mode," maybe you might find a use case where forEach was faster. It doesn't seem likely, but it's remotely possible.
type: Answer
answers question: http://stackoverflow.com/q/25220820
accepted answer of: http://stackoverflow.com/q/25220820
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/39283728
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39283747
has comment: http://stackoverflow.com/comment/39283727

http://stackoverflow.com/comment/39145188
type: AnswerComment
has text: Thanks for the detailed answer, you did a good job showing the pros and cons of each one.
comment on: http://stackoverflow.com/a/25146512
type: Comment
score: 1

http://stackoverflow.com/a/25102831
type: Answer
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/25102772
has body: Your for statement is using commas instead of semi-colons. Change it to use ;. for(k=0,k&lt;n,k++){ sum = sum += i; i+=2; k++; }

http://stackoverflow.com/comment/65190863
has text: This barely answers the question though.
comment on: http://stackoverflow.com/a/25225016
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39150041
has text: Tried it and it works, but whats the advantage using your method over simply searching for the div class name in the response body? Performance-wise, isn't this slower?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25122056
type: Comment

http://stackoverflow.com/comment/39272147
comment on: http://stackoverflow.com/q/25214627
has text: How terribly helpful! Seriously though, I get that it has a callback, and I *am* using it. It doesn't address the issue I'm having. Perhaps my question is poorly titled. The problem isn't so much how to wait on asynchronous activity as it is using asynchronous calls and their callbacks in a require (which I'm doing) and having the grunt task wait to begin testing.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25127575
accepted answer: http://stackoverflow.com/a/25454277
has title: How can I add a Dialog containing Form Data in container?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25454277
tagged with: iframe
has comment: http://stackoverflow.com/comment/39207074
tagged with: dojo
type: Question
has body: If I remove my dijit/Dialog i'm able to retrieve the current users and keys. But I would also like to give the user an option to add a new user. So, I implemented a form that would upload the names and a file (I'm using iframe this way because xhr and dojo's iframe just wouldn't do it! *sigh - Basically, it keeps me on this page(AJAX)). I think I'm almost there but need help here. I'm new to fiddle, and for some reason my grids aren't showing: http://jsfiddle.net/ysabz/5WB4M/ USER/KEY ADMINISTRATION Add User! **********Dialog call********************** First Name: Last Name: OK Cancel
has comment: http://stackoverflow.com/comment/39229563
answer count: 1
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39205261
score: 0
comment on: http://stackoverflow.com/q/25179078
type: Comment
type: QuestionComment
has text: http://cyber-x.com.ua/image.jpg - look at that

http://stackoverflow.com/comment/39321520
comment on: http://stackoverflow.com/a/25148372
type: Comment
score: 0
type: AnswerComment
has text: Hi, But hear the values are coming dynamically, so for dynamic values how can i set it????

http://stackoverflow.com/q/25139414
has comment: http://stackoverflow.com/comment/39131999
has comment: http://stackoverflow.com/comment/39131588
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/25139862
has comment: http://stackoverflow.com/comment/39131776
upvote count: 0
tagged with: document-ready
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39131730
favorite count: 0
has comment: http://stackoverflow.com/comment/39131859
has title: Is there any OR condition in Jquery?
has comment: http://stackoverflow.com/comment/39132030
has comment: http://stackoverflow.com/comment/39131694
has comment: http://stackoverflow.com/comment/39131488
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25139862
has comment: http://stackoverflow.com/comment/39131543
has body: I am making a userscript for greasemonkey that changes the links within &lt;a&gt; to some other site links. Currently it is set to fire up if user press ~ (tilde perhaps) on the keyboard. I also want it to work when document is ready. How can I set up two conditions? if document is ready or User press ~ key run the jquery function (change the url). Here is my code $(document).bind('keypress', function(e) { if(e.keyCode==96){ $('a').each(function(){ this.href = this.href.replace('youtube.com/watch?v=', 'ytpak.com/?component=video&amp;task=view&amp;id='); }); } });
downvote count: 1
has comment: http://stackoverflow.com/comment/39131491
type: Question

http://stackoverflow.com/comment/39016288
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25076210
has text: Thank you for your help and time. Tried to implement your function with the fiddle, but it seems to not overwrite values. If you check the fiddle (http://jsfiddle.net/RsB33/2/) with your function, the last entry should be: `color: "red", value: 1, weight: 5, x: 4, y: 4`. But the value is still undefined, any idea why this is?
type: Comment

http://stackoverflow.com/q/25077918
type: Question
tagged with: angularjs-directive
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25078577
answer count: 1
tagged with: angularjs
has body: I am fairly new to AngularJS, and I have the following problem. I have an HTML Element: and a Directive: angular.module('directivesinuse') .directive('arrayOfStrings', function($rootScope) { return { scope: { pahn: '=arrayOfStrings' }, template: ' '+ ' ' replace: true, compile: function compile(tElement, tAttrs, transclude) { return { pre: function preLink(scope, iElem, iAttrs) { }, post: function postLink(scope, iElem, iAttrs) { } }; } }; }); What I want to achieve is, that you enter an array (with objects who have the attribute name) into the HTML Component array-of-strings="dModelTest" . This array gets passed on to the directive, who creates a Select List with all the components out of that array. Everything works fine, but I cant get it to fetch the array from the array-of-strings and create the proper template out of that information. In the webpage it still shows up as: But it should show up as Do you guys have any suggestions for that problem?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25078577
has title: AngularJS Directives: Inserting Attribute values in template

http://stackoverflow.com/a/50554705
downvote count: 0
answers question: http://stackoverflow.com/q/25072069
upvote count: 2
type: Answer
score: 2
has body: None of these worked for me. I figured out a way to export custom Polygons which may be useful for other shapes as well. Here's the key export function: function getPathArray(polygon) { return polygon.getPath().getArray().map(p =&gt; { return { lat: p.lat(), lng: p.lng() } }) } Here's a full example: function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 5, center: { lat: 25.774, lng: -70.190 }, // bermuda triangle }); const bermudaTriangle = new google.maps.Polygon({ paths: [ { lat: 25.774, lng: -80.190 }, { lat: 18.466, lng: -66.118 }, { lat: 32.321, lng: -64.757 }, ], strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35, editable: true, draggable: false }); bermudaTriangle.setMap(map); bermudaTriangle.getPaths().forEach(function (path, index) { google.maps.event.addListener(path, 'insert_at', function () { var data = getPathArray(bermudaTriangle) console.log(JSON.stringify(data)) }) google.maps.event.addListener(path, 'remove_at', function () { var data = getPathArray(bermudaTriangle) console.log(JSON.stringify(data)) }) google.maps.event.addListener(path, 'set_at', function () { var data = getPathArray(bermudaTriangle) console.log(JSON.stringify(data)) }) }) google.maps.event.addListener(bermudaTriangle, 'dragend', function () { console.log("dragged") }) } function getPathArray(polygon) { return polygon.getPath().getArray().map(p =&gt; { return { lat: p.lat(), lng: p.lng() } }) } Then use the json that gets printed to the console and import it bermudaTriangle.setPath(JSON.parse(myJson))

http://stackoverflow.com/q/25226222
tagged with: jquery
has title: Unobtrusive javascript MVC3 validation is not working in IE9, works in IE10, safari
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39293280
has answer: http://stackoverflow.com/a/25226431
type: AnsweredQuestion
score: 1
tagged with: asp.net-mvc-3
upvote count: 1
type: Question
has body: I have a textbox and password control in my login page, below is my view, @Html.TextBoxFor(m =&gt; m.Login) @Html.PasswordFor(m =&gt; m.Password) I have written jquery to validation the above 2 fields, $('#txtLogin').blur(function () { if ($('#txtLogin').val() == '') { $('#LoginError').html("Please enter email address."); return false; } else { return true; } }); $('#txtPassword').blur(function () { if ($('#txtPassword').val() == '') { $('#LoginError').html("Please enter password."); return false; } else { return true; } }); I am wondering why this is not only working in IE9? it works perfectly in IE10 and safari 5.1
accepted answer: http://stackoverflow.com/a/25226431
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25106527
type: Question
answer count: 2
has body: As asked, i have updated the code to my specific issue: function A(){ this.data1 = null; this.data2 = null; } A.prototype.receiveData1AndData2FromServer = function(callback){ this.doneCallback = $.proxy( function foo(importantData, callback){ this.data1 = importantData.data1; this.data2 = importantData.data2; callback != undefined ? callback() : null; }, this, callback); checkFail = $.proxy( function (jqXHR, textStatus, errorThrown) { try { var str = new String(jqXHR.responseText); var result = JSON.parse(str.substring(str.indexOf('{'))); this.doneCallback(result); } catch (ex) { console.log(ex); } } , this); $.ajax({ type: 'POST', url: 'get_data1_and_data2.php', data: { 'id': this.id }, dataType: 'json' }).done(this.doneCallback) .fail(checkFail); } (The problem is that the callback parameter is replacing the first parameter(importantData) instead of the second.) There are calls with different callback parameter to A::receiveData1AndData2FromServer. I want to pass the callback to A::doneCallback, so when the retrieval is done, the right callback will be called.
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25118403
score: 0
possible better answer: http://stackoverflow.com/a/25106984
has comment: http://stackoverflow.com/comment/39070440
has answer: http://stackoverflow.com/a/25106984
tagged with: parameter-passing
type: AnsweredQuestion
has title: How to pass parameters with jquery proxy() to a function which has already other parameters
has answer: http://stackoverflow.com/a/25118403

http://stackoverflow.com/comment/39151768
type: Comment
type: QuestionComment
has text: Can you please add a fiddle? I kinda didn't understand what are you requesting :)
comment on: http://stackoverflow.com/q/25149979
score: 0

http://stackoverflow.com/a/25182768
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25173372
has body: It's because "https://www.google.com/search?#q=" + artist + "+" + title initially has no search results in the content. Google renders the page initially with no results and then dynamically loads the results via JavaScript. Since you are just fetching the HTML of the page and processing it the JavaScript in the HTML never gets executed.
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39221415
has comment: http://stackoverflow.com/comment/39219111
answers question: http://stackoverflow.com/q/25173372

http://stackoverflow.com/q/25180319
has answer: http://stackoverflow.com/a/25180392
has title: hide all duplicate div on page load using jquery/javascript
has answer: http://stackoverflow.com/a/25180716
tagged with: javascript
tagged with: jquery
has body: My page is showing Exception message several times Like this: So, what i want is on page load if this below div is showing more than once then discard other & show only one message at a time... We apologize for the inconvenience,An exception occured,We will solve this issue asap... ×Close so how to hide/remove all duplicates div for showing only one message at a time using jquery?
score: 0
has comment: http://stackoverflow.com/comment/39207889
has comment: http://stackoverflow.com/comment/39207255
has answer: http://stackoverflow.com/a/25180432
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25180376
possible better answer: http://stackoverflow.com/a/25180432
type: Question
has comment: http://stackoverflow.com/comment/39207197
has comment: http://stackoverflow.com/comment/39207025
accepted answer: http://stackoverflow.com/a/25180376

http://stackoverflow.com/comment/45367016
has text: This question gave me one of the most beautiful moments in my life. Through simple usage of `$controllerProvider`, now I can have *self-contained* piece of client-side codes. That is, HTML + JS in one file.
score: 0
comment on: http://stackoverflow.com/q/25168593
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25125667
has answer: http://stackoverflow.com/a/25126024
tagged with: sails.js
score: 1
has title: node.js / backbone.js application load configuration file settings
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: backbone.js
tagged with: node.js
has body: I have a node / backbone / sails project that needs to have deployment specific configuration files loaded. So in the sails portion of the app, I can place a config file in myapp/config/mysettings.js and reference it sails.config.mysettings.foo. This works as expected. But in the backbone portion of the app, I cannot for the life of me figure out how to reference that same file (... are snips for brevity). define([ 'jquery', 'async', ..., **'/config/mysettings.js'** ], function ($, async, ..., **mysettings**) { relevantAjaxFunction: function() { ... **fail**: console.log(mysettings.foo); Produces an undefined message in the console. What's the correct way to reference an application wide settings file like this? I've looked and cannot find anything, which makes me think it's either super obvious or I'm phrasing the question wrong.
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/comment/39148177
type: AnswerComment
has text: jQuery isn't tagged. FYI
type: Comment
comment on: http://stackoverflow.com/a/25148048
score: 1

http://stackoverflow.com/a/25198642
has body: For issue 1, I believe you are trying to "instance" the ASP application class from the WCF service. Like loading the DLL on your own or something that way. Do not do it - it will always make the statics null and sessions null. You need a invert the control here. Create a callback and this thing could work like a charm. Why dont you look at options like SSE (Server Sent Events) ? Probably that can solve the issue you have with your point 2. Post your code if possible.
score: 0
answers question: http://stackoverflow.com/q/25198290
type: Answer
has comment: http://stackoverflow.com/comment/39241903

http://stackoverflow.com/q/25197972
upvote count: 1
has answer: http://stackoverflow.com/a/25201040
type: Question
tagged with: javascript
has title: Require JS(AMD) working under the hood on minification of files in to a single file
answer count: 1
downvote count: 0
has body: Require.js looks like a perfect solution for having a module based code.As it is mentioned in its website it loads the dependencies on demand(So its faster).But when we use their r.js plugin to minify the code base in to single file , it loads the entire combined file. So does that mean it is a normal async load and not on demand load? or will r.js has any optimization technique internally to do this efficiently?
favorite count: 0
tagged with: requirejs
tagged with: r.js
accepted answer: http://stackoverflow.com/a/25201040
type: AnsweredQuestion
score: 1

http://stackoverflow.com/comment/39260965
score: 1
comment on: http://stackoverflow.com/q/25208881
has text: What problem were you having?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25072413
tagged with: php
type: AnsweredQuestion
score: 2
has body: I don't know much of HTML, so when I click on a button say with a value life, when I click on this button, it should go to the next page (which is a contact form) and should select that option from the drop down list. first page &lt;input type="submit" name="type" value="trauma"&gt; second page &lt;select class="form-control" id="type" name="type"&gt; &lt;option value="life" &gt;Life Insurance&lt;/option&gt; &lt;option value="trauma"&gt;Trauma Insurance&lt;/option&gt; &lt;option value="tpd"&gt;Total &amp;amp; Permanent Disability Insurance&lt;/option&gt; &lt;option value="income"&gt;Income Protection Insurance&lt;/option&gt; &lt;option value="redundancy"&gt;Redundancy Insurance&lt;/option&gt; &lt;option value="private"&gt;Private Medical Insurance&lt;/option&gt; &lt;option value="mortgage"&gt;Mortgage Protection Insurance&lt;/option&gt; &lt;option value="health"&gt;Health Insurance&lt;/option&gt; &lt;/select&gt; Can anyone suggest me a server side or a cliet side code? thank you.
tagged with: forms
type: Question
has title: how to submit a value and select that option in next page?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25072514
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
upvote count: 2
accepted answer: http://stackoverflow.com/a/25072514

http://stackoverflow.com/q/25089190
score: 1
has answer: http://stackoverflow.com/a/25089253
accepted answer: http://stackoverflow.com/a/25089253
upvote count: 1
type: Question
tagged with: c#
tagged with: asp.net-mvc
tagged with: javascript
answer count: 1
downvote count: 0
has body: I have read several of the questions here related to this topic and have a working solution, but I don't know how it works and it seems wrong. New to Angular so need some advice. Posting data from an Angular view model to a C# MVC / .net 4.5 controller. The angular method to post $scope.UpdateData = function () { $http({ method: 'POST', url: '/Certification/Configuration/' + certId + '/DisplayCategory/Update', data: $scope.viewModel, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }). success(function (response) { alert("success"); }). error(function (response) { alert("sbf !!!"); }); } And this is the method in the C# controller public JsonResult Update(FormCollection collection) { string postedValue = Request.Form[0].ToString(); DisplayCategoriesViewModel displayCategories; JavaScriptSerializer jss = new JavaScriptSerializer(); displayCategories = jss.Deserialize&lt;DisplayCategoriesViewModel&gt;(postedValue); JsonResult jr = new JsonResult(); jr.Data = "Is SF or UF"; return (jr); } Is there a better way? The magic number Request.Form[0] seems wrong. I have tried just posting the viewModel from the browser with json.stringify but just get null. Any Ideas, suggestions? Update - for those interested here is the working code Angular controller $scope.UpdateData = function () { $http({ method: 'POST', url: '/Certification/Configuration/' + certId + '/DisplayCategory/Update', data: JSON.stringify($scope.viewModel) }). success(function (response) { alert("success"); }). error(function (response) { alert("sbf !!!"); }); } C# Controller public JsonResult Update(DisplayCategoriesViewModel viewModel) { //Do stuff here JsonResult jr = new JsonResult(); jr.Data = "Is SF or UF"; return (jr); }
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
has title: Posting data from Angular https to C# controller

http://stackoverflow.com/comment/39066657
type: QuestionComment
comment on: http://stackoverflow.com/q/25104442
score: 0
has text: @MarcoBonelli I don't really care about size of string, but I don't know how MD5 is going to improve anything. It's most probably slower than `join` Not even speaking about following lookup in the Map that could take longer.
type: Comment

http://stackoverflow.com/comment/66048390
score: 0
type: AnswerComment
type: Comment
has text: No, I guess not. I just tested and diff does not change mmt's original value. I'll edit the answer.
comment on: http://stackoverflow.com/a/25390707

http://stackoverflow.com/q/25161697
has answer: http://stackoverflow.com/a/25161770
accepted answer: http://stackoverflow.com/a/25161770
tagged with: css
type: AnsweredQuestion
has body: I have a CSS marquee that displays values from a DB. After x minutes it refreshes and new data is pulled. The colors change based on their numerical value (if x &lt; 50000 make it red ...etc). My issue is once my setInterval runs the data is updated but the color classes don't get added. Any idea why? I saw this post and changed my remove/add class to a toggle but it was the same issue, the toggle wasn't being called after the initial run. Javascript $(document).ready(function () { setColors(); setInterval(function () { $('.marquee').addClass("paused"); $('.marquee').load('/Home/GetMarquee'); setColors(); $('.marquee').removeClass("paused"); }, 30000); }); function setColors() { $('.totalSales').each(function () { var final = $(this).text(); //removes all the pervious classes $(this).removeClass('ok'); $(this).removeClass('down'); $(this).removeClass('up'); if (final &gt; 100000) { $(this).addClass('up'); } else if (final &lt; 50000) { $(this).addClass('down'); } else { $(this).addClass('ok'); } }); } Razor HTML &lt;div class="marquee"&gt; &lt;span&gt; @for (var i = 0; i &lt; Model.tickerData.Count(); i++) { &lt;span class="totalSales"&gt; @Html.DisplayFor(x =&gt; x.tickerData[i].GroupName): @Html.DisplayFor(x =&gt; x.tickerData[i].Sales)..... &lt;/span&gt; } &lt;/span&gt; &lt;/div&gt; CSS Colors .down { color:#AB2218; } .up { color: #4F692A; } .ok { color:#FABF03; } CSS Marquee .marquee { width: 800px; margin: 0 auto; overflow: hidden; white-space: nowrap; box-sizing: border-box; background-color:black; border: 1px black solid; font-size:50px; -webkit-animation: marquee 30s linear infinite alternate; animation: marquee 30s linear infinite; } .paused { animation-play-state: paused; } .marquee span { display: inline-block; text-indent: 0; } /* Make it move */ @keyframes marquee { 0% { text-indent: 17.5em } 100% { text-indent: -57.5em } } @-webkit-keyframes marquee{ 0% { text-indent: 17.5em } 100% { text-indent: -57.5em } }
has title: setInterval is not adding .addClass
type: Question
linked to: http://stackoverflow.com/q/9099263
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1

http://stackoverflow.com/q/25154009
score: 1
has comment: http://stackoverflow.com/comment/39159432
has body: I am working on ASP.NET Web Forms application. A lot of my information is stored in XML files on the server side. Via Ajax calls I retrieve some of that data for use in the front end. The problem is that sometimes I have to write in the XML file some string, part of which should be recognized as JS code. What I mean is for example this: &lt;Render&gt; &lt;![CDATA[&lt;center&gt;&lt;input type='checkbox' value=" + row[2] + " /&gt;&lt;/center&gt;]]&gt; &lt;/Render&gt; Here I get this piece of data from a place in JavaScript where I have array row and I have index [2] but instead showing me the value of the element with this index the debugger shows me that the checkbox value is literally row[2] (not recognized as array). The way I handle this in JavaScript is: options.mRender = function (data, type, row) { return options.Render; }; where options.Render is the actual string &lt;center&gt;&lt;input type='checkbox' value=" + row[2] + " /&gt;. I made a simple JSFiddle example. The idea is when I write person[0] to get Ivan instead of person[0] which is the result now. I know that if I add eval() like this - $('#appnd').append(eval(txt)); but I can't figure out how to get use of this in my code since I'm passing the whole markup and not only the variable.
has answer: http://stackoverflow.com/a/25154948
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39159305
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25154948
has title: How to mark certain parts of string to be read as code in JavaScript
type: AnsweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39159127

http://stackoverflow.com/comment/39238972
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25197067
has text: Let me rephrase and please have indulgence of morning fatigue - _it will not be implemented_. @Ayaz a probable workaround could be [**THIS**](https://github.com/Jahdrien/FileReader) but otherwise IE9 does not support HTML5 File API, including `FileReader` ..
score: 0

http://stackoverflow.com/q/25150731
has comment: http://stackoverflow.com/comment/39153127
accepted answer: http://stackoverflow.com/a/25193725
type: Question
has body: In my current spring project, after I submit a form, I need reset it. I am doing this with this javascript/jquery code: $('form.form').ajaxForm(function(data) { $('form.form').each(function(){ this.reset(); }); }); The problem with this code is that some forms have inner forms, opened in a popup windows (which source &lt;div&gt; is placed in the same jsp page). In this case, the code above resets both forms. I tried this other code: $('form.form').ajaxForm(function(data) { $(this).each(function(){ this.reset(); }); }); but with this, I get this error: Uncaught TypeError: Object #&lt;Object&gt; has no method 'reset' What's wrong with this second way in comparison with the first one? How I could reset the form then? UPDATE following the instruction from this answer, I try this: jQuery.fn.reset = function () { $(this).each (function() { this.reset(); }); }; $('form.form').ajaxForm(function(data) { $(this).reset(); }); but still it's happening the same. UPDATE 2 At last, I try this code: $('form.form').ajaxForm(function(data) { var nome = $('form.form').attr('id'); if(data == '') $('#yes').css('display', 'block'); else $('#not').css('display', 'block'); $('#'+nome).each(function(){ this.reset(); }); }); which reset only the main form (the first one to be opened). I wonder if there is a solution to reference the last opened form (the one opened inside the jquery-ui dialog &lt;div&gt;).
has comment: http://stackoverflow.com/comment/39164727
tagged with: jquery-forms-plugin
has title: Error when I tried to reset an html form
possible better answer: http://stackoverflow.com/a/25151340
linked to: http://stackoverflow.com/q/16452699
has comment: http://stackoverflow.com/comment/39153028
tagged with: javascript
has answer: http://stackoverflow.com/a/25193725
has comment: http://stackoverflow.com/comment/39153156
score: 0
has comment: http://stackoverflow.com/comment/39153450
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/39164771
has comment: http://stackoverflow.com/comment/39153591
linked to: http://stackoverflow.com/q/25172979
has answer: http://stackoverflow.com/a/25151340
has comment: http://stackoverflow.com/comment/39153242
type: AnsweredQuestion

http://stackoverflow.com/comment/39327302
comment on: http://stackoverflow.com/a/25206984
score: 0
type: AnswerComment
has text: Per's correct. The id: syntax will not work in a Script Library, because it cannot identify the context it's running in. That's why you're getting "dlg is undefined". If the SSJS is written directly on an XPage / Custom Control, you'll have a much longer dialog name rather than dlg, including some "id_" bits
type: Comment

http://stackoverflow.com/q/25095602
has comment: http://stackoverflow.com/comment/39073040
has title: What i am doing wrong when calculate scene bounding sphere in three.js?
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39103785
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39072404
has comment: http://stackoverflow.com/comment/39074662
tagged with: three.js
has comment: http://stackoverflow.com/comment/39104135
has body: I am trying to fit the scene in to view. I write function to compute scene bounding sphere and then change camera distance to fit it … and see nothing. I just can't find out where I am wrong. @getRadius = (model, distance)=&gt; if typeof model.geometry != "undefined" model.updateMatrixWorld true model.matrixWorldNeedsUpdate = true model.geometry.computeBoundingSphere true sphere = model.geometry.boundingSphere distance = Math.max(model.position.distanceTo(new THREE.Vector3(0,0,0))+sphere.center.distanceTo(new THREE.Vector3(0,0,0))+sphere.radius, distance) for element in model.children distance = Math.max(@getRadius(element, distance), distance) return distance @fitToView = (model)=&gt; radius = @getRadius @scene, 0, 0 @camera.position.z = radius/Math.tan((22.5*Math.PI)/180) @camera.updateProjectionMatrix() Model is loaded correctly and showing … before I try to "fit it to the View". You may see example here: http://dresser.websaints.net/wig/preview/5/ Help me find out what I am doing wrong. With all best regards. Anton. P.S. and yes, I definitely google this and use stackoverflow search. And read all this topics. I know how to do it. Problem is I can't find out why it don't work like it should.
has comment: http://stackoverflow.com/comment/39103642
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
tagged with: bounding-box

http://stackoverflow.com/comment/39232683
comment on: http://stackoverflow.com/a/25193764
has text: `this.name` won't work, either, because `this` isn't saved in the closure.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25225182
has answer: http://stackoverflow.com/a/25225271
has comment: http://stackoverflow.com/comment/39291313
has answer: http://stackoverflow.com/a/25225230
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25225230
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25225271
has title: Connecting an HTML button with Javascript object data
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I'm trying to build a searchable database that will allow a user to type in the name of a state and see a small subset of that state's laws (traffic laws, age of consent, conceal and carry laws, etc.). I'm getting confused on how a user submitted string will interact with my Javascript objects. I have seen people submitting questions regarding adding user-submitted integers or concatenating but what I am trying to do is slightly different. I am able to assign the user-submitted text as a variable via the getElementById method but now I'm lost. My question is this: How do I connect that user submitted variable with my objects' key values in Javascript so that when a user types in "Minnesota" and clicks the find button it retrieves and displays my Javascript data (which is information about Minnesota's state laws stored as object keys)? Here is a subset of the HTML in question: And here is the Javascript with just one object for simplicity: var Minnesota = { name: "Minnesota", consent: 18, openBottle: true, deathPen: false, conceal: "Conceal & Carry", txtDriveBan: true, talkDriveBan: false } $(document).ready(function() { $("#submit").on('click', function(){ var State = document.getElementById("#search"); //At this point, what do I write to display Minnesota's information stored in the object?// }); }); Thanks very much for any help!
score: 2
upvote count: 2

http://stackoverflow.com/comment/39171118
type: QuestionComment
has text: i am getting the data from the database and storing it through php array
comment on: http://stackoverflow.com/q/25160781
score: 0
type: Comment

http://stackoverflow.com/comment/39275410
type: Comment
type: QuestionComment
has text: Also, you're doing `document.body.appendChild(ogImg);`, but `ogImg` is already in the DOM, why do you need to append it ?
score: 2
comment on: http://stackoverflow.com/q/25216460

http://stackoverflow.com/a/25206373
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25206242
has comment: http://stackoverflow.com/comment/39256835
type: Answer
has body: $("form:eq(1) :input[type!='hidden']").first().focus(); FIDDLE Don't use the attributes selector with ID's, just using the ID selector is much faster. You can use the :input selector, it selects all input elements, like input, textarea, select and button. Then use either :first or first() to get the first one. EDIT: based on the comment, the ID is not constant, so using the tagName and :eq() you can select the second form, and as :eq() is zero based, the second one would be 1
score: 4
has comment: http://stackoverflow.com/comment/39256776
upvote count: 4
answers question: http://stackoverflow.com/q/25206242

http://stackoverflow.com/comment/39213155
type: Comment
has text: You are using jQuery Mobile in your project. Have you considered using JQM's Range Slider widget? http://api.jquerymobile.com/rangeslider/ Or you're required to use nstslider widget in your project?
comment on: http://stackoverflow.com/q/25182943
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39101062
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25122835
has text: That’s not an Array, that’s an object … http://stackoverflow.com/a/19837961/1427878

http://stackoverflow.com/comment/39068878
comment on: http://stackoverflow.com/a/25102619
type: Comment
type: AnswerComment
has text: @user2357112 Yes the correct way to specify your desired ordering by composing the concept of "lexicographically-ordered tuples" with the concept of a tuple-element-specific "reverseorder" flag. However you end up implementing "reverseorder" will be cleaner than any attempt that begins with the clunky comparator abstraction.
score: 0

http://stackoverflow.com/comment/39298876
has text: You must use manual $scope.$apply when you are into an external callback that does not refer or use angular, like a gmap callback. To be able to apply changes into the $scope process, you should call $apply when done. In most of other case, manually call it is a bad solution, and must alert you on a sadly bad coded feature.
type: QuestionComment
comment on: http://stackoverflow.com/q/25228991
score: 0
type: Comment

http://stackoverflow.com/q/25192396
accepted answer: http://stackoverflow.com/a/25192510
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25192510
tagged with: three.js
type: AnsweredQuestion
type: Question
has title: Silly Javascript and ThreeJs issue
has body: This is probably something stupid but it's got me stuck. The first three.js function 'loadTexture' isn't being found Uncaught ReferenceError: loadTexture is not defined Here is the HTML Beek in Three.js And the Javascript var camera, scene, renderer; var texture_placeholder, isUserInteracting = false, onMouseDownMouseX = 0, onMouseDownMouseY = 0, lon = 90, onMouseDownLon = 0, lat = 0, onMouseDownLat = 0, phi = 0, theta = 0, target = new THREE.Vector3(); var jsonpPrefix= 'https://gms.beek.co'; var cdnPrefix= 'http://cdn.beek.co'; var guide = 66; varscene = 27; init(); //initBeek(); animate(); function init() { var container, mesh; container = document.getElementById( 'container' ); camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 1, 1100 ); scene = new THREE.Scene(); texture_placeholder = document.createElement( 'canvas' ); texture_placeholder.width = 128; texture_placeholder.height = 128; var context = texture_placeholder.getContext( '2d' ); context.fillStyle = 'rgb( 200, 200, 200 )'; context.fillRect( 0, 0, texture_placeholder.width, texture_placeholder.height ); var materials = [ loadTexture( 'http://cdn.beek.co/scene_27_pano_4_r/9/0_0.jpg' ), // right loadTexture( 'http://cdn.beek.co/scene_27_pano_4_l/9/0_0.jpg' ), // left loadTexture( 'http://cdn.beek.co/scene_27_pano_4_u/9/0_0.jpg' ), // top loadTexture( 'http://cdn.beek.co/scene_27_pano_4_d/9/0_0.jpg' ), // bottom loadTexture( 'http://cdn.beek.co/scene_27_pano_4_b/9/0_0.jpg' ), // back loadTexture( 'http://cdn.beek.co/scene_27_pano_4_f/9/0_0.jpg' ) // front ]; mesh = new THREE.Mesh( new THREE.BoxGeometry( 300, 300, 300, 7, 7, 7 ), new THREE.MeshFaceMaterial( materials ) ); mesh.scale.x = - 1; scene.add( mesh ); renderer = new THREE.CanvasRenderer(); renderer.setSize( window.innerWidth, window.innerHeight ); container.appendChild( renderer.domElement ); document.addEventListener( 'mousedown', onDocumentMouseDown, false ); document.addEventListener( 'mousemove', onDocumentMouseMo…
tagged with: javascript

http://stackoverflow.com/q/25140543
has comment: http://stackoverflow.com/comment/39134315
tagged with: css
downvote count: 4
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39133634
has comment: http://stackoverflow.com/comment/39133838
type: Question
has title: How to make my website view in mobile as small in size fit to mobile screen
has answer: http://stackoverflow.com/a/25140773
score: -2
linked to: http://stackoverflow.com/q/14566848
has answer: http://stackoverflow.com/a/25140663
upvote count: 2
answer count: 2
tagged with: javascript
has body: I have already build my website which works fine in laptop or in PC , but when I type URL in mobile i am not getting the reduced size website . I have to do scrolling view all the part of the screen.. I want my website to be in reduced size when opens in mobile or i pads, tablets etc. I have only 1 day remaining to submit my program .Please help me in finding the solutions.
has comment: http://stackoverflow.com/comment/39133776
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25179299
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/25178768
has comment: http://stackoverflow.com/comment/39211470
has comment: http://stackoverflow.com/comment/39206841
type: Answer
has comment: http://stackoverflow.com/comment/39205765
has comment: http://stackoverflow.com/comment/46720337
has body: chrome.webstore.install function accept 2 callback parameters, which means 2 pointers to function. You should not call those functions yourself, but just pass in their names, like this: chrome.webstore.install('https://chrome.google.com/webstore/detail/...', successCallback, failureCallback); Instead of this: chrome.webstore.install('https://chrome.google.com/webstore/detail/...', successCallback(), failureCallback()); Do you see the difference ? If you don't, have a look on this page which explains it well (and there's also this on 7 common JavaScript mistakes)
upvote count: 4
answers question: http://stackoverflow.com/q/25178768
type: AcceptedAnswer

http://stackoverflow.com/q/25220952
has comment: http://stackoverflow.com/comment/39284618
has comment: http://stackoverflow.com/comment/39284400
has comment: http://stackoverflow.com/comment/39284575
has comment: http://stackoverflow.com/comment/39284663
tagged with: post
type: Question
has comment: http://stackoverflow.com/comment/39298646
has comment: http://stackoverflow.com/comment/39284541
has comment: http://stackoverflow.com/comment/39284585
tagged with: javascript
score: 0
tagged with: xmlhttprequest
has comment: http://stackoverflow.com/comment/39284334
has title: Server not getting POST method body from XmlHttpRequest
has body: I have a client side JavaScript code, sending commands to a server using the XmlHttpRequest() POST method. The client side code is: var serverURL = "http://myserver.com:3000" function sendCommand(command, argsForCommand) { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = recvResponse; xhr.open("POST", (serverURL + "/" + command), true); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.send(argsForCommand); } The server expects the POST message in the form: POST HTTP/1.1 ....HTTP headers.... ....HTTP headers.... argsForCommand i.e. the command that the server must execute is part of the POST line and the arguments (which may be short or long) are in the body of the message. The server is one that I have written myself and have tested with another client, so I know the server side is working. The server listens on a non-standard port (3000 in this example) for connections from clients. My problem is that after my code calls the sendCommand() function, I get the POST message at the server only until the HTTP headers; I do not get the arguments (the POST message body). If I refresh the client page in which the code executes, the arguments appear at the server. Any help on what I could be missing is greatly appreciated.
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39290946

http://stackoverflow.com/q/25187087
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25187356
tagged with: javascript
answer count: 3
score: 2
possible better answer: http://stackoverflow.com/a/25187356
has title: On click myFunction and wait until it is finished
downvote count: 0
has answer: http://stackoverflow.com/a/25187321
has answer: http://stackoverflow.com/a/25188323
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25187321
has body: I thought this is something easy to do but I dont find anything helping me out of this. I have a function (function($){ myFunction = function(e){ e.preventDefault(); // do stuff // load ajax content // animate and show } $('.button').on( 'click', myFunction); })(jQuery); now this works but I need to know, wait untill everything is done if someone presses many .buttons in a short time cause there are a few elements with class button I've tried with promise() $('.button').on( 'click', function(){ $.when( myFunction() ).done(function() { alert('finished') }); }); but that gives me an error e is undefined and $('.button').on( 'click', myFunction).promise().done(function() { alert('finisehd'); }); anyone knowing what I'm doing wrong and how I could do it to get it to work?
upvote count: 2
type: Question

http://stackoverflow.com/q/25153396
downvote count: 0
possible better answer: http://stackoverflow.com/a/30006323
tagged with: localization
has answer: http://stackoverflow.com/a/30006323
type: Question
upvote count: 2
answer count: 2
tagged with: locale
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25153571
has comment: http://stackoverflow.com/comment/39157916
has title: GWT I18N javascript issue for property 'locale'
has answer: http://stackoverflow.com/a/25153571
favorite count: 0
has comment: http://stackoverflow.com/comment/39158024
tagged with: internationalization
tagged with: gwt
type: AnsweredQuestion
score: 2
has body: I am having the following error when loading my GWT project (while trying to get the locale working...): Error while executing the JavaScript provider for property 'locale' com.google.gwt.core.client.JavaScriptException: (TypeError) __gwt_getProperty([string: 'locale']): undefined is not a function at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:284) I followed these instructions: First in the module file: &lt;inherits name="com.google.gwt.i18n.I18N"/&gt; &lt;extend-property name="locale" values="en" /&gt; &lt;extend-property name="locale" values="zh" /&gt; &lt;set-property-fallback name="locale" value="en" /&gt; &lt;set-configuration-property name="locale.useragent" value="Y" /&gt; Also created a basic Constants class as follow: import com.google.gwt.i18n.client.Constants; public interface LocaleConstants extends Constants { @Key("locale.name") String localeName(); @Key("locale.code") String localeCode(); @DefaultStringValue("Hello") String hello(); [...] with corresponding properties files like 'LocaleConstants_en.properties': locale.name=English locale.code=en hello=Hi I tried a new project from scratch and it works well. I can't figure out what is causing issue in my existing project. Any clue? Thanks!

http://stackoverflow.com/a/25227158
upvote count: 0
has comment: http://stackoverflow.com/comment/39295280
downvote count: 1
has comment: http://stackoverflow.com/comment/39295065
accepted answer of: http://stackoverflow.com/q/25227032
answers question: http://stackoverflow.com/q/25227032
has body: i have created jsfiddle for you.. code:- working example:- http://jsfiddle.net/dwxmjkb3/8/ i think you were missing from the code see this.. thanks
score: -1
has comment: http://stackoverflow.com/comment/39295194
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39295126
has comment: http://stackoverflow.com/comment/39295354
has comment: http://stackoverflow.com/comment/39295240
type: Answer
has comment: http://stackoverflow.com/comment/39295097

http://stackoverflow.com/q/25163533
tagged with: angularjs-ng-repeat
has answer: http://stackoverflow.com/a/25163662
has answer: http://stackoverflow.com/a/25163661
has title: How to print a string array which is part of a JSON consists of other attributes
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25163609
tagged with: http://stackoverflow.com/tag/json
has body: in the client side, I have a json object which I receive from REST service somewhere. This object has more that one attribute, one of them is a String array. I want some assistance on how to print this array using angular JS code embedded within html. this is my JSON object: [ "title": "Developing a System for Information Management in Disaster Relief", "url": "http://scholar.google.com/scholar", "relatedTitles": [ "Distributed robotic sensor networks", "Improving information access for emergency", "Tangible and wearable user interfaces for", "Non-parametric inferenc", "Airborne near-real-time monitoring of assembly" ] ] and here is how the html ng-repeat looks like. &lt;tr ng-repeat="publication in publications"&gt; &lt;td&gt;{{publication.title}}&lt;/td&gt; &lt;td&gt;{{publication.url}}&lt;/td&gt; &lt;td&gt;{{publication.relatedTitles}} &lt;/tr&gt; Note:"publications" is the JSON object name
answer count: 3
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25163661
score: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25163609

http://stackoverflow.com/q/25117604
has body: for a while I used tagsinput for Bootstrap 3 and it worked ok. Now I changed to select2 and it is quite easy and very good. I've got only two little question and I hope you will help me -- I'm not very sure in dealing with javascript. prerequisites: select2 is working, using ajax with json-response. select2 used for tags-input. 1. When the user sends the form, the new words he entered are sended that way, the words he selected from the ajax-response are sended by their id. What I need is, that all entered and selected words are sent as words (no IDs). Where do I need to change that in the script? I tried: results: function (data) { return { results: data }; } to results: function (data) { return { results: data.text }; } But this broke the search-functionality. 2. Second problem may be same. When the user refreshes the form, the new words he entered are shown, but the one he selected from the ajax-request are only displayed by their ID. $(document).ready(function () { $('#keywords').select2({ tags: true, tokenSeparators: ["\n"], createSearchChoice: function (term) { return { id: term, text: term }; }, ajax: { url: "/slipbox/entities/jsonKeywords", dataType: 'json', data: function (term) { return { q: term }; }, results: function (data) { return { results: data }; } }, initSelection: function (element, callback) { var data = []; function splitVal(string, separator) { var val, i, l; if (string === null || string.length &lt; 1) return []; val = string.split(separator); for (i = 0, l = val.length; i &lt; l; i = i + 1) val[i] = $.trim(val[i]); return val; } $(splitVal(element.val(), ",")).each(function () { data.push({ id: this, text: this }); }); callback(data); } }); }); Thank you a lot and best wishes Aljoscha
type: Question
has answer: http://stackoverflow.com/a/26999863
upvote count: 1
answer count: 1
tagged with: javascript
type: UnansweredQuestion
tagged with: forms
tagged with: http-post
has title: JQuery-Select2 - Manipulate the sended http-post data to send the text not the IDs
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: jquery-select2

http://stackoverflow.com/comment/39050129
comment on: http://stackoverflow.com/q/25095342
score: 0
type: Comment
type: QuestionComment
has text: Watch Top Notch 80's Hong Kong Trailer When click on this link, a popup lightbox and play the video instead of changing the browser's URL. I don't know what function is called.

http://stackoverflow.com/a/25070661
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Here's an explanation of what's happening: When you wrap code in a function, you get what's called function scope. This means that the scope within the function belongs to the function and not to a scope above or outside of it (whichever way you want to look at it). A closure allows an expression (typically, a function, as MDN states) to have it's own scope while sharing the scope of it's outer or higher scope. So, let's look at an example: // This represents the global, or window, scope. // Analogous to window.outer_var. var outer_var = 'outer var'; function outer_func() { // New scope! Local only to outer_func and those // expressions (functions) *enclosed* by // `outer_func(){...}, e.g. inner_func(){...}. var inner_var = 'inner var'; // Only outer_func() or inner-enclosed (to // inner_func()'s definition) functions can // access inner_func(). function inner_func() { // Another new scope! Can access inner_var // and inner_func_var (below). outer_func() // canNOT access inner_func_var, though. var inner_func_var = 'inner func var'; } } outer_func(); // Of course, it's in scope and accessible. inner_func(); // This will cause ReferenceError: inner_func is not defined error. Simply as it is (no wrapping context, with a closure), var outer_var is created with the global or window scope. It may be accessed in all of the following: console(window.outer_var); function outer_func() {console.log(outer_var);} function inner_func() {console.log(outer_var);} No matter where inner_func's defined. Here, #2/3 are analogous to: function outer_func() {console.log(window.outer_var);} function inner_func() {console.log(window.outer_var);} Or global this: function outer_func() {console.log(this.outer_var);} function inner_func() {console.log(this.outer_var);} Now, inner_var is accessible from the following: function outer_func() {console.log(inner_var);} function inner_func() {console.log(outer_var);} Only from within outer_func(). inner_func() may also only be accessed within outer_…
answers question: http://stackoverflow.com/q/25069744

http://stackoverflow.com/a/25159700
has body: It's better to envelop your questions (that needs to be hidden) by a div with a class ".hidden" or style "display: none;". And simplify your code by simply asking that div to show() or hide() when needed. Like so: Do you agree to answer the screening questions? Yes, I consent No, I do not consent What is today's date? How did you hear about us/our studies? Flyers Print Media A friend Online (e.g., Craigslist) Other Please specify other source. What is your first name? What is a phone number at which you can be contacted? If we call and you are not available, may we leave a message? Yes No What is an e-mail at which you can be contacted? and in your javascript instead of using this: function showConsent(){ $("#date").show(), $("#referrer").show(), $("#f_name").show(), $("#phone_num").show(), $("#leave_msg").show(), $("#email").show(), }; you use: function showConsent(){ $("#questions").show(), };
upvote count: 1
has comment: http://stackoverflow.com/comment/39169233
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25159204

http://stackoverflow.com/comment/39187963
comment on: http://stackoverflow.com/a/25169566
score: 0
type: Comment
has text: Sorry Josue had miss-read the question corrected it 40 secs before you commented but you mustn't have seen the update
type: AnswerComment

http://stackoverflow.com/comment/39249103
comment on: http://stackoverflow.com/a/25202765
has text: @RevanProdigalKnight: Only if there're no `+` inside the `[ ]`
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39245456
has text: are you using IE? there is some note that Coundown is not compatible with IE
comment on: http://stackoverflow.com/q/25200361
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39222889
type: Comment
has text: going to try this in my actual application to see if works, what is supposed to happen is I clone the fileupload control, appending that to a new form in an iframe, reset the fileupload control from which the clone was taken for reuse, then I post the iframe to upload the file.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25187799

http://stackoverflow.com/comment/39081788
has text: Do you want to call the submit button event in focusout event??then you can add below given line to your "focusout" method. $("#idOfSubmitButton").trigger("click");
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25112497

http://stackoverflow.com/a/25099448
downvote count: 0
has comment: http://stackoverflow.com/comment/39066169
accepted answer of: http://stackoverflow.com/q/25071105
answers question: http://stackoverflow.com/q/25071105
type: AcceptedAnswer
has body: i had the same issue. I put the "font-awesome.min.css" file directly in my cordova ios xcode and than i called it in the "index.html" file, with: &lt;link rel="stylesheet" href="css/font-awesome.min.css"&gt; after that i try to use the font awesome spinner instead the default jQuery Modile preloader, with this code even in "index.html" before jQuery Mobile call: &lt;script&gt; $(document).bind( 'mobileinit', function(){ $.mobile.loader.prototype.options.text = "loading"; $.mobile.loader.prototype.options.textVisible = true; $.mobile.loader.prototype.options.theme = "p"; $.mobile.loader.prototype.options.textonly = false; $.mobile.loader.prototype.options.html = "&lt;span class='ui-bar ui-overlay-c ui-corner-all'&gt;&lt;i class='fa fa-spinner fa-spin fa-5x' style='color:#000;'&gt;&lt;/i&gt;&lt;/span&gt;"; }); &lt;/script&gt; The result is the same a rotate square, Where i'm wrong?
upvote count: 3
type: Answer
score: 3

http://stackoverflow.com/comment/39069065
has text: @user2864740 My original question is what's the best approach for specifying a desired order relation on an array of elements in code. If you don't agree that keyfuncs are strictly superior to comparators, all you have to do is show the code for a single realistic counterexample. Your current answer, especially the incorrect (imprecise at best) statement about comparators being more "universal and flexible" and the mention of the rock-paper-scissors (which falls outside the documented intended behavior of array-sort functions because it's not a valid ordering relation) aren't helpful.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25102619
type: AnswerComment

http://stackoverflow.com/comment/39245661
type: Comment
comment on: http://stackoverflow.com/a/25197244
has text: You are right, in fact, that I forgot the assignment led to abnormal results, sorry.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39041016
has text: @GustavoPinent Capturing and Bubbling are just representing the direction of the event propagation, they have nothing to do with this kind of problem...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25087597

http://stackoverflow.com/comment/39276633
type: Comment
comment on: http://stackoverflow.com/a/25198001
has text: still haning on ASP.NET code that returns json-array and load it into javascript..
score: 0
type: AnswerComment

http://stackoverflow.com/a/25161570
answers question: http://stackoverflow.com/q/25161389
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39172929
has body: Because you're running an app and not an actual browser, the same domain policy doesn't apply. I had to specify inside the config.xml any URLs I wanted to access with the app. <access origin="http://127.0.0.1*"/> <access origin="https://mydomain.com" subdomains="true" /> http://cordova.apache.org/docs/en/3.1.0/guide_appdev_whitelist_index.md.html

http://stackoverflow.com/comment/71756595
score: 0
type: AnswerComment
has text: doesnt work on Firefox though ;)
comment on: http://stackoverflow.com/a/40852544
type: Comment

youtube-javascript-api
type: Tag
tags question: http://stackoverflow.com/q/25150423
tag name: youtube-javascript-api
tags question: http://stackoverflow.com/q/25211001
tags question: http://stackoverflow.com/q/25164795

http://stackoverflow.com/a/25193849
accepted answer of: http://stackoverflow.com/q/25193726
answers question: http://stackoverflow.com/q/25193726
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39233195
score: 2
has comment: http://stackoverflow.com/comment/39233499
has body: Using regular expressions: function isEmail (s) { var isEmail_re = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/; return String(s).search (isEmail_re) != -1; } function isPhoneNumber (s) { var isPhoneNumber_re = /^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/; return String(s).search (isPhoneNumber_re) != -1; } Your validate function would then be like this: function validate () { var input = $(this).find('#contactPhoneEmail').val(); return isEmail(input) || isPhoneNumber(input); }
downvote count: 0
has comment: http://stackoverflow.com/comment/39259708
has comment: http://stackoverflow.com/comment/39233280
has comment: http://stackoverflow.com/comment/39233339
upvote count: 2

http://stackoverflow.com/comment/39079423
has text: Are you using any other javascript frameworks or libraries, or have any other custom scripts? Some libraries (Prototype.js in particular) modify base javascript object prototypes in ways that make them incompatible with the Visualization API.
comment on: http://stackoverflow.com/a/25096535
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25152098
downvote count: 0
upvote count: 2
has body: You should write var elm = getElementById('e'); instead of var elm = $(e); Try it yourself: http://jsfiddle.net/h45A5/3/
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25152070
has comment: http://stackoverflow.com/comment/39155612

http://stackoverflow.com/a/25088895
accepted answer of: http://stackoverflow.com/q/25087829
has comment: http://stackoverflow.com/comment/39052804
has body: It's because of this code chrome.extension.onMessage.addListener(function (message, sender, sendResponse) { if (message.url) { chrome.contextMenus.onClicked.addListener(function testFunc2(info, tab){ alert(message.url); alert(typeof message.contents); } ) } }); What you are saying is that every onMessage event add a listener for onClicked events. So if you send three messages you end up with three testFunc2 methods acting on onClicked events. Since you are trying to use information from two different asynchronous events. You will have to store one of them temporarily. Something like this would probably work. var lastMessage; chrome.extension.onMessage.addListener(function(message, sender, sendResponse) { if (message.url) { lastMessage = message; } else { lastMessage = undefined; } }); chrome.contextMenus.onClicked.addListener(function(info, tab) { if(lastMessage !== undefined) { testFunc2(message, info, tab); } }); function testFunc2(info, tab){ alert(message.url); alert(typeof message.contents); // cleanup lastMessage = undefined; });
answers question: http://stackoverflow.com/q/25087829
upvote count: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39038238
score: 2

http://stackoverflow.com/comment/39067943
type: QuestionComment
has text: @undefined: `a#cityId` will only return 0 or 1 results, so `:eq(2)` is always going to be unsatisfied, so `a#cityId:eq(2)` is a pointless selector, it will never match anything **in a valid document**. Using the same `id` on more than one element results in an **invalid** document. The behavior of a selector engine on invalid documents is undefined. It could throw an error, it could return just the first, it could return just the last, or it could return all of them. It's undefined. (No pun!)
score: 1
comment on: http://stackoverflow.com/q/25105094
type: Comment

if-statement
tags question: http://stackoverflow.com/q/25101936
tags question: http://stackoverflow.com/q/25108720
tags question: http://stackoverflow.com/q/25072516
tag name: if-statement
type: Tag
tags question: http://stackoverflow.com/q/25097516
tags question: http://stackoverflow.com/q/25175559
tags question: http://stackoverflow.com/q/25151358
tags question: http://stackoverflow.com/q/25224729
tags question: http://stackoverflow.com/q/25084370
tags question: http://stackoverflow.com/q/25140266
tags question: http://stackoverflow.com/q/25128413
tags question: http://stackoverflow.com/q/25170362
tags question: http://stackoverflow.com/q/25150634

http://stackoverflow.com/q/25127247
tagged with: javascript
has title: How to load data from external file in array
tagged with: variables
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25127367
has answer: http://stackoverflow.com/a/25127312
score: 2
has comment: http://stackoverflow.com/comment/39109514
has body: Having tried a whole day loading data from a file using jquery, I did not succeed. In a javascript I defined an array of values as a global variable, it will be used in a following function. The variable looks like this: var Yvalue01 = [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6] However, I would like to load these values from a text file on the server that has the following content: 7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6 How can I do this in javascript (no php)?
tagged with: file
type: Question
answer count: 2
tagged with: arrays
downvote count: 0

http://stackoverflow.com/comment/39029219
has text: Why would I have to compile the html? The ng-click is added to the li element, not to the contents of it?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25084299
type: AnswerComment

http://stackoverflow.com/comment/39035269
score: 0
has text: When I do this, and console.log the exclude attribute on the scope, it works, but it breaks the `startFrom` filter. I have no idea why.
type: Comment
comment on: http://stackoverflow.com/a/25085609
type: AnswerComment

http://stackoverflow.com/q/25185370
has body: I have an Angular treeview directive I'm working on that doesn't include jQuery. I'm using TweenMax to open and close the branches of the tree. It seems that TweenMax only works with id's. I can only open and close the top branch right now with the id "list". I have multiple branches I need to target and I dont have jQuery to help with classes. Is there a work around for this? Here is the link to my code in CodePen.io Here is the directive: var tree = angular.module('treeview',[]); tree.directive('treeView',function(){ return{ restrict: 'AE', link:function (scope,elem,attrs){ var list = TweenMax.from("#list",0.5,{height:0,paused:true,reversed:true}); function toggle(){ // e.preventDefault(); if (list.reversed()) { list.play(); } else { list.reverse(); } } elem.on('click',function(e){ toggle(); e.stopPropagation(); }); } } });
tagged with: gsap
favorite count: 0
has answer: http://stackoverflow.com/a/25535385
tagged with: angularjs
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25535385
has title: Using TweenMax on multiple elements
upvote count: 1
answer count: 1

http://stackoverflow.com/q/25229924
answer count: 1
tagged with: javascript
score: 0
tagged with: google-chrome-extension
has body: I am tring to open a new popup url in chrome extension pop up on the onclick event of a button. In my case I have a page which will display two buttons on startup. This has been set in the useropt.html page useropt.html Sign In Sign Up The JS file usnmanager.js has js code which has code to open a new popurl url in the popup window on the onlick event of the buttons above. usnmanager.js function btn_clicked(tgtUrl) { if(tgtUrl == "signin") { var manager_url = "signin.html"; chrome.tabs.query( { currentWindow: true, active : true }, function(openselection) { chrome.browserAction.setPopup({ popup: manager_url }); }); } else if(tgtUrl = "signup") { var manager_url = "signup.html"; chrome.tabs.query( { currentWindow: true, active : true }, function(openselection) { chrome.browserAction.setPopup({ popup: manager_url }); }); } } document.addEventListener("click", function() { document.querySelector('#signin').addEventListener('click', btn_clicked('signin')); document.querySelector('#signup').addEventListener('click', btn_clicked('signup')); }); But when I am clicking either of the button the popup window is not loading the new popup page as set. Please let me know what have I done wrong
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25229984
type: Question
has title: Chrome extension to open a new popup url on button click in chrome browser popup window
has comment: http://stackoverflow.com/comment/39307150

http://stackoverflow.com/q/25229721
type: UnansweredQuestion
has body: I've implemented a G+ login into an upcoming web-app and have several issues with the login procedure. When clicking the Sign-in button, the callback is fired, the user is logged in, but then after a second or two, the callback is fired again (3-4 times in a row!) and the user is logged right back out. Yet, if I click the Sign-in button multiple times, quickly, the user remains logged in, after 2-3 attempts. On top of that, when signing out, the callback seems to get fired twice as well for no apparent reason at all. I am logging both the return values of login and logout (authResult) and there is absolutely no difference what so ever in their values (no different status method or anything). I have tried using different login methods (HTML button, JS button render) but to no avail (same issues). The website in question is: composer.syntax-design.at
answer count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/39327324
type: Question
score: 1
has title: Google+ Sign-in callback firing multiple times and requires multiple clicks for login
has comment: http://stackoverflow.com/comment/39334607
downvote count: 0
tagged with: google-plus
tagged with: javascript
tagged with: callback
linked to: http://stackoverflow.com/q/23020733
favorite count: 0
has comment: http://stackoverflow.com/comment/40973715

http://stackoverflow.com/comment/39275365
comment on: http://stackoverflow.com/q/25216020
type: Comment
has text: might checkout MVC principles; it's inevitable that you'll need to sync data and a view, and whatever easy way you can accomplish that is reasonable.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39296069
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25227460
has text: I have made that but the ui dose not update
score: 0

http://stackoverflow.com/q/25088698
has title: Chrome extension initiate browser_action popup from background scripts
type: Question
has answer: http://stackoverflow.com/a/25088810
answer count: 2
score: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: google-chrome-extension
has body: I am trying to show a chrome extension popup from a trigger to shortcut keys like(ctrl+shift+U). Manifest Json: "commands": { "generate_link": { "suggested_key": { "default": "Ctrl+K", "mac": "Command+K" }, "description": "Builds link copy to extension." }, "show-interface": { "suggested_key": { "default": "Ctrl+Shift+K", "mac": "Command+Shift+K" }, "description": "Show builder interface2." } Background script: chrome.commands.onCommand.addListener(function(command) { chrome.tabs.update({}, function(tab) { if (command == 'generate_link') { //need to show extension window with some info about the current tab getLink(tablink) } else if (command == 'show-interface') alert('show-interface'); }); }); Is there any function that could trigger the same task that happens when we click on browser_action icon. This could be simple but new to chrome extensions and terminology, didn't find any good references for this kind of problem.
upvote count: 2
type: UnansweredQuestion
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25089240

http://stackoverflow.com/q/25225429
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39291802
score: 1
has title: add email validation prior to submitting on php form
has body: I have the following simple form that I am trying to get the email validation error to show up within the form to show the error prior to submitting. Is there a way to do this with PHP or do I have to use JSON? If I have to use JSON, can anyone show me how to do this? Thanks in advance. form.html: Robot: Name: Email: Phone: Message: form.php <?php // send to and from $to = "email@example.com"; $headers = "From: email@example.com \r\n"; $headers .= "Reply-To: email@example.com \r\n"; // form inputs $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; $robot = $_POST['robot']; // email message $email_subject = "Web Contact Message"; $email_body = "A message from your website contact form \n\n". "Email: $email \n\n". "Phone: $phone \n\n". "From: $name \n\n". "Message: \n". "$message \n"; // honeypot if($robot) header( "Location: http://www.example.com/nothankyou.html" ); else{ //validate email if(!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo ' Please Enter a Valid Email '; } else { // send it mail($to,$email_subject,$email_body,$headers); header( "Location: http://www.example.com/thankyou.html" ); } } ?>
type: Question
has answer: http://stackoverflow.com/a/25225521
accepted answer: http://stackoverflow.com/a/25225521
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
tagged with: forms
upvote count: 1
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39291768
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39291780

http://stackoverflow.com/a/25157665
has body: / Using a selector: $("#inline").colorbox({inline:true, href:"#myForm"}); // Using a jQuery object: var $form = $("#myForm"); $("#inline").colorbox({inline:true, href:$form}); Or just make iframe false. Details are given on their website. Colorbox.js
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25155740

http://stackoverflow.com/a/25082406
upvote count: 2
answers question: http://stackoverflow.com/q/25082081
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25082081
has body: Maybe not the nicest syntax, but you could use: data-ng-class="[button.isDisabled ? 'btn-disabled' : '', button.glyphicon]"

http://stackoverflow.com/comment/39257414
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25206608
has text: @Harry Thanks for the help! Looks as though I'm out of luck on this one. Bit wary of implementing any workarounds (or using JQuery) as its for a vanilla JS library that needs to work on multiple browsers. Guess I'm just going to have to hope that the user of said library has manually set the width.
score: 0

http://stackoverflow.com/q/25093889
type: Question
type: AnsweredQuestion
score: -1
has comment: http://stackoverflow.com/comment/39047080
has comment: http://stackoverflow.com/comment/39047245
upvote count: 0
has title: Do I need to ask for the artist's permission every session to access his Facebook page status updates?
answer count: 1
has comment: http://stackoverflow.com/comment/39047064
tagged with: javascript
has comment: http://stackoverflow.com/comment/39047088
favorite count: 0
has answer: http://stackoverflow.com/a/25093959
tagged with: facebook-graph-api
has body: I need to access status updates of an artist page to display as feed on my website. So everytime a user accesses the artist' space on my website, he sees the artist's status feed in a tab. Do I need to ask for the artist's permission every session? That would not be practical I guess. Thanks
accepted answer: http://stackoverflow.com/a/25093959
downvote count: 1

http://stackoverflow.com/q/25191944
linked to: http://stackoverflow.com/q/21336996
has comment: http://stackoverflow.com/comment/39232691
favorite count: 0
has comment: http://stackoverflow.com/comment/39229526
type: UnansweredQuestion
tagged with: php
has body: I've done some research and even have a book that explains Ajax calls to php and sending data to and from browser and server. I found this to be pretty close to what I need since I am using local storage How can I pass saved localStorage web data to a php script?, this link seems pretty coherent but I am not sure what to do on the PHP side How to pass data from Javascript to PHP and vice versa?, though I have a bigger problem, the amount of data I have in local storage is pretty large, there are several different arrays that are stored there and are JSON encoded, when I get the array I use JSON.parse and to set the array in storage I stringify it. How could this be done to send that kind of data over? Not all the data in localStorage is an array either, there are hundreds of variables in local storage that need to be saved. EDIT: Here is my code since it was brought to my attention that it is needed. I am trying to get all the data from localstorage to be sent to the server to be saved in a database. function postData(){ var storage = JSON.stringify(localStorage); var xhr; if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } else { throw new Error("Ajax is not supported by this browser"); } xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200 &amp;&amp; xhr.status &lt; 300) { document.getElementById('div1').innerHTML = xhr.responseText; } } }; xhr.open('POST', 'Membership.php'); xhr.setRequestHeader("Content-Type: text/json", "application/x-www-form-urlencoded"); xhr.send("data=" + storage); } On the PHP side of things I have if ($_POST){ $data = json_decode($_POST['data']); echo "The data" .$data; } I don't know if this is correct, I can't find anything on how to pass all localstorage data, this is basically what I was trying to ask before but obviously failed to convey that.
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25192080
linked to: http://stackoverflow.com/q/16042565
has title: Sending localStorage data to PHP
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
linked to: http://stackoverflow.com/q/406316
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39232501
downvote count: 1

http://stackoverflow.com/a/25171408
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39191817
has comment: http://stackoverflow.com/comment/39191696
accepted answer of: http://stackoverflow.com/q/25168748
has comment: http://stackoverflow.com/comment/39192004
upvote count: 5
answers question: http://stackoverflow.com/q/25168748
type: Answer
has comment: http://stackoverflow.com/comment/39192223
downvote count: 0
has comment: http://stackoverflow.com/comment/39192044
has body: This one turns out harder than expected. At first, I try using the datatable data() API, but that returns the dropdown lists as HTML strings, which are not very useful. Then I come across this article on how datatable deals with form inputs. The trick is to recognize that your datatable object can retrieve nodes from within the document regardless of paging. A live demo can be found on my jsfiddle. EDIT: As per discussion with OP, the following codes can be utilized instead of relying on embedded column selectors: table.$('select[name="languageID"]').each(function(index, value{ languages.push($(value).val()); });
has comment: http://stackoverflow.com/comment/39192183
score: 5

http://stackoverflow.com/comment/39196042
has text: this is the php function: `$json_array = array('selfie'=>'hello');`
score: 0
comment on: http://stackoverflow.com/q/25173727
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25145198
type: Question
has answer: http://stackoverflow.com/a/25145232
accepted answer: http://stackoverflow.com/a/25145232
tagged with: javascript
score: 0
answer count: 1
has title: JavaScript regex, different lengths but not range
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39142500
has comment: http://stackoverflow.com/comment/39142560
has body: I'm interested in a concise way to specify different allowable lengths for a string of numbers. I want to allow strings of length 2, 4, 6, 8, and 10, but nothing in between. The following works just fine, but it is a bit long-winded: var regex = /^([0-9]){2}|([0-9]){4}|([0-9]){6}|([0-9]){8}|([0-9]){10}$/; Is there a shorter, less brute force way I can do this? Thanks!

http://stackoverflow.com/q/25190040
has body: I'm incredibly new with Javascript and JQuery and I am having problems getting the behavior to work as I would like. I currently have two dropdown TB MegaMenus on top of my website while it is underneath 980px. The issue is that since they are separate menus, when you have one open and click to open the second menu, the first one does not close. I am attempting to have them close the other when they are opened. They operate by changing their overflow from hidden to visible. .nav-collapse is the class on both div's that needs to be hidden once the other one is opened. I understand that we need to change the css to be overflow: hidden, but I'm not doing it properly and am having trouble even after looking up many examples. Any help would be appreciated. The DOM looks something like this. .l-region > #block-tb-megamenu-main-menu > .block__content > .tb-megamenu-main-menu > .nav-collapse (this is the one that needs the CSS modified to overflow: hidden) $(document).ready(function(){ $("#block-tb-megamenu-main-menu").on('click', '.nav-collapse', function(){ $('#block-tb-megamenu-menu-connect').find(".nav-collapse").css({"overflow":"hidden"}); }); This is the code that performs the function within TB Mega Menu. Would it be possible just to modify this code? attach: function(context) { $('.tb-megamenu-button').click(function() { if(parseInt($(this).parent().children('.nav-collapse').height())) { $(this).parent().children('.nav-collapse').css({height: 0, overflow: 'hidden'}); } else { $(this).parent().children('.nav-collapse').css({height: 'auto', overflow: 'visible'}); } });
type: UnansweredQuestion
tagged with: css
tagged with: drupal
type: Question
has title: Writing JQuery to change behavior of TB Megamenu for Drupal 7
has answer: http://stackoverflow.com/a/25204618
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/39241889
has text: Glad that helped. Although it's strange, that my updated answer didn't work out - I've checked it on my machine, works perfectly.
type: Comment
comment on: http://stackoverflow.com/a/25198653
score: 0
type: AnswerComment

http://stackoverflow.com/q/25119551
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25120733
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25120177
accepted answer: http://stackoverflow.com/a/25120177
tagged with: textselection
type: Question
has title: Incorrect behavior of text selection with
has body: I experience incorrect behavior of text selection which happens only in FF. By clicking on bullet of li element FF displays selection spans across the whole li element but obtaining this selection range in JS results only in 1 character selected which is apparently incorrect. Selecting text by dragging selection with mouse starting from text creates correct Range for current selection. Live fiddle depicting issue here: http://jsfiddle.net/keaukraine/4ZE3a/
score: 1
has answer: http://stackoverflow.com/a/25120733
has comment: http://stackoverflow.com/comment/39096965
answer count: 2
upvote count: 1
tagged with: firefox

http://stackoverflow.com/comment/39182408
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25161916
has text: Sorry I thought i did it correctly but that does not work the i have been working in it for a bit and researching i don't think it is possible without creating a custom scrollbar. this was the closest i was able to get: http://jsbin.com/xupelama/1/edit

http://stackoverflow.com/comment/39206284
type: QuestionComment
comment on: http://stackoverflow.com/q/25179806
has text: In your JS code you are just creating url variable, but you are not submitting it. You can try with `window.location = url`, as here url is your url variable.
score: 0
type: Comment

http://stackoverflow.com/comment/39107224
score: 0
type: Comment
has text: Note that you can only use an ID once, duplicate ID's is invalid. You can use a class on all the file inputs, and then target a text input based on DOM position, index or just about anything else really.
type: AnswerComment
comment on: http://stackoverflow.com/a/25125003

http://stackoverflow.com/comment/39226320
score: 3
type: Comment
type: QuestionComment
has text: Your script is executing within your local mongo shell. It is likely the round-trip network time that is causing the hit. Can you ssh to the remote machine and execute there? There is a command that can be used to execute Javascript within the server but you should not use it. It takes a global write lock, blocking all other operations. Can you share your script? Maybe there is a way to accomplish the same thing with fewer round trips.
comment on: http://stackoverflow.com/q/25189652

http://stackoverflow.com/q/25204621
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39252796
score: 8
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25204741
accepted answer: http://stackoverflow.com/a/25204741
upvote count: 8
type: Question
has body: I have a screen where I am capturing video from camera, taking a snap. I also have a file input and I want to set this option to the captured image from the camera, i.e..snap. I do not want to store the snap as a cookie and later retrieve it, as it will later make the users computer heavy and will require cleaning everytime. so the code is &lt;input type="file" id="visitorphoto" name="visitorPhoto" accept="image/*" capture&gt; which is according to this w3 document. Any Ideas using javascript? Thanks, Abhijeet.
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39263501
favorite count: 0
has comment: http://stackoverflow.com/comment/39277165
has title: Send Image to server using File input type

http://stackoverflow.com/q/25083687
has body: When calculating big-O notation do we also evaluate inherent javascript methods? If we do not, I am reasonably certain this is O(N). If we do how would I express his in big-O and how did you come to this conclusion? NOTE 1: this post has been edited to change "x" to 25, the loop is fixed NOTE 2: the string can be any size // the string can be any size while( i++ &lt; 25) {//edited from previous post - this was formerly "x" regex = RegExp( MyArray[i],'g' ); if ( (myString.match(regex)||[]).length ){ myObj.push([ myArray[i], (myString.match(regex)||[]).length ]); myString = myString.replace(regex,''); } } myObj.sort(function(a, b) {return b[1] - a[1]});
has comment: http://stackoverflow.com/comment/39028190
favorite count: 0
tagged with: big-o
accepted answer: http://stackoverflow.com/a/25083794
possible better answer: http://stackoverflow.com/a/25084938
has comment: http://stackoverflow.com/comment/39028504
has answer: http://stackoverflow.com/a/25084938
has title: How do you evaluate inherent object methods in Javascript and express it in Big-O?
has comment: http://stackoverflow.com/comment/39028632
has answer: http://stackoverflow.com/a/25083794
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39029474
has comment: http://stackoverflow.com/comment/39028336
downvote count: 0
type: Question
tagged with: javascript
upvote count: 2
answer count: 2
has comment: http://stackoverflow.com/comment/39038261

http://stackoverflow.com/comment/39200570
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25176578
type: Comment
has text: Why create isolated scope when not required ?

http://stackoverflow.com/a/25136339
upvote count: 3
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39126208
has body: There are three main issues there: You've used "smart quotes", which are not valid (as quotes) in either JavaScript or HTML. Use straight " instead. Assuming you fix #1, you'll have " within ", which will cause your attribute to be cut off early. Use ' consistently inside the attribute to avoid it (or use &amp;quot, but that can be hard to read). Capitalization matters in JavaScript. It's getElementById, not getElementByid. Here's a corrected version: &lt;br&gt;&lt;input list="Service" name="Service" value="** Select **" onchange="document.getElementById(document.getElementById('Service').value).style.visibility='visible';" &gt; &lt;!-- Straight double quote, not fancy ---------------------------------^ single quotes ----------------------------^-------^ Straight double quote ---------^ --&gt;
answers question: http://stackoverflow.com/q/25136207
downvote count: 0
has comment: http://stackoverflow.com/comment/39126164

http://stackoverflow.com/comment/39044112
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25092149
type: AnswerComment
has text: and can you console.log addedIds to make sure your data is being stored correctly? Also, might be good to throw a toLowerCase() on there to avoid any case mismatches

http://stackoverflow.com/q/25227054
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39294871
has title: stop html() from encoding tags in jQuery?
has body: I got this text editor from this thread. The editor is an iframe so in order to get the html content from the iframe body by this line on submit click $('#submit').click(function(){ var see = $("#textEditor").contents().find("body").html(); console.log(see) }); While using html(), any html tags or script tags will be encoded as shown in the console. It wouldn't be a problem normally but I'm starting to use HTML purifier to sanitize input data. The encoded string will not be recognized by the purifier and let any tags pass into the database as something like &amp;lt;script&amp;gt;alert('Hello');&amp;lt;/script&amp;gt;rtrrttr. Does anyone have any solutions to stop html() from encoding tags?
answer count: 0
has comment: http://stackoverflow.com/comment/39294916
type: UnansweredQuestion
tagged with: iframe
has comment: http://stackoverflow.com/comment/39294905
type: Question
score: 0
upvote count: 1
linked to: http://stackoverflow.com/q/23120809
downvote count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25174934
type: Question
has comment: http://stackoverflow.com/comment/39197800
has comment: http://stackoverflow.com/comment/39197819
has answer: http://stackoverflow.com/a/25175114
has body: I want to sort an array of numerical values and I find a code likes : Click the button to sort the array in ascending order. Try it Output: 1,5,10,25,40,100 The code runs properly but I can't understand how the statement points.sort(function(a, b){return a-b});is working and what is a and b?
has title: Numeric Sort in JavaScript
score: 0
has answer: http://stackoverflow.com/a/25175000
answer count: 3
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39197776
has comment: http://stackoverflow.com/comment/39197979
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25175099
linked to: http://stackoverflow.com/q/4576903

http://stackoverflow.com/q/25178856
has comment: http://stackoverflow.com/comment/39267287
tagged with: php
answer count: 0
has comment: http://stackoverflow.com/comment/39216397
type: Question
has body: I have recently create a fusion table and I'm able to work with it through javascript and php, but if I change the permission to private I am no more able to interact with it. What can I do to keep it private and work with it? What authentication I must use?
tagged with: javascript
tagged with: google-fusion-tables
score: 0
type: UnansweredQuestion
has title: How to make a Google Fusion Table private and use it with javascript

http://stackoverflow.com/q/25119503
score: 14
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39096938
has answer: http://stackoverflow.com/a/25119634
accepted answer: http://stackoverflow.com/a/25119634
tagged with: terminate
has comment: http://stackoverflow.com/comment/39094647
type: Question
tagged with: debouncing
has body: I have a search box on my web page that has check boxes in order for the user to filter their results. Only one check box can be checked at once. When a check box is clicked my code runs off and applies the filter to the list and returns the correct results. The problem I have is that when a check box is clicked multiple times in quick succession, it queues the requests and pulls them back one by one. This can take a while if a check box is checked and then un-checked multiple times. Is there any way in Javascript to inform the function that it has been called again and it should stop everything other than this last request?
tagged with: function
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25119735
favorite count: 0
upvote count: 14
has comment: http://stackoverflow.com/comment/39094996
answer count: 3
has comment: http://stackoverflow.com/comment/39094789
has comment: http://stackoverflow.com/comment/39095770
downvote count: 0
has title: How to kill a Javascript function if it is called again?
linked to: http://stackoverflow.com/q/1164213
has comment: http://stackoverflow.com/comment/39094655
has answer: http://stackoverflow.com/a/25122825
has answer: http://stackoverflow.com/a/25119735

http://stackoverflow.com/comment/39234852
type: Comment
comment on: http://stackoverflow.com/a/25194299
score: 0
has text: can i add a second div to the each list like this>
type: AnswerComment

http://stackoverflow.com/comment/39092175
type: Comment
comment on: http://stackoverflow.com/q/25117869
score: 0
has text: can you localize the problem in fiddle ?
type: QuestionComment

http://stackoverflow.com/comment/39134714
type: AnswerComment
comment on: http://stackoverflow.com/a/25141047
score: 0
type: Comment
has text: Sorry the name is $`routeParams`

http://stackoverflow.com/q/25103039
has body: I used this excellent post Website image caching with Apache to define my header expires. And I have looked at numerous other examples, and they all pretty much outline the same; enable for images and css, disable for php, python etc. But I am a bit ambiguous about JavaScripts and HTML. Can I add header expire for those as well? Without compromising the live content of the site? I am running Simple Machines forum. By top eight mimetypes by use look like this, so there is something to gain: php 46.5 % png 22.9 % js 6.5 % html 5.9 % gif 5.8 % css 4.8 % jpg 4.7 % jpeg 2.6 %
has title: Advice on mimetypes to include in Apache mod_expires
type: Question
tagged with: mod-expires
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25177757
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25177757
tagged with: javascript
type: AnsweredQuestion
tagged with: apache
linked to: http://stackoverflow.com/q/447014

http://stackoverflow.com/comment/39146958
has text: 5000 milliseconds = 5 seconds, so use 10000 milliseconds.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25147394

http://stackoverflow.com/a/25090831
has body: You can define all the functions above making them run the next function inside of the previous one. Then you'll call roundOne() and you'll be done. function roundOne () { setTimeout(function () { terminal.echo('Lambda and mu row checks passed. Row ' +(j+1)+ 'found.'); j++; if (j &lt; numberOfRowsToFind) { roundOne(); } else { j = 0; // finished, set j=0 and call roundTwo roundTwo(); } }, Math.floor((Math.random() * (1500)) + (70 * j))) } function roundTwo () { setTimeout(function () { terminal.echo('Lambda and mu row checks passed. Row ' +(j+1)+ ' found.'); j++; if (j &lt; numberOfRowsToFind) { roundTwo(); } else { j = 0; // finished, set j=0 and call roundThree roundThree(); } }, Math.floor((Math.random() * (1500)) + (70 * j))) } function roundThree () { setTimeout(function () { terminal.echo('Lambda and mu row checks passed. Row ' +(j+1)+ ' found.'); j++; if (j &lt; currentSrgValues[0][1]) { roundThree(); } else { laddaCalculateButton.stop(); // finished all the three rounds } }, Math.floor((Math.random() * (1500)) + (70 * j))) } j = 0; roundOne();
has comment: http://stackoverflow.com/comment/39041515
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25090766
has comment: http://stackoverflow.com/comment/39041546
answers question: http://stackoverflow.com/q/25090766
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/39058814
type: AnswerComment
type: Comment
has text: This is cute, works, and didn't involve a regex match. Fabulous.
score: 0
comment on: http://stackoverflow.com/a/25100193

http://stackoverflow.com/a/25130768
score: 0
has body: Could be caused by a variety of reasons: What device/ OS are you testing with? Older Webkit/webview may not support background-size: cover; Have you specified the size of the container class .front-page as in height: 100%; width: 100% What are the file size and resolution of these .png files? Higher res images will degrade performance. These aside, we have past experiences with PhoneGap on Android 4.0.2 to 4.3 where background-images would randomly fail to render. 1 page load out of 10 would fail to display the background image. And there is no visible explanation, no console error, no CSS error. Same lines would run on all other platforms with no trouble.
type: Answer
answers question: http://stackoverflow.com/q/25111242

http://stackoverflow.com/comment/39102616
type: AnswerComment
comment on: http://stackoverflow.com/a/25123355
score: 1
type: Comment
has text: @apaul34208 you are right.. (*i will leave that to the OP to correct, with whatever method he uses to find the initial positions*)

http://stackoverflow.com/q/25156082
tagged with: css
possible better answer: http://stackoverflow.com/a/25156286
has answer: http://stackoverflow.com/a/25156111
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25156394
has comment: http://stackoverflow.com/comment/39162537
type: Question
tagged with: javascript
tagged with: jquery
has title: Jquery/CSS: How to apply addClass with a delay of 1 sec on mouseenter event.
answer count: 6
has answer: http://stackoverflow.com/a/25156141
has answer: http://stackoverflow.com/a/25156286
has comment: http://stackoverflow.com/comment/39164757
accepted answer: http://stackoverflow.com/a/25156094
score: 0
has body: Here is my code to addClass which is working. But when I try to use delay or setTimeout functions, it is NOT working. I don't want to use webkit attributes in CSS. Please advise if anybody faced this issue earlier. $(document).ready(function(){ $('#table_Id tr td').mouseenter(function(){ $(this).parent('tr').addClass('blueBgColor'); }); });
has answer: http://stackoverflow.com/a/25156094
has answer: http://stackoverflow.com/a/25156327

http://stackoverflow.com/comment/39184885
comment on: http://stackoverflow.com/q/25167921
has text: you prevent your form from submitting with that `return false`, and then you do a `window.location` redirection, which will use a GET to fetch the new page, and also NOT pass in any query parameters since you haven't included any in the url.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25150780
upvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25150918
tagged with: php
tagged with: onsubmit
has body: I've been stuck in this for hours. I need to Submit a form ONLY if one of the inputs is equal to a PHP echo. Simpliflying the script, it is something like this: &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;?php $A = rand(0,10); $B = rand(0,10); $C = $A + $B; ?&gt; &lt;script type="text/javascript"&gt; function ValidateForm() { if (form1.name.value == '') {alert ('Must say your name'); return false; } if (form1.result.value != &lt;?php echo $C ?&gt;) {alert ('Result must be Equal'); return false; } return false;} else {return true;} &lt;/script&gt; &lt;form name="form1" method="post" action="Another.php" onSubmit="return ValidateForm();"&gt; Name: &lt;input type="Text" name="name" size="40"&gt;; &lt;br&gt; Solve: &lt;?php echo $A; ?&gt; + &lt;?php echo $B; ?&gt;; &lt;input type="number" name="result" min="0"/&gt; &lt;input type="Submit" name="send" value="Send"&gt; &lt;/form&gt; Well all this (simple version) saved in a .PHP file. I know the JS script will run in a .HTML file but the PHP won't. What can I do to make this work? I think I should take the PHP or the JS script to another file, but How do I connect all the files with each other? WEll... it WORKS now... for some reason... this is the actual code: The idea was to make a very simple captcha for old people; the website will work for no more than 100 old people. &lt;?php $A = rand(0,10); $B = rand(0,10); $C = $A+$B; ?&gt; &lt;script type="text/javascript"&gt; function ValidarFormulario() { // pon atención al atributo 'onSubmit' if (formula1.nombre.value == '') {alert ('Debe ingresar su nombre'); return false; } if (formula1.ciudad.value == '') {alert ('Debe ingresar su ciudad'); return false; } if (formula1.fono.value == '') {alert ('Debe ingresar su teléfono'); return false; } if (formula1.email.value == '') {alert ('Debe ingresar su e-Mail'); return false; } if (formula1.respuesta.value != &lt;?php echo $C ?&gt;) {alert('Result must be Equal'); return false; } else {return true;} } &lt;form name="formula1" me…
has title: Simple PHP script to JavaScript function used in a onSubmit attribute of a HTML form
type: Question
answer count: 2
score: -2
has answer: http://stackoverflow.com/a/25150953
tagged with: javascript
has comment: http://stackoverflow.com/comment/39153271
has comment: http://stackoverflow.com/comment/39153913
downvote count: 2
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has comment: http://stackoverflow.com/comment/39153563

http://stackoverflow.com/comment/39192775
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25169123
has text: @davidstrachan Thanks for the information. That seems like quite a bit of overkill. I could probably get away with a few miles of variation, honestly. I'll probably just truncate the data to 2-3 decimal points.

http://stackoverflow.com/comment/39102351
type: QuestionComment
has text: @j08691: An error comes out whenever you try to register an event on an element that hasn't yet been loaded, or to call a method on it.
comment on: http://stackoverflow.com/q/25123126
type: Comment
score: 1

http://stackoverflow.com/comment/39106960
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25125767
type: Comment
has text: Sorry I was not descriptive enough. I am looking to drag the list as a whole element. This is why I was asking if there is a more efficient way to move the list. Current implementation has me creating an LI element in the list that hasn't been instantiated with sort able. This element is an anchor that will allow you to drag the list inside its parent dive. Take a look at my JSFiddle to get a better idea.

http://stackoverflow.com/comment/39132114
type: QuestionComment
comment on: http://stackoverflow.com/q/25139708
score: 0
has text: You have to use MVC 3 to use Razor syntax. Strongly suggest you upgrade your project to a later version (MVC 5 is the current latest and quite amazing).
type: Comment

http://stackoverflow.com/a/25124852
has body: Yes, properties can be added at any time in JavaScript. Take a look at this example: function Person(firstName) { this.firstName = firstName; } Person.prototype.getFullName = function() { // Notice that I haven't defined this.lastName yet return this.firstName + ' ' + this.lastName; }; var bob = new Person('Bob'); bob.lastName = 'Saget'; console.log(bob.getFullName()); // 'Bob Saget'
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39105014
accepted answer of: http://stackoverflow.com/q/25124790
upvote count: 2
answers question: http://stackoverflow.com/q/25124790

http://stackoverflow.com/a/25079405
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39027203
accepted answer of: http://stackoverflow.com/q/25079366
upvote count: 1
answers question: http://stackoverflow.com/q/25079366
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39030691
type: Answer
has body: I suggest to use jQuery for that. Check out AJAX calls to ASP.NET MVC action methods using jQuery

http://stackoverflow.com/comment/39191161
type: QuestionComment
comment on: http://stackoverflow.com/q/25171125
has text: Calling `.getElementsByClassName()` over and over again isn't good - why wouldn't you just use `$('.final').each(...)` ?
score: 0
type: Comment

http://stackoverflow.com/comment/39230244
has text: Couple of things about your question: 1) id's can't start with `.` 2) there should be an = sign between `id` and `.class` like ` ` 3) given the = sign is in the right spot you could use something like this `$('div[id=".class"]')`
type: QuestionComment
comment on: http://stackoverflow.com/q/25192328
score: 0
type: Comment

http://stackoverflow.com/a/25160480
has body: You managed a good way into the conversion. Some notes: #1 - Delegation looks a bit different in MooTools, you can read about it here, but it should look like: $(document.body).addEvent('input:relay(input.clearable)', function(){ #2 - I would remove the tog "thing". MooTools has a toggleClass method with a second function parameter "force" that does that and is more clear to read. #3 - The add/remove class method in MooTools allows to add space separated classes but this is not documented, this not officially supported. So I did this.removeClass('x').removeClass('onX') instead od this.removeClass('x onX'); which would also work, unofficially. So, the code: window.addEvent("domready", function () { $(document.body).addEvents({ 'input:relay(input.clearable)': function () { this.toggleClass('x', this.value); }, 'mousemove:relay(.x)': function (e) { this.toggleClass('onX', this.offsetWidth - 18 &lt; e.clientX - this.getBoundingClientRect().left); }, 'click:relay(.onX)': function () { this.removeClass('x').removeClass('onX').set('value', ''); } }); }); jsFiddle: http://jsfiddle.net/92McL/
has comment: http://stackoverflow.com/comment/39174649
score: 0
accepted answer of: http://stackoverflow.com/q/25156933
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25156933
type: Answer
has comment: http://stackoverflow.com/comment/39170726
has comment: http://stackoverflow.com/comment/39170711

http://stackoverflow.com/comment/39212000
score: 0
type: AnswerComment
type: Comment
has text: For the code you suggested when I press the "SubmitContent" button nothing happens, also I just tried to upload files(not images) like .txt file with my old code(above in my question) and I found that the code works fine and I could upload files of up to 1M, if higher than that I get a message saying "Request Entity Too Large", however if upload images of up to about 160kb I get no response not even a "Request Entity Too Large" message, is it a problem with images?
comment on: http://stackoverflow.com/a/25152684

http://stackoverflow.com/comment/39082633
type: QuestionComment
comment on: http://stackoverflow.com/q/25113015
score: 0
type: Comment
has text: The reason is because `this.*` in `onClick` would be referring to the element with the attribute onClick, while `this.*` within the function doesn't have any this context set. You can achieve the same result with, `onClick="test.call(this)"`.

http://stackoverflow.com/comment/39075757
has text: do the other pages you're navigating to have a doctype?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25107941

http://stackoverflow.com/q/25114838
tagged with: node.js
has body: To solve error 'No Access-Control-Allow-Origin' So I tried to search for Access-Control-Allow-Origin for Node.js, but I could only see those using Express.js api. The warning looks like very simple: add header 'Access-Control-Allow-Origin' to the response. Origin http://localhost is not allowed by Access-Control-Allow-Origin Like the question above, I could also see many answers have app.use or res.header but: I don't know where the app. comes from res.header doesn't work for http.createServer(function (req, res){ "Something" }); Also, I tried res.writeHead(200, {'Access-Control-Allow-Origin': '*', 'Content-Type': 'text/html','Content-Length':data.length}); But doesn't work. I know this problem can be solved on the client side, like security off option for chrome or add on. But I want my server gives service on any client so that the users don't need to do any setting on it.
linked to: http://stackoverflow.com/q/16046364
score: 2
upvote count: 2
has title: Access-Control-Allow-Origin on node.js WITHOUT Express.js
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25115123
type: UnansweredQuestion

http://stackoverflow.com/q/25139487
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39131962
upvote count: 1
has answer: http://stackoverflow.com/a/25139808
type: Question
has answer: http://stackoverflow.com/a/25139573
score: 1
has body: I've got a div learn-more that expands to the size of the whole page by adding a CSS class as follows: .learn-more{ padding:10px; font-size: 20px; text-align: center; margin-top:20px; font-family: klight; -webkit-transition:2s; -moz-transition:2s; transition:2s; margin-left: auto; margin-right: auto; cursor: pointer; } .clicked{ width:100% !important; visibility: visible; height: 600px !important; margin-top:-111px !important; z-index: 10; } This addition is done using JS as follows: $('.learn-more').on('click', function(){ $(this).addClass('clicked'); $(this).addClass('fire-inside'); }); Now the problem is that I have a button inside the expanded div to reduce the size of this same expanded window. The JavaScript to do the same is $('.close-overlay').on('click', function(){ $('.learn-more-btn').removeClass('clicked'); $('.learn-more-btn').removeClass('fire-inside'); }); However this doesn't work as the browser is reading the click on close-overlay as a click on learn-more as the HTML for it as Find out more <p > ... Close I've added a fiddle for it: DEMO: http://jsfiddle.net/Newtt/AqV96/ On clicking close, I need the overlay to revert to original size.
has comment: http://stackoverflow.com/comment/39131737
possible better answer: http://stackoverflow.com/a/25139573
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/25139808
tagged with: javascript
tagged with: jquery
has title: Revert CSS transition on click
favorite count: 0

http://stackoverflow.com/a/25210918
answers question: http://stackoverflow.com/q/25210421
has comment: http://stackoverflow.com/comment/39265305
has body: Or use virtual elements if you want to keep using the &lt;p&gt; tags &lt;!-- ko foreach: { data: Children, as: 'child' } --&gt; &lt;p&gt; ... &lt;/p&gt; &lt;!-- /ko --&gt; http://jsfiddle.net/cvtw3b2h/2/
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25210421
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25134524
has comment: http://stackoverflow.com/comment/39124281
tagged with: validation
has comment: http://stackoverflow.com/comment/39123361
favorite count: 0
linked to: http://stackoverflow.com/q/9838054
linked to: http://stackoverflow.com/q/15671712
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39122627
has comment: http://stackoverflow.com/comment/39123927
score: 1
has comment: http://stackoverflow.com/comment/39123752
has comment: http://stackoverflow.com/comment/39124406
has comment: http://stackoverflow.com/comment/39122699
has body: I am using jquery validation plugin for US ZIPCODE CHECK ,its working fine, but I have to push the submit button TWICE to get the form submitted, Note : if I press enter that it submits the form properly, but it doesnt work with click event I already have checked this stackoverflow answers but they didnt helped me out Why do you have to submit twice before jQuery Validate submitHandler is triggered? jquery validate need to click submit twice to submit form jQuery using .on and .validate must submit form twice to validate Below is my Javascript code var ans; $(document).ready(function(e) { jQuery.validator.addMethod("zipcode", function(e) { $.ajax( { url: "http://zip.elevenbasetwo.com", cache: false, async: false, dataType: "json", type: "GET", data: "zip=" + $("#zip").val(), success: function() { ans = true; }, complete: function() { ans = true; }, error: function() { ans = false; } } ); return ans; }); $("#register-form2").validate({ debug: true, onkeyup: false, rules: { zip: { required: true, zipcode: true, minlength: 5 }, email: { required: true, email: true } }, messages: { zip: { required: "Please enter a USA zip code", zipcode: "Please enter a valid USA zip code" }, // zip: "Please enter a valid USA zip code.", email: "Please enter a valid email address." }, submitHandler: function(form) { alert('hi'); form.submit(); } }); }); Please mark that if I dont use ajax function in my custom method than it just works fine, but i am not able to solve it. below is my HTML code &lt;form action="&lt;?= $_SERVER['PHP_SELF'] ?&gt;" method="post" class="wpcf7-form" id="register-form2" novalidate&gt; &lt;input name="email" required id="email" type="text" placeholder="Email*"&gt; &lt;input type="text" name="zip" id="zip" required size="40" maxlength="15" placeholder="Zip code* (USA only)"&gt; &lt;input name="Form_submit" class="btn btn-primary wpcf7-form-control wpcf7-submit" id="Submit" value="Sign-up" type="submit"&gt; &lt;/form&gt;
type: Question
has title: Jquery Validation : Submit button have to be clicked twice for form submission (fire fox)
has comment: http://stackoverflow.com/comment/39122891
linked to: http://stackoverflow.com/q/20496840
tagged with: firefox
has comment: http://stackoverflow.com/comment/39122823
downvote count: 0
has comment: http://stackoverflow.com/comment/39123589
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39123622
has comment: http://stackoverflow.com/comment/39123383
has comment: http://stackoverflow.com/comment/39123824
tagged with: ajax
linked to: http://stackoverflow.com/q/2628413

http://stackoverflow.com/a/25228200
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25228158
score: 2
upvote count: 2
has body: This was posted as a solution in the comments of the site you referenced: $(function() { $("html, body").mousewheel(function(event, delta) { this.scrollLeft -= (delta * 30); event.preventDefault(); }); });
accepted answer of: http://stackoverflow.com/q/25228158
type: AcceptedAnswer

http://stackoverflow.com/q/25170946
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
type: Question
answer count: 2
has title: MongoDb sort Collection by count in other Collection
has answer: http://stackoverflow.com/a/25171113
tagged with: node.js
possible better answer: http://stackoverflow.com/a/25171079
has answer: http://stackoverflow.com/a/25171079
upvote count: 1
tagged with: mongodb
accepted answer: http://stackoverflow.com/a/25171113
tagged with: javascript
tagged with: sorting
has body: I have two collections: collection A and collection B. Collection B "A_id" will have the _id from Collection A (kinda like a relationship). Collection A { _id, name } Collection B { _id, A_id, other_id } I need to sort the documents from Collection A by the amount of repetitions of documents to an A_id in Collection B (sort by count if you may). The constraint is that we don't want to have an array in collection A because the documents in B will grow a lot and will be updated constantly. Any idea how to perform this kind of sorting? Thanks much

http://stackoverflow.com/a/25070157
has comment: http://stackoverflow.com/comment/116976620
has comment: http://stackoverflow.com/comment/46812775
has comment: http://stackoverflow.com/comment/60030581
has comment: http://stackoverflow.com/comment/94735501
upvote count: 144
downvote count: 2
score: 142
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25070144
has body: This is a feature, class modal-open gets added to the HTML body when you show the modal, and removed when you hide it. This makes the scrollbar disappear since the bootstrap css says .modal-open { overflow: hidden; } You can override this by specifying .modal-open { overflow: scroll; } in your own css.
has comment: http://stackoverflow.com/comment/39003007
type: Answer
has comment: http://stackoverflow.com/comment/67873000
has comment: http://stackoverflow.com/comment/39002893
accepted answer of: http://stackoverflow.com/q/25070144

http://stackoverflow.com/comment/39252802
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25185589
has text: Sorry about that ... you should use `.done()` and `.fail()` (and `.always()`, if you need it) instead. The `success` and `error` methods I mentioned earlier are long deprecated and probably don't work with cross domain requests.

http://stackoverflow.com/q/25216175
type: Question
has answer: http://stackoverflow.com/a/25217451
tagged with: jquery-ui
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/39276525
has title: Jqueryui Autocomplete was working but now it's not
has comment: http://stackoverflow.com/comment/39275467
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39326333
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39277684
has body: I tried to use a Jqueryui autocomplete. It was working perfectly. but now its not. here is the code.. the input field: &lt;input class="form-control mandatory" id="name" name="name" placeholder="Enter your name please" type="text" onkeypress="return stop(event);" ondrop="return false;" onpaste="return false;"&gt; and this is the code for autocomplete $(document).ready(function(){ var name = document.getElementById('name'); $(name).autocomplete({ minLength : 2, source: "getemaillist.php" }); }); I checked in firebug, but there is neither GET nor POST request. then I tried adding keyup="getdata(this.value)" to input tag and in that function getting data by using $.post and assigning returned result as source to autocomplete. I'm getting data in proper json format. but still I can't see autocomplete in action. I just see a get request to css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png file which is I think an autocomplete background image. What am I doing wrong?

http://stackoverflow.com/comment/39084113
type: AnswerComment
has text: And btw what is `element` in the function arguments? is it the input element?
type: Comment
comment on: http://stackoverflow.com/a/25113867
score: 1

http://stackoverflow.com/a/25171444
has comment: http://stackoverflow.com/comment/56501393
score: 12
has comment: http://stackoverflow.com/comment/39286041
type: AcceptedAnswer
has body: You done a great job with HTML5 player and the function checkScroll(). It seem you have trouble to use it with the YouTube JS Player, well if you take the time to read the doc, you discover that the YouTube player is just an iframe. Try this live example i made : http://jsbin.com/cocatuta/15/edit?js,output So basically i just replace : var videos = document.getElementsByTagName("video"), fraction = 0.8; By this : var videos = document.getElementsByTagName("iframe"), fraction = 0.8; And add two function playVideo and pauseVideo. function playVideo() { player.playVideo(); } function pauseVideo() { player.pauseVideo(); } Full code : //play when video is visible var videos = document.getElementsByTagName("iframe"), fraction = 0.8; function checkScroll() { for(var i = 0; i &lt; videos.length; i++) { var video = videos[i]; var x = 0, y = 0, w = video.width, h = video.height, r, //right b, //bottom visibleX, visibleY, visible, parent; parent = video; while (parent &amp;&amp; parent !== document.body) { x += parent.offsetLeft; y += parent.offsetTop; parent = parent.offsetParent; } r = x + parseInt(w); b = y + parseInt(h); visibleX = Math.max(0, Math.min(w, window.pageXOffset + window.innerWidth - x, r - window.pageXOffset)); visibleY = Math.max(0, Math.min(h, window.pageYOffset + window.innerHeight - y, b - window.pageYOffset)); visible = visibleX * visibleY / (w * h); if (visible &gt; fraction) { playVideo(); } else { pauseVideo() } } }; window.addEventListener('scroll', checkScroll, false); window.addEventListener('resize', checkScroll, false); //check at least once so you don't have to wait for scrolling for the video to start window.addEventListener('load', checkScroll, false); checkScroll(); Hope it's help ! And yes, read the doc "is even supposed to help you" (eventually)
has comment: http://stackoverflow.com/comment/39192391
has comment: http://stackoverflow.com/comment/39192186
upvote count: 12
type: Answer
has comment: http://stackoverflow.com/comment/67833999
accepted answer of: http://stackoverflow.com/q/25150423
downvote count: 0
answers question: http://stackoverflow.com/q/25150423

http://stackoverflow.com/comment/39171313
has text: I think we're going to need to see a mock-up of what you want in a fiddle.
comment on: http://stackoverflow.com/q/25160023
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39019004
comment on: http://stackoverflow.com/q/25079095
has text: @user3066820 what blanks?!
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39247074
has text: because you don't have respective `Blog` div hence not showing. `$('div[id^="tab"]').hide();` this is to hide all div whose id start with tab ( see start with selector in jquery)
comment on: http://stackoverflow.com/a/25201610
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25152943
has body: I start node.js server has 3000 port by nohup for background running, but now i want to stop the node.js server with 3000 and start again with the same port. How can I stop the process? i can use this command for get the process to kill; ps -a","ps -ef |grep nohup but it return; -bash: kill: (11929) - No such process thanks
favorite count: 0
tagged with: linux
linked to: http://stackoverflow.com/q/4018154
has comment: http://stackoverflow.com/comment/39159216
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26987229
has comment: http://stackoverflow.com/comment/39157712
type: Question
score: 5
linked to: http://stackoverflow.com/q/14151928
upvote count: 5
tagged with: javascript
tagged with: bash
has title: How to kill a NOHUP process for Node.js launched via SSH
linked to: http://stackoverflow.com/q/8007380
downvote count: 0
tagged with: ssh
answer count: 1
has answer: http://stackoverflow.com/a/26987229

http://stackoverflow.com/a/25192154
answers question: http://stackoverflow.com/q/25191457
score: 0
has body: Try defining your plugin using $.fn.cookie = function(options) { //... your plugin } according to the jquery documentation
type: Answer

http://stackoverflow.com/q/25087676
tagged with: jquery
score: 0
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25087867
has body: I am trying to do 2-3 calculations at once with jQuery. I found a link to a fiddle that did one calculation and I edited it to what I thought I needed to make it all work, but I can only get the one-off calculation to work. Basically, I'm calculating the overall width and height of tires based on the metric sizes. Example: 265/70R17 The width is calculated by dividing the 3-digit width (265) by 25.4 = 10.43 The height is calculated by taking the width in inches, multiplying by the ratio (70), then doubling that number before adding the size of the rim (17). So, ((10.43 * .7) * 2) + 17 = 31.60 Here's the link to the fiddle that I've been trying to make work. http://jsfiddle.net/fY57T/ $('#rim').change(function(ev){ var twidth = $('#width').val() / 25.4; var step1height = $('#ratio').val() * twidth; var step2height = step1height * 2; var theight = step2height + $('#rim').val(); $('#theight').html((theight).toFixed(2)); $('#twidth').html((twidth).toFixed(2)); }); Thanks in advance for any input anyone has.
type: Question
has title: Multiple calculations in jQuery with multiple fields
tagged with: javascript

http://stackoverflow.com/a/25141079
accepted answer of: http://stackoverflow.com/q/25140892
score: 3
answers question: http://stackoverflow.com/q/25140892
upvote count: 3
has comment: http://stackoverflow.com/comment/39180788
has body: Try this: var myItem=$('#myLink'); $('html').click(function(event){ var x = event.clientX; //will these change if the user has scrolled? var y = event.clientY; var link_clicked = 0; var clickedItem=event.target; if(clickedItem==myItem) console.log('clicked') ... }); EDIT: var myItem=$('#myLink'); var x=myItem.offset().left; var y=myItem.offset().top; var clientX=event.clientX; var clientY=event.clientY; From that you can get the relative x/y values.. If I understand you correctly. Regarding your second question... Yes clientX/clientY do change with the scrolling because they are browser specific(relative to top-browser-bar, you can think) rather than document-specific.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39134793
type: Answer
downvote count: 0

http://stackoverflow.com/q/25071956
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39006141
has title: jQuery element add event doesn't response to certain syntax
accepted answer: http://stackoverflow.com/a/25072012
has comment: http://stackoverflow.com/comment/39006038
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
type: AnsweredQuestion
has body: I have a jQuery problem, jQuery doesn't response to certain syntax: $("#itemid").change(function(e){....}); it didn't work at all. but when I use this : $(document).on("change", "#itemid", function(e){....}); it works well. I have read jQuery manual and didn't find any answers. My testing browser is Chrome Version 36.
has answer: http://stackoverflow.com/a/25072012
has comment: http://stackoverflow.com/comment/39006059
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/39053375
comment on: http://stackoverflow.com/a/25097256
type: Comment
score: 0
type: AnswerComment
has text: Sorry, I just noticed that the overlay is called rb-overlay and that div appears first - I missed it from my original code close

http://stackoverflow.com/q/25162378
accepted answer: http://stackoverflow.com/a/25177951
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25177951
has comment: http://stackoverflow.com/comment/39200887
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/39175022
has comment: http://stackoverflow.com/comment/39176977
has comment: http://stackoverflow.com/comment/39200681
type: AnsweredQuestion
has body: I have some svg objcts drawing inside a div. To svg objects are attached handlers with stopPropagation method. Is there a way to add some top layer filling entire div to capture event before svg objects? I can't use bubbling instead of a capture. I have to also listen on events that hit a div and not hit a svg object.
has title: Creating top layer to capture events
has comment: http://stackoverflow.com/comment/39174273
type: Question
has comment: http://stackoverflow.com/comment/39202863
tagged with: javascript

http://stackoverflow.com/comment/39117513
type: Comment
type: QuestionComment
has text: Are you using document.ready in your view? Have you checked by putting an `alert` inside `submit click scope`?
score: 0
comment on: http://stackoverflow.com/q/25131133

http://stackoverflow.com/comment/39252162
type: QuestionComment
has text: Don't use the `submit` event to trigger your ajax function. Change your submit button to `type="button"`, give it an id, and bind your function to the change event of the button.
score: 0
comment on: http://stackoverflow.com/q/25201761
type: Comment

http://stackoverflow.com/a/25086478
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: change function to this.getCompanyInfo = function(companyID) { var coInfo; console.log( companyID ); angular.forEach( companyInfo, function( coInf ) { if( coInf.companyID == companyID ) { console.log(coInf); coInfo = coInf; } }) return coInfo; } you are not returning value from function but from forEach and that will not return the value from the function. it has nothing to do with angular, btw. EDIT also you can use libraries like lodash/underscore for search/filter functionalities
answers question: http://stackoverflow.com/q/25086431

http://stackoverflow.com/q/25105938
tagged with: angularfire
favorite count: 0
has body: This code works however I'm using two refs to access different areas of the same object. A routine may have multiple pages. Is there a way to create new pages and just use one ref to push pages onto $scope.routine.pages that also create a unique id? angular.module('screenTester.auth.routine', [ 'screenTester.auth.routine.page' ]) .config(['$stateProvider', function($stateProvider) { $stateProvider .state('auth.routine', { url: '/routine/:routineId', controller: 'RoutineCtrl', templateUrl: '/dist/auth/routine/routine.html' }); }]) .controller('RoutineCtrl', ['$scope', '$stateParams', '$firebase', function($scope, $stateParams, $firebase) { $scope.routineId = $stateParams.routineId; // Combine these two and still create pages with a unique id? var ref = new Firebase("https://url.firebaseio.com/user" + $scope.auth.user.id + '/routines/' + $scope.routineId); var sync = $firebase(ref); var ref = new Firebase("https://url.firebaseio.com/user" + $scope.auth.user.id + '/routines/' + $scope.routineId + '/pages'); var pagesSync = $firebase(ref); $scope.createPage = function() { // What method would I use here on `$scope.routine`? $scope.routinePages.$add($scope.newPage); $scope.routinePages.$save(); $scope.newPage = {}; $scope.toggles.showCreatePage = false; }; $scope.init = function() { $scope.routine = sync.$asObject(); $scope.routinePages = pagesSync.$asArray(); $scope.newPage = {}; $scope.toggles = {}; }; $scope.init(); }]); Disclaimer: Not my final code I'm learning how firebase works to see if it's a good solution.
tagged with: firebase
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39101750
has comment: http://stackoverflow.com/comment/39115069
type: Question
tagged with: javascript
has title: firebase - Use one ref for an object and push onto it's child array
has answer: http://stackoverflow.com/a/25135934
accepted answer: http://stackoverflow.com/a/25135934
upvote count: 1
answer count: 1

http://stackoverflow.com/a/25120586
has comment: http://stackoverflow.com/comment/39121914
has body: var p = $('#sentences-wrapper'); $.getJSON('src/js/data.json', function(data) { var random = data.sentences[Math.floor(Math.random() * data.sentences.length)]; p.append("&lt;span&gt;" + random.title + "&lt;/span&gt;"); }); The data argument in your getJSON callback should be the contents of your JSON file, already parsed into a JS object. In that case, data.sentences should be identical to jsonContent.sentences in your codepen example.
answers question: http://stackoverflow.com/q/25119793
has comment: http://stackoverflow.com/comment/39121824
has comment: http://stackoverflow.com/comment/39122440
score: 0
has comment: http://stackoverflow.com/comment/39096859
has comment: http://stackoverflow.com/comment/39101237
has comment: http://stackoverflow.com/comment/39116483
has comment: http://stackoverflow.com/comment/39112188
type: Answer
has comment: http://stackoverflow.com/comment/39096930

http://stackoverflow.com/comment/39273806
comment on: http://stackoverflow.com/q/25215597
type: Comment
type: QuestionComment
score: 1
has text: What other code does it disable? This is probably not your issue but your HomeRooms div you have a selfclosing on. The styling you add for you image in the css, is that temp? Hou already have it in css

http://stackoverflow.com/comment/39024529
score: 0
type: Comment
type: QuestionComment
has text: Can you please reformat the code? It's a little bit messy and you have to tags that oppen but never close ...
comment on: http://stackoverflow.com/q/25081979

http://stackoverflow.com/comment/39173366
comment on: http://stackoverflow.com/a/25161090
type: AnswerComment
has text: The custom authorization class will return json if the request is unauthorized, which it is a general function. so the server might return html or json, etc . now for this function the action method will return an html to render inside the dialog box, but if the user is not authorized then he will receive the unauthorized message (defined inside the authorization class) and my $.when(ajaxCall) will handle displaying the unauthorized code,, so in my situation the $.when(ajaxCall) is mandatory , otherwise the user will not receive any unauthorized message. what do u think/
score: 0
type: Comment

http://stackoverflow.com/a/25153506
has comment: http://stackoverflow.com/comment/39158042
has comment: http://stackoverflow.com/comment/39157927
upvote count: 4
type: Answer
answers question: http://stackoverflow.com/q/25153474
has comment: http://stackoverflow.com/comment/39158111
has body: That will be space not backspace, And I think you are getting confused the syntax of array from other languages. In javascript the array syntax is [] not {}. Use this "My name is Aditya Kumar".split(' ') Output ["My", "name", "is", "Aditya", "Kumar"] In javascript arrays are like above not like which you have mentioned.
downvote count: 1
score: 3
has comment: http://stackoverflow.com/comment/39158158

http://stackoverflow.com/comment/39118732
type: AnswerComment
comment on: http://stackoverflow.com/a/25080203
type: Comment
has text: I am asking about calculation part I think it will work something which seek for proportional combination of height and width of screen and original image that i now how to get image and screen size thanks for that
score: 0

http://stackoverflow.com/a/25227174
answers question: http://stackoverflow.com/q/25227119
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: String.format is not a native String extension. It's pretty easy to extend it yourself: if (!String.prototype.format) { String.prototype.format = function(...args) { return this.replace(/(\{\d+\})/g, function(a) { return args[+(a.substr(1, a.length - 2)) || 0]; }); }; } // usage console.log("{0} world".format("hello")); .as-console-wrapper { top: 0; max-height: 100% !important; } [Update 2020] It's not that fashionable anymore to extend native objects. Although I don't oppose it (if used carefully) a format-function can do exactly the same, or you can use es20xx template literals (see MDN). // no native String extension const someValue = 100; const otherValue = 555; const format = (str2Format, ...args) =&gt; str2Format.replace(/(\{\d+\})/g, a =&gt; args[+(a.substr(1, a.length - 2)) || 0] ); console.log(format("someValue = {0}, otherValue = {1}", someValue, otherValue)); // template literal console.log(`someValue = ${someValue}, otherValue = ${otherValue}`); .as-console-wrapper { top: 0; max-height: 100% !important; }
upvote count: 17
score: 17
accepted answer of: http://stackoverflow.com/q/25227119

http://stackoverflow.com/a/25181996
type: Answer
answers question: http://stackoverflow.com/q/25181782
has body: You can get the first cell with this.cells[0] and the text inside with innerHTML: table.rows[i].onclick = function () { console.log(this.cells[0].innerHTML); }
accepted answer of: http://stackoverflow.com/q/25181782
type: AcceptedAnswer
score: 0

http://stackoverflow.com/q/25151398
has body: I was building a chrome extension and my code (or the part of code which returns an error) looks something like this: function callback(item) { for (key in item){ if (item.hasOwnProperty(key)) { (function (i) { $.ajax({ type: "POST", url: some https webpage, data: some data in string format, success: function(info){ var $html = $(info); var $blockquote = $html.find("blockquote"); } }); // end of ajax })(key); } } } } function retrieve(fn) { chrome.storage.sync.get(fn); } retrieve(callback); and it returns this (on the console): Failed to load resource: net::ERR_FILE_NOT_FOUND chrome-extension://mnnhocoeemolfdehajadghogfffnkiem/images/bnr.gif Failed to load resource: net::ERR_FILE_NOT_FOUND chrome-extension://mnnhocoeemolfdehajadghogfffnkiem/images/sp.gif I've tried disabling other extensions and changing my file names, but those didn't work.. Can anyone help?? : ( Edit: Here's my manifest file. { "manifest_version": 2, "name": "schedule", "version": "1.0.0", "description": "checks berkeley schedule", "permissions": [ "https://telebears.berkeley.edu/enrollment-osoc/*", "http://schedule.berkeley.edu/*/", "http://osoc.berkeley.edu/", "activeTab", "storage" ], "browser_action": { "default_icon": { "19": "icon.png" }, "default_popup": "schedule.html", "scripts": ["jquery-1.11.1.js", "schedule.js"] }, "options_page": "options.html" }
duplicate of: http://stackoverflow.com/q/12089752
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12089752
tagged with: google-chrome
type: Question
accepted answer: http://stackoverflow.com/a/25151553
tagged with: javascript
tagged with: jquery
has title: chrome: fail to load resource
has answer: http://stackoverflow.com/a/25151553
score: 0
tagged with: google-chrome-extension
answer count: 1

http://stackoverflow.com/comment/39179887
type: Comment
has text: I've updated my answer to include multiple text inputs. Cheers!
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25106316

http://stackoverflow.com/a/72862355
type: Answer
has body: Create a simple prototype for the Array class Array.prototype.remove = function() { // Helper function to remove a single element from a list if exists item = arguments[0] if (this.includes(item)) { index = this.indexOf(item) this.splice(index, 1) } } // Now we can call myList.remove(YourObject) The above code will add the remove method to all your lists, so this will help you not just for objects but also strings, integers, or any data type
answers question: http://stackoverflow.com/q/25172082
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/comment/39249023
type: AnswerComment
comment on: http://stackoverflow.com/a/25200365
score: 0
type: Comment
has text: Yes, it's a good solution, but my icon must be in front of the text node :(

http://stackoverflow.com/comment/39016207
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25077561
has text: Why exactly do you want this? Hope it's not a kind of protection(security)?
score: 0

http://stackoverflow.com/q/25089024
has body: How can I have Synchronous calls in two nested 'for' loops in Node.JS: Here is my Asynchronous call; I don't know how I can have synchronous version of my code, which goes to next iteration when create_db is done! var new_items = []; for (var key in config.models) { var selected_field = config.models[key]; for (var item in config.models[key].fields) { var selected_item = config.models[key].fields[item]; new_items.push({AttributeName: selected_item.name, AttributeType: selected_item.type}); } CreateDB(selected_field.name, new_items); var selected_item = config.models[key].fields[item]; } EDDITED: In create_db I'm using call back function! function CreateDB(name, new_items) { ddb.createTable(name, {hash: ['id', ddb.schemaTypes().number], range: ['time', ddb.schemaTypes().string], AttributeDefinitions: new_items }, {read: 1, write: 1}, function(err, details) { console.log("The DB is now created!"); }); } Thanks
has answer: http://stackoverflow.com/a/25089389
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39038419
possible better answer: http://stackoverflow.com/a/25089396
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39038864
has comment: http://stackoverflow.com/comment/39038371
has comment: http://stackoverflow.com/comment/39038498
answer count: 3
favorite count: 0
accepted answer: http://stackoverflow.com/a/25089389
has comment: http://stackoverflow.com/comment/39038405
has title: Synchronous calls in two nested loops
has answer: http://stackoverflow.com/a/25089396
upvote count: 1
has answer: http://stackoverflow.com/a/25089065
has comment: http://stackoverflow.com/comment/39038389
tagged with: node.js

http://stackoverflow.com/a/25223990
has comment: http://stackoverflow.com/comment/39289113
has comment: http://stackoverflow.com/comment/39289198
type: Answer
score: 1
has body: Try this - it's possibe to remove the if selection for inputType by creating a tiny lookup table from original value to new value: function changeData(data) { var map = { NUMBER: "number", TEXT: "text", SWITCH: "select" }; // data is an object - use for .. in to enumerate for (var key in data.input) { var e = data.input[key]; // alias for efficient structure dereferencing e.label = e.displayName; e.title = e.displayDetail; e.type = map[e.inputType]; delete e.displayName; delete e.displayDetail; delete e.inputType; } }; There's really no need for the hasOwnProperty test these days - only use it if you think there's any risk that someone unsafely added to Object.prototype. jQuery manages without it quite happily, other modern code should do to. If the mapping of field names was any longer I'd consider using another mapping table with another loop to remove the hard coded copy/delete pairs.
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25223733
answers question: http://stackoverflow.com/q/25223733
type: AcceptedAnswer

http://stackoverflow.com/a/25147989
score: 0
answers question: http://stackoverflow.com/q/25147601
type: Answer
has body: just to expand on what Juvian said (using recursion) recursion is, essentially, a function that repeats itself. For JSON data, you would verify if a property is an object or array, and recursively call the function that traverses the JSON. I have no code or data to work with, so here is a very simple example var data = [ { obj: { prop: 'some value', prop2: [ 'some value again' ] }, value: 'string' } ]; function traverse(d) { var type = Object.prototype.toString.call(d), max, i; if(type === 'object Object') { max = Object.keys(data).length; // for objects } else if (type === 'object Array') { max = d.length; // for arrays } for (i = 0; i &lt; max; i++) { if (typeof d[i] === 'object') { // continue traversing 1 level deeper traverse(d[i]); } else { // do something with the value } } } traverse(data);

http://stackoverflow.com/q/25157691
has answer: http://stackoverflow.com/a/25157840
has body: I have a mvc form with client side validations. I want to make sure users cant submit the page if the javascript is disabled because then the validations will be bypassed. Is this possible, how can it be done? Thanks in advance!
answer count: 4
has answer: http://stackoverflow.com/a/25157769
accepted answer: http://stackoverflow.com/a/25157777
has comment: http://stackoverflow.com/comment/39165453
type: AnsweredQuestion
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25157777
has answer: http://stackoverflow.com/a/25157836
type: Question
has title: Prevent form submit when the javascript is disabled
possible better answer: http://stackoverflow.com/a/25157769
tagged with: .net
tagged with: javascript
has comment: http://stackoverflow.com/comment/39165380
tagged with: client-side-validation
score: 0

http://stackoverflow.com/a/25133648
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39148883
upvote count: 2
answers question: http://stackoverflow.com/q/25131958
has comment: http://stackoverflow.com/comment/39120955
type: Answer
has body: In coffeescript "Everything is an Expression (at least, as much as possible)". And the last expression of a function is its return value. To enforce that, the compiler silently add implicit return statement at the end of each execution branch of a function. So, the return _load ... in JS is expected as the last statement of your outer function is that function definition (_load = (url) -&gt; ...). If for some reason, you really don't want the inner function being returned, you have to add an extra statement at the end of your function. Please compare those various cases: 1: Implicit return (your case) -&gt; "Outer function" inner = -&gt; "Inner function Compiles into (function() { (function() { "Outer function"; var inner; return inner = function() { return "Inner function"; }; }); }).call(this); 2: With explicit return statement -&gt; "Outer function" inner = -&gt; "Inner function" return Compiles into // Generated by CoffeeScript 1.7.1 (function() { (function() { "Outer function"; var inner; inner = function() { return "Inner function"; }; }); }).call(this); That extra return statement will in fact made the outer function return value undefined. If you want, you can make that explicit by using return undefined or even simply undefined instead of the bare return. The compiled code will be slightly different (explicit return void 0) but the behavior will be the same. 3: explicit undefined expression -&gt; "Outer function" inner = -&gt; "Inner function" undefined # or `return undefined` Compiles into (function() { function() { "Outer function"; var inner; inner = function() { return "Inner function"; }; return void 0; }; }).call(this);

http://stackoverflow.com/comment/39103996
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25124219
has text: Please could you give us a [working fiddle](http://jsfiddle.net/)? For what I can see there, the "empty-space" is the `margin-bottom : 14px` of `.container` class.

http://stackoverflow.com/q/25168288
accepted answer: http://stackoverflow.com/a/25168468
upvote count: 4
tagged with: meteor
tagged with: node.js
has title: Meteor 0.8.x namespacing
tagged with: directory-structure
tagged with: namespaces
type: AnsweredQuestion
type: Question
has body: Background Info I've witnessed that Meteor wraps each file into an anonymous function to prevent filling up the global namespace. Assume that I have a similar file structure: client/ index.html style.css client.js helpers/ somehelper.js server/ server.js models/ ... My Questions How can I use objects that are in somehelper.js from the file client.js? How can I create my own namespaces? For example: client, client.helpers, models and server.
answer count: 1
downvote count: 0
tagged with: javascript
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25168468

http://stackoverflow.com/comment/39035736
comment on: http://stackoverflow.com/a/25086315
score: 0
type: AnswerComment
type: Comment
has text: Thanks for your answer but even if I don't put the next() in there I have the middleware called twice...

http://stackoverflow.com/comment/39200681
score: 0
type: Comment
type: QuestionComment
has text: @Ilya Luzyanin thanks that was the answer I needed only another div outside in capture phase which will capture all events every time then inner div and other objects inside it will catch events using bubbling using also e.stopPropagation() on objects inside inner div gave me what I wanted.
comment on: http://stackoverflow.com/q/25162378

http://stackoverflow.com/q/25175895
downvote count: 0
tagged with: jquery
favorite count: 0
has title: onclick of button send checked checkbox values to a function using jquery
type: Question
has comment: http://stackoverflow.com/comment/39199593
has comment: http://stackoverflow.com/comment/39200047
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
has answer: http://stackoverflow.com/a/25176888
upvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/39199501
has body: I have an html code where i check the checkboxes and adjacent to each checkboxes an anchor tag is provided with certain text tag. when user clicks on the parent checkbox child checkboxes are checked. Now onclick of an "OK" button I need to send the checked checkboxes to a javascript function. As in my code there is no value for checkbox I need the corresponding anchor tag value to be sent to javascript function. But all anchor tags are being sent to the function. I want only the checked boxes corresponding anchor tag values to be sent to the function. Fruits Apple Orange Birds Peacock Parrot Food Bread my js code function fnTest(check) { if ($(check).is(':checked')) { $(check).siblings('.example:first').find('.child').prop("checked", true); } else { $(check).siblings('.example:first').find('.child').prop("checked", false); } } function submit(check) { var values = []; for (i = 0; i < check.length; i++) { if (check[i].checked == true) { // alert($(check[i]).value); var test = document.getElementsByTagName("a"); alert($(test).text()); values.push($(test).text()); } } // alert(values.eq(0)); alert(values.join()); //alert(values); //var text[]=values.text(); // alert(text); } Here is a demo Fiddle
has answer: http://stackoverflow.com/a/25176309
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25176888
possible better answer: http://stackoverflow.com/a/25176309
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25176244

http://stackoverflow.com/q/25136687
tagged with: jquery
tagged with: c++
linked to: http://stackoverflow.com/q/13758205
type: UnansweredQuestion
type: Question
tagged with: c#
has answer: http://stackoverflow.com/a/25138195
has title: Trigger System.Windows.Forms dll using javascript ActiveX object
score: 0
answer count: 1
has body: I am developing a C++ custom wizard with 1 page UI consisting of a dropdown control. I want to populate this dropdown control with all input languages installed on that machine. (An input language is a culture/keyboard layout pair that determines how the physical keys on a keyboard map or plot to characters in a language.) I am trying to get this list &amp; have found a way to do in C#. public void GetLanguages() { // Gets the list of installed languages. foreach(InputLanguage lang in InputLanguage.InstalledInputLanguages) { textBox1.Text += lang.Culture.EnglishName + '\n'; } } No i want to implement the same using javascript as my custom wizard uses .js I tried doing below, but getting the js runtime error: "Automation Server can't create object". &lt;select class="sideBtn" size="1" id="LANGUAGE_LISTBOX" accesskey="L" title="Select Languages:"&gt; &lt;script type="text/javascript"&gt; var obj = new ActiveXObject("System.Windows.Forms"); // Gets the list of installed languages. for (var lang in obj.Windows.Forms.InputLanguage.InstalledInputLanguages) { document.write('&lt;option value="' + lang.Culture.EnglishName + '"&gt;' + lang.Culture.EnglishName + '&lt;/option&gt;'); } &lt;/script&gt; &lt;/select&gt; I have tried like this as i have referred other articles which shows trigerring a c# dll using javascript ActiveX object. Triggering C# dll using Javascript ActiveX Object Can some one help me please?? Regards, Deepthi
tagged with: javascript

http://stackoverflow.com/comment/39241955
type: QuestionComment
has text: Hmmm... it's really hard to tell without your "postcode library" code. You should try to find the snippet where the event is bound, de-minificate it and show it to us. Without that code, it could a lot of different things For the moment, I've thought of 2 possible reasons : - I've looked into the chosen.js source code. The snipped you included in your post is actually wrapped in a conditional statement : `if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {`. When you tried firing a native JS event, did you put your code *inside* the conditional statement ?
type: Comment
comment on: http://stackoverflow.com/q/25194291
score: 0

http://stackoverflow.com/q/25177650
score: 0
has comment: http://stackoverflow.com/comment/39930658
answer count: 1
has comment: http://stackoverflow.com/comment/39211980
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39209545
has answer: http://stackoverflow.com/a/26404437
has title: EaselJS object inspector
type: Question
linked to: http://stackoverflow.com/q/22764384
tagged with: canvas
has body: I am converting an existing code base from using Flash to using CreateJS but I am in need of a way to stop the Stage update and inspect the EaselJS GUI elements for debugging. My list of requirements for the debugger is It must be possible to stop the propagation of CreateJS ticks to the non-debug parts of the GUI so that these parts do not change during inspection. In inspection mode, it must be possible to see the hierarchy tree of the non-debug parts of the GUI. In inspection mode, when an element in the hierarchy tree is selected, then the corresponding visible canvas graphics must change appearance to clearly distinguish it from the other graphics on the canvas, and so that its boundaries are clearly visible. In inspection mode, when a point is selected on the canvas, then the corresponding element must be visible and highlighted in the hierarchy tree. In inspection mode, when a point is selected on the canvas, then the following properties must be displayed for the corresponding element: coordinates &amp; size. To achieve the above, I need to implement at least these parts. Stage traversal and data extraction. Tree presentation of the data extracted. Highlight of specific stage objects. Control of the Stage ticking. Are there libraries that can help me create such an inspector tool?
tagged with: javascript
tagged with: haxe
tagged with: createjs

http://stackoverflow.com/q/25075687
tagged with: jquery
has comment: http://stackoverflow.com/comment/39012704
has comment: http://stackoverflow.com/comment/39013237
has answer: http://stackoverflow.com/a/25076795
possible better answer: http://stackoverflow.com/a/25076032
accepted answer: http://stackoverflow.com/a/25076795
upvote count: 1
has answer: http://stackoverflow.com/a/25076032
tagged with: http://stackoverflow.com/tag/html
has body: I have a span with a background image that I want to alternate between a background image of a plus and minus on click. I want to add and remove the class 'open' to do this. My span looks like this... &lt;span class="expand open"&gt;&lt;/span&gt; And my JQuery looks like this... $(function() { $('.expand').click(function() { if ($(this).hasClass('open')) { $(this).removeClass('open'); } else { $(this).addClass('open'); } }); }); The behaviour I'm getting is that it will add the class 'open' but then after repeated clicks will not remove it again. Logging to the console has shown that my if statement is always evaluating false. I've considered using toggleClass but haven't done so because once this is working I intend to use the same if statement to show / hide content blocks. http://jsfiddle.net/Vz7YL/ EDIT Since people are focussing on my css, I'll provide that too. (SASS/SCSS): .expand { background: url(/images/plus-minus-orange.gif) top center no-repeat; display: block; height: 21px; margin: 0 auto; width: 22px; &amp;.open { background: url(/images/plus-minus-orange.gif) bottom center no-repeat; } } Can I also add that the span IS displaying correctly and IS clickable, and I cannot recreate the problem with a simplified version of the code.
has comment: http://stackoverflow.com/comment/39012701
favorite count: 0
has comment: http://stackoverflow.com/comment/39013981
has comment: http://stackoverflow.com/comment/39013214
has comment: http://stackoverflow.com/comment/39013149
has answer: http://stackoverflow.com/a/25076612
answer count: 5
has comment: http://stackoverflow.com/comment/39012815
has comment: http://stackoverflow.com/comment/39012759
has title: JQuery hasClass - why does it always return false in this case?
has comment: http://stackoverflow.com/comment/39012839
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39013921
has answer: http://stackoverflow.com/a/25076115
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39013072
has comment: http://stackoverflow.com/comment/39013000
has comment: http://stackoverflow.com/comment/39012883
type: Question
has answer: http://stackoverflow.com/a/25076071
tagged with: javascript

http://stackoverflow.com/q/25089297
has answer: http://stackoverflow.com/a/46076444
has answer: http://stackoverflow.com/a/52692312
has answer: http://stackoverflow.com/a/57076208
has answer: http://stackoverflow.com/a/36275130
has answer: http://stackoverflow.com/a/33962613
has answer: http://stackoverflow.com/a/56588415
has answer: http://stackoverflow.com/a/25196101
has answer: http://stackoverflow.com/a/54560932
linked to: http://stackoverflow.com/q/51552712
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/48010607
has answer: http://stackoverflow.com/a/38950748
has title: Avoid dropdown menu close on click inside
has answer: http://stackoverflow.com/a/25253002
upvote count: 402
has answer: http://stackoverflow.com/a/40959313
has answer: http://stackoverflow.com/a/59110957
has comment: http://stackoverflow.com/comment/39215893
type: Question
has answer: http://stackoverflow.com/a/46229426
has answer: http://stackoverflow.com/a/55435771
has comment: http://stackoverflow.com/comment/39228225
has answer: http://stackoverflow.com/a/25251316
has answer: http://stackoverflow.com/a/54830039
has answer: http://stackoverflow.com/a/49930389
has answer: http://stackoverflow.com/a/34216265
downvote count: 0
has answer: http://stackoverflow.com/a/44410865
has comment: http://stackoverflow.com/comment/39213194
has answer: http://stackoverflow.com/a/37817449
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25196101
has answer: http://stackoverflow.com/a/35800406
has answer: http://stackoverflow.com/a/25252041
has answer: http://stackoverflow.com/a/49345503
has answer: http://stackoverflow.com/a/65951736
has answer: http://stackoverflow.com/a/51581081
has answer: http://stackoverflow.com/a/61516042
has answer: http://stackoverflow.com/a/32922725
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/55014995
score: 402
has answer: http://stackoverflow.com/a/25089383
has answer: http://stackoverflow.com/a/56257420
has answer: http://stackoverflow.com/a/69461832
has answer: http://stackoverflow.com/a/58042545
has answer: http://stackoverflow.com/a/38372928
has answer: http://stackoverflow.com/a/65840195
answer count: 40
has body: I have a Twitter Bootstrap dropdown menu. As all Twitter Bootstrap users know, the dropdown menu closes on click (even clicking inside it). To avoid this, I can easily attach a click event handler on the dropdown menu and simply add the famous event.stopPropagation(). Menu item 1 This looks easy and a very common behavior, however, and since carousel-controls (as well as carousel indicators) event handlers are delegated to the document object, the click event on these elements (prev/next controls, ...) will be “ignored”. $('ul.dropdown-menu.mega-dropdown-menu').on('click', function(event){ // The event won't be propagated up to the document NODE and // therefore delegated events won't be fired event.stopPropagation(); }); Relying on Twitter Bootstrap dropdown hide/hidden events is not a solution for the following reasons: The provided event object for both event handlers does not give reference to the clicked element I don't have control over the dropdown menu content so adding a flag class or attribute is not possible This fiddle is the normal behavior and this fiddle is with event.stopPropagation() added. Update Thanks to Roman for his answer. I also found an answer that you can find below.
has answer: http://stackoverflow.com/a/65730957
favorite count: 0
has answer: http://stackoverflow.com/a/43087552
tagged with: twitter-bootstrap-3
possible better answer: http://stackoverflow.com/a/32922725
has answer: http://stackoverflow.com/a/43550657
has answer: http://stackoverflow.com/a/41453806
has comment: http://stackoverflow.com/comment/39357285
has answer: http://stackoverflow.com/a/69784727

http://stackoverflow.com/a/25218987
answers question: http://stackoverflow.com/q/25218912
has comment: http://stackoverflow.com/comment/39280949
has body: I think it's because you mixed up $_POST and $_GET: Your code: ajaxRequest.open('POST','generatePageToken.php?pageId=' + pageId, true); ^ pageId is GET ajaxRequest.setRequestHeader('Content-type','application/x-www-form-urlencoded'); ajaxRequest.send('accessToken=' + accessToken); ^ accessToken is POST You're sending pageId as a GET variable while accessToken is a POST variable. However, your PHP retrieves the variables as: $accessToken = $_GET['accessToken']; $pageId = $_POST['pageId']; It should be the other way around, such as: $accessToken = $_POST['accessToken']; $pageId = $_GET['pageId']; If you want to post on your page as the page's user, you need to change the scope of your permissions first: You need }, { scope: 'manage_pages, publish_stream'});, (added publish_stream). Now, it's very easy to post, simply send a POST request: $data = http_build_query(array( 'access_token' =&gt; **your access token**, 'message' =&gt; 'hello world!' )); $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://graph.facebook.com/v2.1/1521533601413118/feed'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); curl_close($ch);
type: Answer
has comment: http://stackoverflow.com/comment/39281029
has comment: http://stackoverflow.com/comment/39280263
has comment: http://stackoverflow.com/comment/39283171
has comment: http://stackoverflow.com/comment/39285238
has comment: http://stackoverflow.com/comment/39280432
has comment: http://stackoverflow.com/comment/39281082
has comment: http://stackoverflow.com/comment/39283371
has comment: http://stackoverflow.com/comment/39280171
has comment: http://stackoverflow.com/comment/39280036
has comment: http://stackoverflow.com/comment/39280194
has comment: http://stackoverflow.com/comment/39280327
has comment: http://stackoverflow.com/comment/39280396
has comment: http://stackoverflow.com/comment/39280636
score: 0

http://stackoverflow.com/a/25154293
has comment: http://stackoverflow.com/comment/39160494
accepted answer of: http://stackoverflow.com/q/25153797
has comment: http://stackoverflow.com/comment/39161343
has body: The problems is that fields (columns) cannot be numbers. This is because internally, if you have a column called 1, it generates code as data.1 which is not valid. Change your columns name to a valid JavaScript field name and it will work.
type: Answer
has comment: http://stackoverflow.com/comment/39159296
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25153797
type: AcceptedAnswer

http://stackoverflow.com/comment/39057012
comment on: http://stackoverflow.com/a/25099240
score: 1
type: AnswerComment
has text: Yes, I would say this is most flexible approach.
type: Comment

http://stackoverflow.com/q/25156704
tagged with: javascript
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/39169784
has title: how to add URL a parameter to the request in iframe
tagged with: iframe
has comment: http://stackoverflow.com/comment/39164452
type: Question
has body: I need to add a parameter to the each URL loaded in the iframe: if someone tries to open https://www.google.ru I have to load page with parameter: https://www.google.ru/?noredirect=true. Have no idea how to resolve this( Thanks.

http://stackoverflow.com/q/25217595
has title: Detect drop event on individual objects in kineticJS
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: kineticjs
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25220409
has body: Main idea Creating a match the following exercise with the right side dots being draggle and left side dots are the targets. Red dots are draggable and are to be dropped on the blue dots. Target Each dot has an associated value with them, furthermore, once a red dot is dropped on a blue dot no other red dot can be placed on the same blue dot. Approach Storing coordinates of each blue dot in an array, and once a red dot is placed closeby a blue dot, the information related to that dot is removed from the array (hence making it invisible). Problem How can I detect a drop event for each red dot, most solutions available online suggest having a .on even on the shape. However, how should I uniquely identify which one? Resource JSFiddle: http://jsfiddle.net/wLcxchfv/1/
type: AnsweredQuestion
type: Question
score: 0
has answer: http://stackoverflow.com/a/25220409

http://stackoverflow.com/q/25079054
answer count: 1
downvote count: 0
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39018994
accepted answer: http://stackoverflow.com/a/25079682
type: AnsweredQuestion
has body: I'm trying to send form with dynamically changing action url, but right after changing attribute the form doesn't submits. Here is simple example: http://jsfiddle.net/THZHL/1/ 1. set url 2. Send {{url}} I don't understand why it happens in that way.
upvote count: 3
type: Question
has title: Submit form with dynamically changing action attribute
score: 3
tagged with: javascript
tagged with: forms
has comment: http://stackoverflow.com/comment/39019015
has answer: http://stackoverflow.com/a/25079682

http://stackoverflow.com/q/25194444
tagged with: safari
has comment: http://stackoverflow.com/comment/39343039
has comment: http://stackoverflow.com/comment/39594352
has comment: http://stackoverflow.com/comment/39378694
has title: Meteor crashing Safari
has comment: http://stackoverflow.com/comment/39253971
has body: I've run into an incredibly ridiculous bug in my meteor app. Essentially, I have a particular page, that renders a few templates, that crashes Safari on a Mac, and only Safari (and only when the console is NOT open). I've narrowed it down (somewhat) to a scenario that seem to help fix the problem. Removing event handling on the 'floorList' template listed below. Any thoughts, questions, suggestions would be much appreciated. I know it's hard to say without seeing everything, but here's roughly the setup: we're using iron-router, main template loads: {{> yield}} our "yield" is a template: {{#each pageWithRank}} {{> pageItem}} {{/each}} 'pageItem' templates are loaded (limited to return 10 items) ... along with a "pageItem" js file that contains helpers and event handlers e.g.: Template.pageItem.helpers({ ... }); Template.pageItem.events({ 'click .shareable': function(e, template) { ... }, 'click .share': function(e, template) { ... }, 'click .removePage': function(e) { ... } }); Router Configuration: var preloadSubscriptions = []; preloadSubscriptions.push('notifications'); preloadSubscriptions.push('alerts'); preloadSubscriptions.push('myPages'); var mainYieldTemplates = { 'footer': { to: 'footer' }, 'header': {to: 'header'} }; Router.configure({ layoutTemplate: 'layout', loadingTemplate: 'loading', yieldTemplates: mainYieldTemplates, waitOn: function() { return _.map(preloadSubscriptions, function(sub) { if (typeof sub === 'object') { Meteor.subscribe(sub.subName, sub.subArguments); } else { Meteor.subscribe(sub); } }); } }); var coreSubscriptions = new SubsManager({ cacheLimit: 10, expireIn: 1 }); pagesListController = RouteController.extend({ template: 'pageList', increment: 10, limit: function() { return parseInt(this.params.pageLimit) || this.increment; }, findOptions: function() { return { sort: this.sort, limit: this.limit() }; }, pages: function() { return Pages.find({}, this.findOptions()); }, data: function() { var hasMore = this.pages().count() === this.l…
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39481694
has comment: http://stackoverflow.com/comment/39552055
has comment: http://stackoverflow.com/comment/39302076
has answer: http://stackoverflow.com/a/25464515
tagged with: meteor
favorite count: 0
score: 17
tagged with: iron-router
has comment: http://stackoverflow.com/comment/39257462
answer count: 1
upvote count: 17

http://stackoverflow.com/a/25175563
score: 0
has comment: http://stackoverflow.com/comment/39198827
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39199438
accepted answer of: http://stackoverflow.com/q/25175413
has comment: http://stackoverflow.com/comment/39199609
has comment: http://stackoverflow.com/comment/39198893
type: Answer
has body: Use this: var comment = thread.comments.data[j].message.split(' ').length; This will count the number of words in message rather than the number of characters. And to get a single total for all the threads, you need to initialize the counter outside the first loop: function testAPI() { console.log('Welcome! Fetching your information.... '); FB.api('/me/inbox?limit=10',function(response) { var babe = 0; for (var i=0;i&lt;response.data.length; i++) { var thread = response.data[i]; for (var j=0;j&lt;thread.comments.data.length;j++) { if (thread.comments.data[j].message) { var comment = thread.comments.data[j].message.split(' ').length; babe += comment; } } } console.log(babe); }); }
has comment: http://stackoverflow.com/comment/39200156
has comment: http://stackoverflow.com/comment/39199371
has comment: http://stackoverflow.com/comment/39199541
has comment: http://stackoverflow.com/comment/39199628
has comment: http://stackoverflow.com/comment/39200091
answers question: http://stackoverflow.com/q/25175413

http://stackoverflow.com/comment/39283972
comment on: http://stackoverflow.com/a/25219295
has text: Hey @user3469760, just use this instead of the alert : `document.location.href = window.location.href.split('?')[0] + "?wpfpaction=add&postid=" + $(this).parents('div.wrap-box-video').first().attr("id");` Updated [JS Fiddle](http://jsfiddle.net/ankitsnghn/b17uqtdh/2/)
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/79671664
score: 0
type: AnswerComment
type: Comment
has text: @Hozefa, then answer the OP question with your solution.
comment on: http://stackoverflow.com/a/38546692

http://stackoverflow.com/a/25185959
has comment: http://stackoverflow.com/comment/39218765
has comment: http://stackoverflow.com/comment/39219014
answers question: http://stackoverflow.com/q/25185876
upvote count: 1
has comment: http://stackoverflow.com/comment/39219518
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25185876
has comment: http://stackoverflow.com/comment/39217934
has comment: http://stackoverflow.com/comment/39219546
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39219573
has body: You need to use a closure to bind elements in a loop like that: for(i=0; i&lt;btn.length; i++){ (function(i) { //closure inside so i is correct. var a = ["bold","italic"]; //removed quotes btn[i].addEventListener('click', function(){ document.execCommand(a[i],false,null); }, false) })(i); }

http://stackoverflow.com/q/25176957
tagged with: http://stackoverflow.com/tag/html
has body: I am having two html tables which are coming dynamically with different data. Not able to export both to excel sheet i am willing to export single table. John Doe 80 vsr sub 90 like this my table comes with different set of data from db my js code is var tableToExcel = (function() { var uri = 'data:application/vnd.ms-excel;base64,' , template = ' <!--[if gte mso 9]> <x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook> <![endif]--> {table} ' , base64 = function(s) { return window.btoa(unescape((s))) } , format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } return function(table, name, filename) { if (!table.nodeType) table = document.getElementById(resultarea) var ctx = {worksheet: name || 'Worksheet', table: resultarea.innerHTML} document.getElementById("dlink").href = uri + base64(format(template, ctx)); document.getElementById("dlink").download = filename; document.getElementById("dlink").click(); } })() not able to export to excel same time both table data. Please help me.
score: 1
has answer: http://stackoverflow.com/a/61888394
upvote count: 1
tagged with: dom
has answer: http://stackoverflow.com/a/25177304
tagged with: excel
type: Question
tagged with: javascript
answer count: 2
has title: how to export multiple html tables to excel with single id
downvote count: 0
has comment: http://stackoverflow.com/comment/39201242
tagged with: jquery
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39135925
type: Comment
score: 0
type: AnswerComment
has text: Marking as the answer. It's too bad jQuery's promise implementation doesn't support such a reasonable use-case.
comment on: http://stackoverflow.com/a/25128456

http://stackoverflow.com/q/25159330
tagged with: javascript
tagged with: date
has answer: http://stackoverflow.com/a/75087650
has answer: http://stackoverflow.com/a/46374497
has answer: http://stackoverflow.com/a/73886078
has answer: http://stackoverflow.com/a/41629062
has answer: http://stackoverflow.com/a/75652106
has answer: http://stackoverflow.com/a/54622303
score: 235
has answer: http://stackoverflow.com/a/51871452
has answer: http://stackoverflow.com/a/50149186
has answer: http://stackoverflow.com/a/51905531
has answer: http://stackoverflow.com/a/59742683
has answer: http://stackoverflow.com/a/25159583
linked to: http://stackoverflow.com/q/3191664
has answer: http://stackoverflow.com/a/71608133
favorite count: 0
has answer: http://stackoverflow.com/a/78045928
accepted answer: http://stackoverflow.com/a/25159403
has answer: http://stackoverflow.com/a/71773898
has answer: http://stackoverflow.com/a/44787866
downvote count: 2
upvote count: 237
has answer: http://stackoverflow.com/a/45087884
has answer: http://stackoverflow.com/a/68104607
has answer: http://stackoverflow.com/a/61521236
has body: How can I get a date having the format yyyy-mm-dd from an ISO&nbsp;8601 date? My &nbsp;8601 date is 2013-03-10T02:00:00Z How can I get the following? 2013-03-10
possible better answer: http://stackoverflow.com/a/35393125
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/40520763
has answer: http://stackoverflow.com/a/35393125
linked to: http://stackoverflow.com/q/1056728
has answer: http://stackoverflow.com/a/77987981
has title: How to convert an ISO date to the date format yyyy-mm-dd?
has comment: http://stackoverflow.com/comment/126857129
has comment: http://stackoverflow.com/comment/82874840
has answer: http://stackoverflow.com/a/47952741
type: Question
answer count: 28
has answer: http://stackoverflow.com/a/76449547
duplicate of: http://stackoverflow.com/q/1056728
has answer: http://stackoverflow.com/a/74153862
has answer: http://stackoverflow.com/a/38590365
has answer: http://stackoverflow.com/a/25159489
has answer: http://stackoverflow.com/a/25159403
has answer: http://stackoverflow.com/a/38546692

http://stackoverflow.com/a/25197206
has comment: http://stackoverflow.com/comment/43784670
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/47887452
has comment: http://stackoverflow.com/comment/39239650
upvote count: 40
downvote count: 17
has comment: http://stackoverflow.com/comment/101965441
has comment: http://stackoverflow.com/comment/104706134
type: Answer
has comment: http://stackoverflow.com/comment/39256015
has comment: http://stackoverflow.com/comment/49791663
accepted answer of: http://stackoverflow.com/q/25197184
score: 23
answers question: http://stackoverflow.com/q/25197184
has comment: http://stackoverflow.com/comment/113919113
has comment: http://stackoverflow.com/comment/39239551
has body: element.getComputedStyle would return the height according to the value of box-sizing. If the element is using box-sizing: content-box;, you can use getComputedStyle to compute the height without padding or borders: var style = window.getComputedStyle(document.getElementById("Example"), null); style.getPropertyValue("height"); The above version will work in modern browsers. Please check currentStyle for IE browsers. Cross browser: try { el = window.getComputedStyle(document.getElementById('example'), null) .getPropertyValue('height'); } catch(e) { el = document.getElementById('example').currentStyle.height; } source

http://stackoverflow.com/q/25215141
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I have a world made up of randomly generated blocks (black being on, white being off). When zoomed out, it essentially looks like white noise. However, instead of each block being 1 pixel, they are 40 pixels and drawn as an image texture. My game works in a camera basis, so you can only see a fraction of the map at a time and you must move the character around to explore the rest. Currently, I have my game simply render each image (block texture) that is in range of the canvas. This results in drawing 80-100 images every single frame. While it works fine on a desktop computer, it doesn't do very well on mobile. Considering the map look doesn't change throughout the game, I wanted to try a different approach. I created a canvas the size of the world, which ended up being 1600x24000 pixels large. I drew all textures onto an external, hidden canvas. This was done once upon initialization. Then I would use the clipping attributes in drawImage to take the subsection that I needed. While it worked, it was extremely laggy and made things very much worse than they were before. In addition, image quality dropped to a more blurred look, which is undesirable. Now I'm looking for ways to better go about this. So my question is, how should I go about this? Thank you.
score: 1
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25216529
has answer: http://stackoverflow.com/a/25219687
answer count: 3
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25224915
has title: Large 2D world rendering in HTML5 Canvas

http://stackoverflow.com/q/25086082
answer count: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39033274
tagged with: url-rewriting
possible better answer: http://stackoverflow.com/a/25086403
tagged with: angularjs
score: 2
type: AnsweredQuestion
has body: i am using $locationProvider.html5Mode(true) to hiding # tag in addressbar. angular.module('witnessApp',['ngRoute','witnessApp.Service','witnessApp.Controller','ui.bootstrap','ngAnimate','ngTouch','growlNotifications', 'ngSanitize']) .config(function ($routeProvider,$provide,$locationProvider) { var loginReq; $routeProvider .when('/login', { templateUrl: 'views/login.html', controller:'LoginCtrl', access: { "requiredLogin": false } }) .otherwise({ redirectTo: '/login' }) $locationProvider.html5Mode(true); }) when app started it redirect to (login page) localhost:3000/login(it remove # sign from localhost:3000/#/login) but when i manually type or hit localhost:3000/login it does not redirect to login page. because it does api call using this. why it is not redirect to login? how can i completly remove # tag from angular? i dont need # in angular route even if i hit url manually.is there any alternative to resolve this issue? Edited:- i am using express framework at backend. code for server.js : var express = require('express'), app = module.exports = express(); app.engine('.html', require('ejs').__express); app.set('views', __dirname + "/views"); app.set('view engine', 'html'); app.use(express.static(__dirname + "/public")); app.get('/', function(req, res) { res.render('index'); }); app.listen(process.env.PORT || 3000); console.log('[Application] on port 3000'); some guys(which is commented below) suggest to handle this route in backend.but i dont have any idea.could you please suggest me how to do this?
type: Question
upvote count: 2
has answer: http://stackoverflow.com/a/25166303
has answer: http://stackoverflow.com/a/25086403
accepted answer: http://stackoverflow.com/a/25166303
has comment: http://stackoverflow.com/comment/39089388
tagged with: nginx
has title: how to completly remove # tag from angular route?
has comment: http://stackoverflow.com/comment/39033001
tagged with: apache
tagged with: javascript
has comment: http://stackoverflow.com/comment/39032790

http://stackoverflow.com/a/25105015
answers question: http://stackoverflow.com/q/25104540
accepted answer of: http://stackoverflow.com/q/25104540
has body: Bootstrap apparently has a class called .fade, which has an opacity of 0. That was why.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/39188561
score: 0
has text: I just checked it with IE11 emulating IE8, and aside from Codepens layout going crazy the slider seems to work just fine. Can you be more specific as to what is not working?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25168341

http://stackoverflow.com/comment/39128014
type: Comment
type: QuestionComment
has text: @NomiAli `value` is not a function.
comment on: http://stackoverflow.com/q/25137548
score: 0

http://stackoverflow.com/a/49749868
answers question: http://stackoverflow.com/q/25157513
type: Answer
has body: I want to pitch shift audio as well, and after ages I found this. I also re-formatted the code to make it easier to use for myself (you will need to replace "decode-audio-data/viper.ogg" with your own WAV or OGG filename.): Play | Stop
downvote count: 1
upvote count: 5
score: 4

http://stackoverflow.com/comment/39141761
comment on: http://stackoverflow.com/q/25142790
has text: What javascript source file is causing this log or error?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25104655
has answer: http://stackoverflow.com/a/25104697
has answer: http://stackoverflow.com/a/25104710
has comment: http://stackoverflow.com/comment/39067319
has comment: http://stackoverflow.com/comment/39066844
has comment: http://stackoverflow.com/comment/39067542
has comment: http://stackoverflow.com/comment/39068975
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39069143
has comment: http://stackoverflow.com/comment/39066996
has comment: http://stackoverflow.com/comment/39067585
answer count: 4
has comment: http://stackoverflow.com/comment/39067893
has body: Hi I have a varying URL similar to: http://farm4.staticflickr.com/3877/[image_id]_[secret].jpg e.g. http://farm4.staticflickr.com/3877/14628998490_233a15c423_q.jpg I need to extract image_id that's first set of numbers (i.e. 14628998490) before an underscore from 14628998490_233a15c423_q.jpg between the whole URL Is there a good way to extract image_id? Right now I am going to use: var image_id = image_url.match(/[\/]([0-9]+)_/)[1]
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25104858
type: Question
upvote count: 1
tagged with: regex
has answer: http://stackoverflow.com/a/25104714
has title: Any way to extract string within 2 different special characters using javascript?
has comment: http://stackoverflow.com/comment/39069039

http://stackoverflow.com/comment/39249926
type: AnswerComment
has text: alert is not popped up when the button is clicked.
type: Comment
comment on: http://stackoverflow.com/a/25203119
score: 0

http://stackoverflow.com/comment/39308845
type: Comment
comment on: http://stackoverflow.com/a/25232712
type: AnswerComment
score: 0
has text: Thank you so much for the direct answer. I really appreciate SO participants like you that provide real help.

http://stackoverflow.com/comment/39156591
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25147936
type: Comment
has text: whats rows above? please be more specific, there no 'show' anywhere, i just fixed your code...

http://stackoverflow.com/comment/39070094
has text: The list of items would be viewed by more than 1 person. So I wanted to have it add the item without anyone having that page open reloading their page. PS. Thank you for all the answers given, each one of you helped me. I will post a simple version of the solution here when I am done.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25106198
score: 0

http://stackoverflow.com/comment/39223917
type: QuestionComment
comment on: http://stackoverflow.com/q/25188952
type: Comment
has text: cool. let us know when you've found one and started playing with it, but got stuck on code that you feel should work, but doesn't? Stackoverflow is not for "what should I use?" questions.
score: 0

http://stackoverflow.com/a/25097523
accepted answer of: http://stackoverflow.com/q/25097473
type: AcceptedAnswer
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25097473
has body: I've seen places that say that routing requires a server: http://scotch.io/tutorials/javascript/single-page-apps-with-angularjs-routing-and-templating
downvote count: 0

http://stackoverflow.com/comment/39108842
has text: Of course. Anyone can add a breakpoint in the script, pause execution, and inspect everything in scope.
comment on: http://stackoverflow.com/q/25126899
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25076268
type: Answer
has body: Use following, it will work $('.horse:visible .dog').attr('id','cat')
answers question: http://stackoverflow.com/q/25076189
upvote count: 4
downvote count: 0
score: 4

http://stackoverflow.com/a/25115047
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39086194
score: 1
has body: Let's say you have the following markup: Hello I am a paragraph, and want to be placed inside intro. You can then use jQuery's appendTo to to copy p's html, and paste it inside #intro $(function(){ $('p').appendTo('#intro'); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25114881
answers question: http://stackoverflow.com/q/25114881
upvote count: 1

processing.js
tags question: http://stackoverflow.com/q/25105502
tag name: processing.js
type: Tag

http://stackoverflow.com/q/25138674
has title: Changing lineWidth for 1 side of a canvas polygon?
has comment: http://stackoverflow.com/comment/39153075
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39144549
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/39144044
tagged with: javascript
has body: I have been using code based on the code in this JSFiddle (http://jsfiddle.net/qQA88/) to create a hexagonal grid. I'm trying to figure out how to outline groups of hexagons in a thicker line, to indicate a "territory" of sorts. HexagonGrid.prototype.drawHex() is the code that draws each hexagon, side-by-side... specifically with: this.context.beginPath(); this.context.moveTo(x0 + this.width - this.side, y0); this.context.lineTo(x0 + this.side, y0); this.context.lineTo(x0 + this.width, y0 + (this.height / 2)); this.context.lineTo(x0 + this.side, y0 + this.height); this.context.lineTo(x0 + this.width - this.side, y0 + this.height); this.context.lineTo(x0, y0 + (this.height / 2)); this.context.closePath(); this.context.stroke(); Now, I know that each of those lineTo calls represents one side of the hexagon. If I kept a JSON object representing each hexagon, I could keep track of which side of a hexagon would have to be a thicker lineWidth, in order to create an enclosed territory. Example: var hex = { n: null, s: null, nw: null, ne: null, sw: null, se: true } In that case, the Southeastern side could be a thicker lineWidth. I understand that you cannot change the lineWidth inside of a single stroke() call. I've seen examples of people breaking the path for every side of a polygon to create this effect, but then I wouldn't be able to fill these hexagons with color, because of the broken path. Given a giant JSON array of hexagons as listed above, with properties for each side, can I achieve the effect I'm looking for? I'm thinking that as a last resort I'd have to draw the grid as usual, then draw the thicker outlines on top, but even then I'm not entirely sure how I'd loop through my JSON array to correctly get all the lineTo() functions to create a proper "territory". Any thoughts would be helpful. Edit: I'm an idiot (like lots of other SO questions, eh?). I could just let the hexagon get draw as shown above in one stroke(), then while the coordinates are still in mem…
has comment: http://stackoverflow.com/comment/39147066
score: 0
has comment: http://stackoverflow.com/comment/39142372

http://stackoverflow.com/q/25139940
tagged with: jquery
has answer: http://stackoverflow.com/a/25141902
tagged with: grails
has answer: http://stackoverflow.com/a/25147339
answer count: 2
has title: Grails template inline javascript vs external file javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/39135021
favorite count: 0
type: UnansweredQuestion
score: 1
has body: I have a template in a Grails project in which I have a click function on a button that appears in the template. I have noticed that if I include this click function code (jQuery) inline with the template's markup code inside 'script' tags of course, it works but as soon as I move the click function code to an outside file and try to include that file in the template by &lt;g:javascript src="externalFile.js" /&gt; then the click function doesn't work. I would like to know why this is. What makes it more mysterious is that some of the javascript in the external file does work. Here is the code of the click function (actually this is the entire external file I am trying to use): $(document).ready(function() { $(function() { $( "#tabs" ).tabs(); }); $("#search").click( function() { $('#AdminConsole p').css("font-size", "30px"); $("#AdminConsole p").html("Individuals Search Screen Results " + "&lt;br /&gt;" + "Batch ID " + selectedBatchID + ": " + selectedBatchDesc); }); }); The #search button is on the template and the '#AdminConsole p' is a text label on the main gsp that is already there before the template is even loaded later on the page.
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39135712
tagged with: javascript

http://stackoverflow.com/q/25082616
type: AnsweredQuestion
has title: How to inflate part of string
accepted answer: http://stackoverflow.com/a/25358663
type: Question
tagged with: zlib
tagged with: inflate
tagged with: javascript
has comment: http://stackoverflow.com/comment/39049941
score: 0
answer count: 2
has body: While building a NNTP client in NodeJS, I have encountered the following problem. When calling the XZVER command, the first data I receive from the socket connection contains both a string and an inflated string; 224 compressed data follows (zlib version 1.2.3.3) ^*�u�@����`*�Ti���d���x�;i�R��ɵC���eT�����U'�|/S�0���� rd� z�t]2���t�bb�3ѥ��&gt;�͊0�ܵ��b&amp;b����&lt;1/ �C�&lt;[&lt;��d���:��VW̡��gBBim�$p#I&gt;5�cZ�*ψ%��u}i�k�j �u�t���8�K��`&gt;��im When I split this string and try to inflate it like this; lines = chunk.toString().split('\r\n'); response = lines.shift(); zlib.inflate(new Buffer(lines.shift()), function (error, data) { console.log(arguments); callback(); }); I receive the following error; [Error: invalid code lengths set] errno: -3, code: 'Z_DATA_ERROR' Any help is welcome, I am kinda stuck here :( UPDATE After implementing the answer of mscdex, the whole function looks like this; var util = require('util'), zlib = require('zlib'), Transform = require('stream').Transform; function CompressedStream () { var self = this; this._transform = function (chunk, encoding, callback) { var response = chunk.toString(), crlfidx = response.indexOf('\r\n'); response = response.substring(0, crlfidx); console.log(response); zlib.gunzip(chunk.slice(crlfidx + 2), function (error, data) { console.log(arguments); callback(); }); }; Transform.call(this/*, { objectMode: true } */); }; util.inherits(CompressedStream, Transform); module.exports = CompressedStream;
possible better answer: http://stackoverflow.com/a/25083780
has answer: http://stackoverflow.com/a/25358663
has answer: http://stackoverflow.com/a/25083780
tagged with: buffer
tagged with: node.js

http://stackoverflow.com/a/25164554
answers question: http://stackoverflow.com/q/25164482
has body: In the Javascript you have: item.users_id But in the JSON you have: "user_id": "111" (user, not users)
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/39239793
comment on: http://stackoverflow.com/q/25197567
score: 0
type: Comment
type: QuestionComment
has text: where do you call update function? if it's within a closure it may be a problem of scope

http://stackoverflow.com/a/25227577
accepted answer of: http://stackoverflow.com/q/25227320
has body: $viewValue is property, $setViewValue is method that you are probably looking for link: function (scope, iElement, iAttrs, ngModel) { ngModel.$setViewValue('adasd'); ngModel.$render(); // depends – if you want update input value or only model value in the scope } $setViewValue(value, trigger); This method should be called when an input directive want to change the view value; typically, this is done from within a DOM event handler. documentation: https://docs.angularjs.org/api/ng/type/ngModel.NgModelController
has comment: http://stackoverflow.com/comment/39301607
upvote count: 20
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39303591
downvote count: 0
answers question: http://stackoverflow.com/q/25227320
score: 20
type: Answer

http://stackoverflow.com/a/25154422
score: 0
type: Answer
has body: Just update your both function with below ones function clearArray(a){ storeArray = a.slice(0); a.length = 0; } function undoClearArray(a){ a = storeArray; return a; } in undoClearAray() we are returning the variable which have new reference(in your clearArray(), Both the original and new array refer to the same object. If a referenced object changes, the changes are visible to both the new and original arrays). so use it as foo=undoClearArray(foo); for old values.
answers question: http://stackoverflow.com/q/25153618

http://stackoverflow.com/q/25109438
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39076040
answer count: 1
type: UnansweredQuestion
has title: Selectors ignoring Ajax / Jquery loaded content
has comment: http://stackoverflow.com/comment/39076139
has answer: http://stackoverflow.com/a/25109591
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39076131
has comment: http://stackoverflow.com/comment/39076060
type: Question
has body: I'm working with a static json file. I'm using jquery to load my file into my store. Everything loads fine. At the side of my store, I have a categories menu, where I can filter my store items. Because my store is items are dynamically generated, I dont seem to be able to select them with jquery. Here is the ajax request: Here is the code I have tride: I've also tried: In both cases the script works up untill the div.storeItem hide. Here is the HTML that is outputed: Shirt A Beatiful Shirt 23.45 ADD TO CART
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39076056

http://stackoverflow.com/comment/39023817
comment on: http://stackoverflow.com/q/25081592
score: 0
type: Comment
type: QuestionComment
has text: `getElementsByClassName('class')` this trys to find an element with an attribute `class="class"` did you mean `getElementsByClassName('title')`

http://stackoverflow.com/a/25089005
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39038284
accepted answer of: http://stackoverflow.com/q/25088962
answers question: http://stackoverflow.com/q/25088962
type: Answer
score: 2
downvote count: 0
has body: If I'm reading right, you want to disallow -', --, '-, and ''. E.g. you want to disallow any - or ' followed by any other - or '. If so: if (fname.match(/[-']{2,}/)) { // Disallow }
upvote count: 2

http://stackoverflow.com/q/25188416
tagged with: javascript
has comment: http://stackoverflow.com/comment/39223125
has body: I am setting a cookie animals via setcookie('animals, json_encode(array('tiger')), time()+(3600*24), '/'); in PHP when a page is requested. I am then expiring the cookie on page unload with: window.addEventListener('unload', function() { document.cookie = 'animals=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/'; }); This sets the cookie to be expired. This works great. The problem is that when I refresh the page, setcookie() tries to set the cookie, but the browser has the cookie set to be expired, so the browser deletes the cookie when PHP comes back instead of using the new data/expiration time. So the cookie is deleted and I'm not able to access animals after the page has loaded. This happens in both FF and Chrome. The problem is only on page refresh; if I go to a different site and then come back, or come to the page for the first time, the cookie is properly set. Is there any way I can get the browser to understand not to delete the cookie, and instead use the new parameters? When does the browser decide to the delete the cookie, and why doesn't it look at the new params coming in from PHP? Possible solutions (I would call them "hacks") are to add a unique identifier to each cookie (i.e. a timestamp) so animals-1407435704, so that each page load has it's own cookie. I could also echo out a document.cookie from PHP that sets the cookie, so after the page loads, the JS sets the cookie. But, I would rather see a solution that instructs the browser not to delete the cookie. Update: I'm going with adding a unique identifier to each cookie, because I actually need to anyway to account for multiple tabs being open (and allow them to each exist on their own). I'm going to leave the question open because I don't understand why the browser does this.
has title: Expiring a cookie on page unload, then setting cookie on next page load
score: 0
has comment: http://stackoverflow.com/comment/39223549
has answer: http://stackoverflow.com/a/25189522
has comment: http://stackoverflow.com/comment/39223486
type: UnansweredQuestion
tagged with: php
tagged with: cookies
has answer: http://stackoverflow.com/a/25188647
type: Question
tagged with: browser
answer count: 2

html-lists
tags question: http://stackoverflow.com/q/25149767
tags question: http://stackoverflow.com/q/25170183
type: Tag
tags question: http://stackoverflow.com/q/25168655
tag name: html-lists
tags question: http://stackoverflow.com/q/25132667
tags question: http://stackoverflow.com/q/25074099

http://stackoverflow.com/comment/39148917
has text: OP, you need to rephrase your needs for us to be able to answer your question right. What do you exactly want to do with printUsername, and why should it be static ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25148354

http://stackoverflow.com/comment/39155595
type: AnswerComment
type: Comment
has text: It looks like you just changed the indentation and `/` to `main`, is that right?
comment on: http://stackoverflow.com/a/25152125
score: 0

http://stackoverflow.com/a/56300359
answers question: http://stackoverflow.com/q/25228394
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/99213045
has body: i think the simplest solution is looking at the only thing that you don't have, which is a reference to the function itself. because if you have that then recusion is trivial. amazingly that is possible through a higher order function. let generateTheNeededValue = (f, ...args) =&gt; f(f, ...args); this function as the name sugests, it will generate the reference that we'll need. now we only need to apply this to our function (generateTheNeededValue)(ourFunction, ourFunctionArgs) but the problem with using this thing is that our function definition needs to expect a very special first argument let ourFunction = (me, ...ourArgs) =&gt; {...} i like to call this special value as 'me'. and now everytime we need recursion we do like this me(me, ...argsOnRecursion); with all of that. we can now create a simple factorial function. ((f, ...args) =&gt; f(f, ...args))((me, x) =&gt; { if(x &lt; 2) { return 1; } else { return x * me(me, x - 1); } }, 4) -&gt; 24 i also like to look at the one liner of this ((f, ...args) =&gt; f(f, ...args))((me, x) =&gt; (x &lt; 2) ? 1 : (x * me(me, x - 1)), 4)

http://stackoverflow.com/comment/39090967
type: QuestionComment
has text: in your function body, you are using "val == 'Others'". use "val1=='Others'" (as per your function parameter)
comment on: http://stackoverflow.com/q/25117473
score: 0
type: Comment

http://stackoverflow.com/q/25177647
has comment: http://stackoverflow.com/comment/39204288
has title: Reproducible pseudo-random sequence number in JS
type: Question
accepted answer: http://stackoverflow.com/a/25178137
has comment: http://stackoverflow.com/comment/39202690
has comment: http://stackoverflow.com/comment/39202419
has comment: http://stackoverflow.com/comment/39202456
tagged with: javascript
has comment: http://stackoverflow.com/comment/39202392
has body: I'm making some kind of game with JS. And I want to have an ability to restore game board from previous games. I think I will be able to achieve this behavior if I will have an ability to reproduce sequence of pseudo random numbers. This pseudocode should illustrate my idea: var seed = 1; // for example var random1 = initRandom(seed); // I'm looking for this function initRandom var random2 = initRandom(seed); console.assert(random1() === random2()); // both random1 and random2 generates pseudo random numbers console.assert(random1() === random2()); console.assert(random1() === random2()); console.assert(random1() === random2()); console.assert(random1() === random2()); // I will use those number for board generation Can somebody propose a way to achieve this behavior? N.B.: random1 and random2 must be time-independent.
score: 0
tagged with: random
answer count: 1
has answer: http://stackoverflow.com/a/25178137
linked to: http://stackoverflow.com/q/521295
type: AnsweredQuestion

ngtable
tags question: http://stackoverflow.com/q/25133661
tag name: ngtable
type: Tag

http://stackoverflow.com/comment/39284020
score: 0
type: Comment
type: QuestionComment
has text: If you've fixed your question, please don't put that into the question (that's not where it belongs), but answer it yourself. Thanks.
comment on: http://stackoverflow.com/q/25216610

http://stackoverflow.com/q/25217054
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39276747
accepted answer: http://stackoverflow.com/a/25217136
has body: I have a add/remove textfield feature wherein I want to implement a jQuery function to all the textfields in a div. Can I use the same jQuery function for all the fields in the div or should I write different for each. DEMO can be got here. In the demo I have made it work for one input field, how can I make it work for the rest. HTML Add Another Input Box Grpz Welcome Notes Add Another Input Box Grpz Welcome Notes
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39276642
has title: How can I use the same jQuery function for multiple divs without repeating the code
type: Question
has comment: http://stackoverflow.com/comment/39276669
has answer: http://stackoverflow.com/a/25217136
has comment: http://stackoverflow.com/comment/39276791
has comment: http://stackoverflow.com/comment/39276658

http://stackoverflow.com/comment/39020569
has text: From the results I'm getting, fastest results are obtained by starting the search at the ancestor with the specified ID and not at `document`. The `.find` method does that, but going to native JS adds another 50% or so performance.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25079473
type: AnswerComment

loops
tags question: http://stackoverflow.com/q/25183006
tags question: http://stackoverflow.com/q/25205908
tags question: http://stackoverflow.com/q/25108071
tags question: http://stackoverflow.com/q/25167596
type: Tag
tags question: http://stackoverflow.com/q/25189980
tags question: http://stackoverflow.com/q/25190500
tags question: http://stackoverflow.com/q/25146826
tags question: http://stackoverflow.com/q/25092465
tags question: http://stackoverflow.com/q/25230157
tags question: http://stackoverflow.com/q/25191949
tag name: loops
tags question: http://stackoverflow.com/q/25191294
tags question: http://stackoverflow.com/q/25225712
tags question: http://stackoverflow.com/q/25213301
tags question: http://stackoverflow.com/q/25082062

http://stackoverflow.com/comment/39269651
type: QuestionComment
comment on: http://stackoverflow.com/q/25212900
has text: @Pheonixblade9 I've looked at the question but I don't quite see how a filter would help me. Anyways I've come up with my own solution (see the plnkr link) but I don't know if it's the best way coding-wise?
score: 0
type: Comment

http://stackoverflow.com/comment/71852323
comment on: http://stackoverflow.com/a/25077072
score: 0
type: AnswerComment
type: Comment
has text: @morko: Years later, everything works perfectly fine on Windows 10 / edge. It was something with the security configuration in Windows 2008 I suspect, but I may never find out what exactly it was. I am accepting your answer to close this question.

http://stackoverflow.com/q/25158666
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/39205945
tagged with: content-script
has comment: http://stackoverflow.com/comment/39233939
answer count: 0
has title: Content script window.addEventListener(load,function,false) not working in Chrome Extension?
has comment: http://stackoverflow.com/comment/39168520
upvote count: 2
type: UnansweredQuestion
has body: i am programming in Chrome extension to create a button control in Gmail page using javascript.After login the Gmail Account,click the compose mail and click anyone place in composemail popup,i have adding one button.And also,click any inbox mail,i have adding one button to the mail content page.its working in window.addEventListener click. window.addEventListener('click', myfunction, false); but not working in load,onload.i already tried the below code. if (window.addEventListener) { window.addEventListener("load", myfunction, false); } else if (window.attachEvent) { window.attachEvent("onload", myfunction); } else { window.onload = myfunction; } my manifest.json: { "manifest_version": 2, "version": "1.0", "permissions": [ "contentSettings", "tabs", "http://*/*", "https://*/*", "windows" ], "web_accessible_resources": ["encrypt.png", "decrypt.png" ], "background": { "page": "Gmail.html" }, "content_scripts": [ { "matches": ["http://*/*", "https://*/*", "*://mail.google.com/*"], "js": ["jquery.js", "mailSecurity.js"], "css": ["image.css", "inboximage.css"] } ] } Anyone can resolve this? Thanks Sanju
tagged with: google-chrome
score: 2
has comment: http://stackoverflow.com/comment/61576012

http://stackoverflow.com/comment/39145007
score: 0
has text: That's because PHP has already rendered the page. If you need to echo a response, put it in an iframe, innerHTML. Use Javascript to print out the response.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25146449

http://stackoverflow.com/a/25219669
has comment: http://stackoverflow.com/comment/39281309
has comment: http://stackoverflow.com/comment/39281347
has comment: http://stackoverflow.com/comment/39281277
answers question: http://stackoverflow.com/q/25219641
downvote count: 0
score: 1
has body: you need to use indexOf() function. var hello = "hello"; if(hello.indexOf("he")===0){ //its in. }
upvote count: 1
type: Answer

http://stackoverflow.com/comment/39214174
type: Comment
type: QuestionComment
has text: What about [this](http://jsfiddle.net/mhcgolds/xvn29n72/)?
score: 0
comment on: http://stackoverflow.com/q/25184105

http://stackoverflow.com/q/25155306
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/39161441
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25155442
has title: MVC Bundling Issue
tagged with: jquery
has body: i recently joined in a new company and found out they were using so many scripts in Layout.cshtml.as shown in fig so in order to improve the performance,i used mvc bundling functions as shown and referenced it on layout page with @Scripts.Render("~/bundles/jqueryval").but the problem is.many of the java scripts doesnt work any more especially jquery data table.what point im missing here?
type: UnansweredQuestion
tagged with: razor
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/25158550
has comment: http://stackoverflow.com/comment/39161191
type: Question
has comment: http://stackoverflow.com/comment/39167789

http://stackoverflow.com/comment/39069036
has text: sorry if I am being slow, but the example in your fiddle looks OK - the arrays have different hashes and the comparison returns false, as desired? for me it returns: 975.5782767769929, 847.7110273835465, false
comment on: http://stackoverflow.com/a/25105589
type: AnswerComment
score: 0
type: Comment

debouncing
tags question: http://stackoverflow.com/q/25119503
tag name: debouncing
tags question: http://stackoverflow.com/q/25122673
type: Tag
tags question: http://stackoverflow.com/q/25094773

http://stackoverflow.com/a/25212139
type: Answer
answers question: http://stackoverflow.com/q/25211981
has comment: http://stackoverflow.com/comment/39267350
has comment: http://stackoverflow.com/comment/39267264
score: 0
has comment: http://stackoverflow.com/comment/39267235
has body: Whenever working with unfamiliar JSON, I suggest formatting it nicely at http://jsonlint.com In this case, the API call returns a JSON object with a results array that contains the user object. data.results[0].user; will give you the user object you are looking for, which you can use in code. In order to see the contents of an object in an alert dialog, you'll first need to pass the object into JSON.stringify(). &lt;script&gt; $.ajax({ url: 'http://api.randomuser.me/', dataType: 'json', success: function (data) { console.log(dataObj); alert(JSON.stringify(dataObj.results[0].user)); } }); &lt;/script&gt;

http://stackoverflow.com/a/25228758
type: Answer
has comment: http://stackoverflow.com/comment/39298353
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25228580
answers question: http://stackoverflow.com/q/25228580
has body: Link to working plunker - http://plnkr.co/edit/ynrulC71EK1qn3p2qo8R?p=preview 1) You used 'SWITCH' instead of 'switch' inside 'ng-switch-when' directive. In your $scope this value is lower-case. .. 2) Ng-repeat directive now uses key-value form: {{v}}

http://stackoverflow.com/q/25125902
answer count: 2
accepted answer: http://stackoverflow.com/a/25140978
has comment: http://stackoverflow.com/comment/39106891
has comment: http://stackoverflow.com/comment/39107006
has comment: http://stackoverflow.com/comment/39106931
has title: jQuery Validate not validating on form submit
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25126178
score: 0
has answer: http://stackoverflow.com/a/25126178
has comment: http://stackoverflow.com/comment/39112908
has answer: http://stackoverflow.com/a/25140978
type: Question
has body: I'm facing some problems with jQuery Validate. I've already put the rules but when i'm submitting the form, nothing happens. I'm using ASP.NET MVC 4 and Visual Studio 2010. EDIT: Click here to see my entire code. I'm trying to post it here but i'm getting the following error: 403 Forbidden: IPS signature match. Below is part of my code with Andrei Dvoynos's suggestion. I'm getting the same error. Clicking on submit and the page being reloaded @{ ViewBag.Title = "Index"; } @section Teste1{ } @using (@Html.BeginForm("", "", FormMethod.Post, new { id = "form1", name = "form1" })) { Sign In CPF CEP Telefone Email CNPJ Moeda Percent } My tests (all unsuccessful): 1 - put the $("form").validate() into $(document).ready() 2 - put the required class on the fields. jQuery Validate plugin version: 1.13.0
tagged with: javascript
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/39107212

http://stackoverflow.com/comment/39090453
comment on: http://stackoverflow.com/q/25116964
type: Comment
type: QuestionComment
score: 2
has text: AngularJS implements $q service, try to read https://docs.angularjs.org/api/ng/service/$q

http://stackoverflow.com/q/25083156
has answer: http://stackoverflow.com/a/25083617
has answer: http://stackoverflow.com/a/25083548
has answer: http://stackoverflow.com/a/25083610
type: AnsweredQuestion
has body: I have 2 controllers. I want to make a simple toggle where if a function is called it hides code in the other controller. Here is what I have... Angular: var app = angular.module('plunker', []); app.factory('data', function () { var fac = []; fac.hideIt = function (hide) { console.log(hide) if (hide != null) return true; else return false; }; return fac; }); app.controller('MainCtrl', function($scope, data) { $scope.name = 'World'; console.log(data.hideIt()); //its false $scope.hide = data.hideIt(); }); app.controller('SecCtrl', function($scope, data) { $scope.hideAbove = function () { var hide = true; data.hideIt(hide); console.log(data.hideIt(hide)) //now it is true } }); HTML: Hello {{name}}! CLICK HERE Link to Plunkr: http://plnkr.co/edit/zOAf5vGMTAd8A10NGiS1?p=preview Is there no way to use a controller to hide code that is in another controller?
accepted answer: http://stackoverflow.com/a/25083610
type: Question
score: 0
possible better answer: http://stackoverflow.com/a/25083714
tagged with: javascript
has answer: http://stackoverflow.com/a/25083714
has title: Controller hiding $scope.var in another controller with angular
tagged with: angularjs
answer count: 4

http://stackoverflow.com/comment/39014718
comment on: http://stackoverflow.com/a/25076757
has text: also maybe `var last = str.match(/\w+$/g)`
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25114453
score: 0
answer count: 2
tagged with: jquery
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25117776
has comment: http://stackoverflow.com/comment/39085475
has comment: http://stackoverflow.com/comment/39085552
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25115270
has answer: http://stackoverflow.com/a/25115270
tagged with: directive
type: Question
has comment: http://stackoverflow.com/comment/39085871
tagged with: 2-way-object-databinding
tagged with: javascript
has comment: http://stackoverflow.com/comment/39085226
has answer: http://stackoverflow.com/a/25117776
has body: I have the following html: &lt;li class="editor" ng-model="post.text" ng-bind-html="post.text" add-class="post.text"&gt;&lt;/li&gt; where post.text is a wrapped trustedValue, that looks like this: after I unwrap it, it looks like this: Now, I want to make a directive, that searches that trustedValue, and adds a class to the img tags. So far I have this: function AddClassToImg($sce) { return { restrict: 'A', scope: { addClass: '=' }, link: function (scope, elem, attrs) { var content = scope.addClass.$$unwrapTrustedValue(); $(content).find('img').addClass('test'); } } }; angular.module('UserProfile') .directive('addClass', ['$sce', AddClassToImg]); How can I get the post.text from the html, two-way-bind to it, and add to all images in post.text that class?
has title: Adding a class to a trustedValue AngularJS

http://stackoverflow.com/comment/39495492
score: 0
has text: and that is the problem, i cannot access this command from the plugins side. i do not have the right to perform this command
type: Comment
comment on: http://stackoverflow.com/a/25124770
type: AnswerComment

http://stackoverflow.com/comment/39243703
comment on: http://stackoverflow.com/a/25199101
score: 0
type: Comment
type: AnswerComment
has text: That is perfect, thank you very much for your help it is great learning from you guys!Please Vote this

http://stackoverflow.com/q/25090463
answer count: 0
score: 1
type: Question
tagged with: javascript
has title: Add glyphicons to dynamically created table
tagged with: imagebutton
has body: I'm trying to add the glyphicon to a table that has rows dynamically created. My problem is adding the icon within my external js file. function createRemoveRowButton(ArrayIndex) { var removeRowButton = document.createElement("BUTTON"); var image = document.createElement("input"); image.src = "example.jpg"; image.type = "image"; removeRowButton.appendChild(image); removeRowButton.onclick = function() { deleteRow(ArrayIndex); }; return removeRowButton; } I've looked on getbootstrap.com under the how to use section along with googling but so far no luck.
has comment: http://stackoverflow.com/comment/39040893
downvote count: 0
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39043672
tagged with: twitter-bootstrap-3

http://stackoverflow.com/comment/39121536
score: 0
type: Comment
has text: @AFetter: Then the element never exists. If that's a possibility, you can easily add a counter.
comment on: http://stackoverflow.com/a/25133319
type: AnswerComment

http://stackoverflow.com/q/25121320
favorite count: 0
has comment: http://stackoverflow.com/comment/39099374
has body: Can someone please explain to me what the heck does this mean? !function (global, moduleDefinition) { 'use strict'; var dependencies = []; if (typeof define === 'function' &amp;&amp; define.amd) { define(dependencies, moduleDefinition); } else if (typeof exports === 'object') { module.exports = moduleDefinition.apply(null, dependencies); } else { global.Utilities = moduleDefinition.apply(null, dependencies); } }(this, function () { 'use strict'; var Utilities = {}; return Utilities; }); This has been passed to me to follow as our new module. Joe
type: Question
has answer: http://stackoverflow.com/a/25121380
linked to: http://stackoverflow.com/q/3755606
tagged with: module
accepted answer: http://stackoverflow.com/a/25121655
possible better answer: http://stackoverflow.com/a/25121380
answer count: 2
has comment: http://stackoverflow.com/comment/39099535
downvote count: 1
has comment: http://stackoverflow.com/comment/39099548
duplicate of: http://stackoverflow.com/q/3755606
has comment: http://stackoverflow.com/comment/39099123
tagged with: javascript
has comment: http://stackoverflow.com/comment/39099040
upvote count: 4
has answer: http://stackoverflow.com/a/25121655
has title: How to setup variable to point to global object – independent of context execution?
type: AnsweredQuestion
score: 3

http://stackoverflow.com/a/25112803
type: Answer
accepted answer of: http://stackoverflow.com/q/25107941
answers question: http://stackoverflow.com/q/25107941
score: 0
type: AcceptedAnswer
has body: Thanks to Kevin B for the tip. Replaced: var body = document.body, html = document.documentElement; var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); With: document.getElementsByTagName('body')[0].offsetHeight Works like a charm!!!

windows-phone-8.1
tags question: http://stackoverflow.com/q/25219374
tags question: http://stackoverflow.com/q/25219341
type: Tag
tag name: windows-phone-8.1
tags question: http://stackoverflow.com/q/25136990

http://stackoverflow.com/comment/39017299
comment on: http://stackoverflow.com/q/25077844
has text: thanks @ProblemFactory, I'm reading it
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25080656
type: Question
has body: Let's say I have a page with an iframe and within the iframe I have some ckeditor inline instances that I want to manage from the containing page. From the parent, if I run console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR); I have the CKEDITOR object, but don't know why, if I run console.log(document.getElementById("iframe_id").contentWindow.CKEDITOR.instances); i get an "undefined" result. Any idea? POST EDIT: if I run the last console.log directly in the inspector I get all the instances as normal, the problem seems to exist only in the parent page js.
has title: Impossible to get CKEDITOR instances in an iframe
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
score: 1
tagged with: iframe
upvote count: 1
tagged with: javascript
tagged with: ckeditor

http://stackoverflow.com/comment/39185760
comment on: http://stackoverflow.com/q/25168338
type: Comment
score: 1
has text: If it's not really dynamic, you're probably just missing a `document.ready` wrapper.
type: QuestionComment

http://stackoverflow.com/comment/39061893
type: Comment
has text: http://jsfiddle.net/QVF8F/4/ it adds a ton of characters to the front, it did work well on the console tho!
type: AnswerComment
comment on: http://stackoverflow.com/a/25101872
score: 0

http://stackoverflow.com/q/25091621
tagged with: jquery
has answer: http://stackoverflow.com/a/25091674
type: Question
has comment: http://stackoverflow.com/comment/39043030
has answer: http://stackoverflow.com/a/25091711
tagged with: http://stackoverflow.com/tag/html
tagged with: css
possible better answer: http://stackoverflow.com/a/25091674
has comment: http://stackoverflow.com/comment/39043039
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25091711
has body: I have a button that works outside of this, but I really want to replicate the actions with just a normal div. I can do so by just adding this clickhandler: editor.insertText("\"≥\""); to an onclick event. I want to add that snippet to an inline div but I keep getting an "Uncaught SyntaxError: Unexpected token (" error from the below div: ......What am I doing wrong?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39042952
type: AnsweredQuestion
has title: Inline onclick event returns a "Uncaught SyntaxError: Unexpected token ( " error
has comment: http://stackoverflow.com/comment/39043102

http://stackoverflow.com/comment/39258302
has text: your example doesn't work quite right for me. The first add button works and adds the fields. But the second one does not; it doesn't add the fields and it kicks me up to the beginning of the field.
type: AnswerComment
comment on: http://stackoverflow.com/a/25207304
type: Comment
score: 0

http://stackoverflow.com/comment/39170928
has text: i believe @Paul is referring to the template (the html), as the interpolation message originates from the view.
comment on: http://stackoverflow.com/q/25160772
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39257642
has text: could you explain this? I don't understand what you wrote
comment on: http://stackoverflow.com/a/25207012
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39124921
type: Comment
has text: index means it should return 2 in this case right?
type: QuestionComment
comment on: http://stackoverflow.com/q/25135872
score: 0

http://stackoverflow.com/a/25271378
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25227770
has body: http://jsfiddle.net/zombiesplat/zoohcveh/17/ Here is a working version of what I answered below. The problem appears to be some kind of compatibility issue with isotope v2 and knockout. My fix came from finding this example http://zubinraj.com/demo/isotope-knockout/isotope-knockout-binding.htm and converting your code to use knockout v1.5 HTML Add New Votes: CSS /* ---- .item ---- */ .item { float: left; width: 380px; background: #0D8; border: 2px solid #333; border-color: hsla(0, 0%, 0%, 0.7); } /* Begin Required Isotope Styles - see http://isotope.metafizzy.co for more info */ .isotope-item { z-index: 2; } .isotope-hidden.isotope-item { pointer-events: none; z-index: 1; } /**** Isotope CSS3 transitions ****/ .isotope, .isotope .isotope-item { -webkit-transition-duration: 0.8s; -moz-transition-duration: 0.8s; -ms-transition-duration: 0.8s; -o-transition-duration: 0.8s; transition-duration: 0.8s; } .isotope { -webkit-transition-property: height, width; -moz-transition-property: height, width; -ms-transition-property: height, width; -o-transition-property: height, width; transition-property: height, width; } .isotope .isotope-item { -webkit-transition-property: -webkit-transform, opacity; -moz-transition-property: -moz-transform, opacity; -ms-transition-property: -ms-transform, opacity; -o-transition-property: -o-transform, opacity; transition-property: transform, opacity; } /**** disabling Isotope CSS3 transitions ****/ .isotope.no-transition, .isotope.no-transition .isotope-item, .isotope .isotope-item.no-transition { -webkit-transition-duration: 0s; -moz-transition-duration: 0s; -ms-transition-duration: 0s; -o-transition-duration: 0s; transition-duration: 0s; } Javascript on Dom Ready var $container = $("#container"); var data = [ { title: "Test 1", desc: "Some description text goes here", votes: 1000, category: "catA", }, { title: "Test 2", desc: "Some description text goes here", votes: 2000, category: "catB", }, { title: "Test 3", desc: "Some description text g…
has comment: http://stackoverflow.com/comment/39379508
has comment: http://stackoverflow.com/comment/39378705
upvote count: 1
has comment: http://stackoverflow.com/comment/39379959
type: Answer

http://stackoverflow.com/a/25199300
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25199136
has comment: http://stackoverflow.com/comment/39243624
has body: On this link : http://www.jchilders.com/AjaxFileUpload/demo/ it says there's an option you could use to pass data : additionalData : Additional data you would like to pass along with the request. You can try to send the data this way : var data = { "varId" : varValue };
has comment: http://stackoverflow.com/comment/39243627
has comment: http://stackoverflow.com/comment/39243471
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39242974
type: Answer
has comment: http://stackoverflow.com/comment/39243436
accepted answer of: http://stackoverflow.com/q/25199136
has comment: http://stackoverflow.com/comment/39243799

http://stackoverflow.com/q/25172471
tagged with: javascript
downvote count: 0
has body: I get this plugin to do a upload of images: Angular File Plugin I need that when I enter a new file, it create a form for each file containing some fields that I want to send with the file. I could do this using the callback onAfterAddingFile that follows: uploader.onAfterAddingFile = function(fileItem) { var f = document.createElement("form"); f.setAttribute('method',"post"); f.setAttribute('action',"submit.php"); var i = document.createElement("input"); //input element, text i.setAttribute('type',"text"); i.setAttribute('name',"title"); f.appendChild(i); document.getElementById("myForm").appendChild(f); But now, I need to link each image with each form. I think that I need to create a custom attribute, like data-frm for example, to link them, isn't? How can I do that?
favorite count: 0
has title: How to add custom attribute for image preview in angular file upload plugin
tagged with: angularjs
type: UnansweredQuestion
tagged with: angular-file-upload
answer count: 0
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/107640325
comment on: http://stackoverflow.com/a/58446038
type: AnswerComment
type: Comment
has text: @TanBirDeveloper Did you also import libraries [react-dom](https://www.npmjs.com/package/react-dom) and [isotope-layout](https://www.npmjs.com/package/isotope-layout)?
score: 1

http://stackoverflow.com/comment/39073318
comment on: http://stackoverflow.com/a/25102982
type: Comment
score: 0
has text: I know what the idea is. Thats what I did i.e. deleting everything from the string after the given word. You have edited your comments.
type: AnswerComment

http://stackoverflow.com/a/25205411
downvote count: 0
has comment: http://stackoverflow.com/comment/39274728
type: Answer
answers question: http://stackoverflow.com/q/25202630
upvote count: 2
has body: Here's some working code which creates a 5-sided polygon, with markers on each coordinate. The polygon itself isn't editable... when the user drags one of the markers, we redraw the polygon. Draggable polygons The second part of your question, of how to detect if a point is inside a polygon, is really a separate question.
score: 2

http://stackoverflow.com/a/25143701
has comment: http://stackoverflow.com/comment/39171324
score: 1
has comment: http://stackoverflow.com/comment/39170046
has comment: http://stackoverflow.com/comment/39161770
accepted answer of: http://stackoverflow.com/q/25140970
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39166356
has comment: http://stackoverflow.com/comment/39170091
has comment: http://stackoverflow.com/comment/39172389
type: Answer
has body: rather than checking against null, using ! operator, it will check for both null/undefined $scope.selChanged = function() { if (!$scope.ViewLevel) { $scope.getTypeData(); console.log("nullek"); } else { $scope.getCampaignData(); console.log("nie nullek"); } } EDIT as per angularjs recommendation: your ngModel must have a dot, and that would solve the problem for you. //somewhere in your controller $scope.selected = {} and then in your html &lt;select ng-model="selected.ViewLevel" ng-change="selChanged()" ng-options="camptype.name for camptype in campTypes"&gt; &lt;option value=""&gt;-- choose campaign type --&lt;/option&gt; &lt;/select&gt; and then again fix if in your function. check for $scope.selected.ViewLevel $scope.selChanged = function() { if (!$scope.selected.ViewLevel) { $scope.getTypeData(); console.log("nullek"); } else { $scope.getCampaignData(); console.log("nie nullek"); } }
upvote count: 1
answers question: http://stackoverflow.com/q/25140970

http://stackoverflow.com/comment/39003384
type: AnswerComment
has text: Is there a way without explicitly setting all these flags and polluting the controller?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25070440

http://stackoverflow.com/q/25127378
score: 0
has body: I am using Gulp as a build process and I have recently run into some problems with page-specific files injection (through gulp-inject fyi). Some context: I am grabbing all the HTML files, and then go over them one at a time so I can use their filename to include specific files into the glob collection, for example for index.html I have: [ 'export/assets/js/libs/jquery*.js', // jQuery first 'export/assets/js/libs/*.js', // Followed by all the libs 'export/assets/js/*.js', // Followed by any other js file '!export/assets/js/view-*.js', // Excluding all view-* files [see note] '!export/assets/**/_*.js', // Excluding underscore prefixed files '!export/assets/js/ie*.js', // Excluding all IE libs 'export/assets/js/view-index*.js' // Including page specific file ] [note] There might be more page-specific files, eg. view-profile.js or view-contact.js but in this iteration, only view-index.js can be included. The above collection is then gulp.src()'d and processed, only, view-index.js never makes it into the stream.. EDIT: I accepted the answer below because it pointed out that what I had wasn't going to suffice in achieving my goal. I found a work-around where I pass in export/assets/js/**/*.js and filter out what I don't need through gulp-ignore.
answer count: 1
tagged with: gulp
has title: Specific glob pattern not matching after broad exclude
tagged with: glob
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25128228
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25128228

http://stackoverflow.com/q/25217562
has answer: http://stackoverflow.com/a/25217852
has comment: http://stackoverflow.com/comment/39277789
favorite count: 0
possible better answer: http://stackoverflow.com/a/25217885
has title: Looking for Javascript function to disable fields on specified select-option
linked to: http://stackoverflow.com/q/2155909
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39277447
has answer: http://stackoverflow.com/a/25217885
type: Question
has body: I need a general javascript function which disables / enables fields on specified select options. everything enabled disable form-input 1 and 2 disable form-input 3, 4 and 5 So input forms 1 and 2 should be disabled when option 2 is selected and so on. The function must be written general so that the option-value as well as the fields to be disabled must be given to the function via variable / array. Any idea? Thanks, Henning
tagged with: javascript
score: -1
duplicate of: http://stackoverflow.com/q/2155909
has comment: http://stackoverflow.com/comment/39277775
accepted answer: http://stackoverflow.com/a/25217852
answer count: 2
has comment: http://stackoverflow.com/comment/39277462
downvote count: 1

http://stackoverflow.com/a/25117900
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25117832
type: Answer
has body: Javascript's Date object starts counting month at 0. So: (new Date() - new Date(2000,1,1))/86400000 Should be: (new Date() - new Date(2000,0,1))/86400000
answers question: http://stackoverflow.com/q/25117832
score: 3
downvote count: 0

http://stackoverflow.com/comment/39048926
type: QuestionComment
comment on: http://stackoverflow.com/q/25094927
has text: Leo Bali: it simply says "200" for data.status. Aldanux link has good information in it, but I'm still confused why it's considered an "error"? Daniel - thanks for the heads up on the SQL injection attacks! Like I said, I'm a TOTAL newb to this type of dev. I'm usually quite happy living in the land of C#/ASP, so this is a bit of an adventure for me. Can you offer some suggestion that might make it more secure?
score: 0
type: Comment

http://stackoverflow.com/q/25208934
type: Question
has title: Do you need to stop window navigation when doing an ajax call whose return doesn't matter?
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39283497
has body: If I want to run an ajax call with jQuery on a link (&lt;a href="/wherever"&gt;) click, do I need e.preventDefault() inside the jQuery click listener? I normally would, but this is more of a tracking ajax call and so the result from it won't matter, and I want the window to navigate to the clicked link's page. Assuming the fastest internet available, would the page navigation ever cause the ajax call to fail?
duplicate of: http://stackoverflow.com/q/10774245
tagged with: ajax
has comment: http://stackoverflow.com/comment/39261045
type: UnansweredQuestion
answer count: 0
has comment: http://stackoverflow.com/comment/39265161
linked to: http://stackoverflow.com/q/10774245

http://stackoverflow.com/a/25102469
answers question: http://stackoverflow.com/q/25101729
has comment: http://stackoverflow.com/comment/39084349
has comment: http://stackoverflow.com/comment/39062838
has comment: http://stackoverflow.com/comment/39085055
score: 1
has comment: http://stackoverflow.com/comment/39091434
has comment: http://stackoverflow.com/comment/39084635
has body: This is based on jfriend's answer, but it uses primitives with promises rather than promises at a high level. I believe this makes for cleaner code. First, let's write a function that represents a delay with promises: function delay(ms){ // generic delay function var d = $.Deferred(); setTimeout(d.resolve, ms); return d; } Next, let's use promises to their fullest var delay100 = delay.bind(null, 100); // a 100 ms delay function write(el, str, initial) { // write a single word return [].reduce.call(str, function (prev, cur) { // reduce is generic return prev.then(delay100).then(function (letter) { initial += cur; el.text(initial + "_"); }); }, $.when()); } data.reduce(function (p, item) { return p.then(function () { // when the last action is done, write the next return write($(".content"), item, ""); // might want to cache this }); }, $.ready.promise()); // we don't need `$(function(){})` Here is a fiddle illustrating this solution: http://jsfiddle.net/feq89/ Just for fun, here is an ES6 solution without jQuery: var delay = (ms) =&gt; new Promise(resolve =&gt; setTimeout(resolve, ms)); var write = (el, str, initial) =&gt; [].reduce.call(str, (prev, cur) =&gt; prev.then(() =&gt; delay(100)).then(() =&gt; { initial += cur; el.textContent = initial + "_"; }); }, Promise.resolve()); var content = document.querySelector(".content"); data.reduce((p, item) =&gt; p.then(() =&gt; write(content, item, "")));
has comment: http://stackoverflow.com/comment/39089486
downvote count: 0
has comment: http://stackoverflow.com/comment/39089353
has comment: http://stackoverflow.com/comment/39084667
type: Answer
upvote count: 1

http://stackoverflow.com/a/25070733
has comment: http://stackoverflow.com/comment/39009052
type: Answer
answers question: http://stackoverflow.com/q/25069660
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25069660
type: AcceptedAnswer
downvote count: 0
has body: please see here : http://plnkr.co/edit/cyZPh5h1lIYykqrh8Igh?p=preview var myApp = angular.module('myApp', ['ui.router']); myApp.factory('RandomFactory', function () { return "Hello there"; }); myApp.config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { $stateProvider.state('state1', { url: '/state1', template:"&lt;p&gt;{{param1}}&lt;/p&gt;", controller: function($scope,param1) { $scope.param1 = param1; }, resolve: { param1: function (RandomFactory) { return RandomFactory; } } }); $urlRouterProvider.otherwise("/state1"); }]); you've few mistakes in factory definition it should be like (remove empty string) myApp.factory('RandomFactory', [function () { return "Hello there"; }]) and you should return RandomFactory instead of execute it when you resolving it resolve: { param1: function (RandomFactory) { return RandomFactory; } }

http://stackoverflow.com/q/25174972
tagged with: javascript
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25192306
has body: So I have a table that is being filled with data from an ajax call. I'm just using append similar to this for filling it: var table = //something //loop through ajax response objects table.append(' ' + ajaxAnswer[i].part1 + ' ' + ajaxAnswer[i].part2 + ' '); After the loop I'm initializing a datatable like so: table.dataTable( //set the paging parameters ); Now what I'd like to do is have a popover happen whenever a row in that table has been clicked. However, the popover will feature some extra data (loaded in by another ajax call). I've got the jquery for capturing the click event, making my call, and assembling all the data, but I can't seem to get the popover to occur correctly. I've attempted adding the syntax of it to each row I append like so: table.append(' ' + ajaxAnswer[i].part1 + ' ' + ajaxAnswer[i].part2 + ' '); Along with this bit wrapped in a closure to process the popover (I want the popover to disappear upon a click anywhere outside so I've used the focus element here as per the bootstrap guide here, http://getbootstrap.com/javascript/#popovers): $('.popover-dismiss').popover({ trigger: 'focus' }); That didn't seem to work however. It could be that the popover is being hidden underneath my datatable since I didn't see any particular error. So now I need either some other way to add it onto my rows or a way to generate them dynamically. Again, I've left out the jquery that handles my generating event so I can throw it from there if I knew how to instantiate it on the fly. Seems like I'm missing something trivial here. Thanks for any help! UPDATE: Twitter Bootstrap Popovers not working for Dynamically Generated Content I happened upon this post about dynamically generating popovers (finally something relevant after many past googlings) which could be my problem. Will test tomorrow when I get back to work.
score: 2
type: AnsweredQuestion
tagged with: datatables
favorite count: 0
linked to: http://stackoverflow.com/q/13564782
type: Question
upvote count: 2
tagged with: twitter-bootstrap
answer count: 1
accepted answer: http://stackoverflow.com/a/25192306
linked to: http://stackoverflow.com/q/11947094
has title: How to Create Bootstrap Popover on JQuery DataTable Dynamically
downvote count: 0

http://stackoverflow.com/q/25193211
duplicate of: http://stackoverflow.com/q/10137758
tagged with: javascript
has title: Need a solution for loading 1000 + images in a row
type: Question
linked to: http://stackoverflow.com/q/10137758
answer count: 1
has comment: http://stackoverflow.com/comment/39231773
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25193234
tagged with: ajax
downvote count: 3
score: -3
tagged with: php
has body: Basically i have a page that has 1000+ images and it takes for ever to load. what would be the best method to use to only load the first 10 images then when a user scrolls down or clicks a button the next 10 loads. Thanks in advance $large = 'large'; $q = $handler-&gt;prepare("SELECT * FROM ads WHERE status = ? AND slot = ? LIMIT 0, 5"); $q-&gt;bindParam(1, $live); $q-&gt;bindParam(2, $large); $q-&gt;execute(); if($q-&gt;rowCount() &gt; 0){ echo '&lt;div style="margin-top: 5px; margin-bottom: 5px; width: 1020px; border: 2px solid #428bca"&gt;&lt;/div&gt;'; while($r = $q-&gt;fetch()){ $web = $r['website_url']; $img = $r['image_url']; { echo ' &lt;a target="_blank" href="'.$web.'"&gt;&lt;img style="margin-left: -4px" src="'.$img.'" height="150" width="150" onmouseout="shrink2(this);" onmouseover="expand2(this);"/&gt;&lt;/a&gt; '; } } } its That x 10,000 Thats just one query obviously i cant enter all 1000 + queries
upvote count: 0
has comment: http://stackoverflow.com/comment/39232441
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39231709
has comment: http://stackoverflow.com/comment/39231863
has comment: http://stackoverflow.com/comment/39231796

http://stackoverflow.com/a/25166645
score: 0
has comment: http://stackoverflow.com/comment/39182580
has comment: http://stackoverflow.com/comment/39183474
type: Answer
has comment: http://stackoverflow.com/comment/39183191
answers question: http://stackoverflow.com/q/25166322
has comment: http://stackoverflow.com/comment/39194229
has body: You could use the js debugger of your browser to insert breakpoint to see what's wrong. With chrome, press F12 and click the Sources Tab, and then find you source file, insert breakpoint by left-clicking the left-side of the line of code. You could also check the request and response between the browser and your server with the Network Tab
has comment: http://stackoverflow.com/comment/39183733

http://stackoverflow.com/q/25094228
has title: Using the jquery .on() and $.ajax
has comment: http://stackoverflow.com/comment/39047637
type: AnsweredQuestion
has body: I have buttons that will be repeatedly destroyed and re-rendered. I am trying to use .on() to do this, as it works for elements not yet created. I suspect the syntax is correct, jslint finds no errors. It breaks some of the javascript on the page, but not all of it. I've never used .on(). I'm unsure why it shows no errors on jslint, but breaks some of my browser, and why it only breaks some of my browser. Here is my jQuery. In this case, #showPrevious is what is being destroyed and re-rendered. $("#showPrevious").on( "click", function(){ $.ajax({ url: "flip/showprevious.php", cache: false, success: function(html){ $("#showContainer").html(html); } }); });
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39047647
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39047683
favorite count: 0
tagged with: ajax
type: Question
has answer: http://stackoverflow.com/a/25094302
score: -2
has comment: http://stackoverflow.com/comment/39047704
accepted answer: http://stackoverflow.com/a/25094302
downvote count: 2
tagged with: php

http://stackoverflow.com/q/25195589
score: 0
answer count: 1
tagged with: javascript
has body: I have a spreadsheet containing all of the annual leave balances for each staff member. I have a form that the staff will fill out, and I would like it to pull the their data from the spreadsheet and send them an email with the result. I am having trouble with the matching of form data to the spreadsheet data, and extracting the related cells. Here is the code: function SendGoogleForm(e) { try { var subject = "Leave Balance Request"; var s = SpreadsheetApp.openByUrl("url").getSheetByName("Check Leave"); var email = e.namedValues["BCA National email address"]; var sheet = SpreadsheetApp.openByUrl("url").getSheetByName("Leave Summary"); var cell = sheet.getRange("F3:F3"); var getcell = cell.getCell(1,1); var pdate = getcell.setValue(e.namedValues['END date of leave requested']); var annualvalue = sheet.getRange("H6:H").getValues(); var emaildata = sheet.getRange("A6:A").getValues(); var username = e.namedValues["Username"]; var message = "Your" + " " + e.namedValues["Type of leave requested"] + " " + "balance is below" + "\n\n"; if (username == emaildata) { message += "Annual Leave" + " : " + annualvalue + "\n\n"; } MailApp.sendEmail(email, subject, message); } catch (e) { Logger.log(e.toString()); } } I tried this: How do I search for and find the coordinates of a row in Google Spreadsheets But couldn't get it to work... Any suggestions would be greatly appreciated!
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25198595
linked to: http://stackoverflow.com/q/17196655
tagged with: google-docs
type: Question
has title: Google Form to pull data from spreadsheet and email to user
tagged with: google-apps-script

http://stackoverflow.com/a/25108391
accepted answer of: http://stackoverflow.com/q/25108341
type: Answer
answers question: http://stackoverflow.com/q/25108341
has body: You are alerting the entire object. You may want to alert only the message instead: Change your second alert() in: alert(helpQuestion.description); Result:
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25149572
has comment: http://stackoverflow.com/comment/39159813
answers question: http://stackoverflow.com/q/25117460
type: Answer
accepted answer of: http://stackoverflow.com/q/25117460
score: 0
has comment: http://stackoverflow.com/comment/39240100
type: AcceptedAnswer
has body: Well, I'll tell you this. Most transitions are almost an optical illusion. What I'm trying to say is that the API won't give you this kind of tool, but you still can work around it. You could use an overlay to make your transition.

http://stackoverflow.com/a/25196101
has comment: http://stackoverflow.com/comment/50307937
downvote count: 9
has comment: http://stackoverflow.com/comment/99977581
upvote count: 430
has comment: http://stackoverflow.com/comment/47620660
score: 421
has body: Removing the data attribute data-toggle="dropdown" and implementing the open/close of the dropdown can be a solution. First by handling the click on the link to open/close the dropdown like this : $('li.dropdown.mega-dropdown a').on('click', function (event) { $(this).parent().toggleClass('open'); }); and then listening the clicks outside of the dropdown to close it like this : $('body').on('click', function (e) { if (!$('li.dropdown.mega-dropdown').is(e.target) &amp;&amp; $('li.dropdown.mega-dropdown').has(e.target).length === 0 &amp;&amp; $('.open').has(e.target).length === 0 ) { $('li.dropdown.mega-dropdown').removeClass('open'); } }); Here is the demo : http://jsfiddle.net/RomaLefrancois/hh81rhcm/2/
has comment: http://stackoverflow.com/comment/39345189
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/51191198
has comment: http://stackoverflow.com/comment/79868209
has comment: http://stackoverflow.com/comment/104731869
has comment: http://stackoverflow.com/comment/39239893
type: Answer
has comment: http://stackoverflow.com/comment/86116639
has comment: http://stackoverflow.com/comment/39239772
accepted answer of: http://stackoverflow.com/q/25089297
has comment: http://stackoverflow.com/comment/92435613
has comment: http://stackoverflow.com/comment/129782828
has comment: http://stackoverflow.com/comment/90074985
answers question: http://stackoverflow.com/q/25089297
has comment: http://stackoverflow.com/comment/129609361
has comment: http://stackoverflow.com/comment/46358045
has comment: http://stackoverflow.com/comment/66684634
has comment: http://stackoverflow.com/comment/60177100
has comment: http://stackoverflow.com/comment/136951134

http://stackoverflow.com/comment/39188882
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25169979
has text: @user3890432: The 1st parameter is a "regular expression".
score: 0

http://stackoverflow.com/comment/39271768
score: 6
has text: You forgot `new`
comment on: http://stackoverflow.com/q/25214535
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25177524
accepted answer of: http://stackoverflow.com/q/25176207
answers question: http://stackoverflow.com/q/25176207
type: Answer
upvote count: 1
score: 1
has body: you can include you controller with directive property The controller option takes a string or a function. When set to a string, the name of the string is used to look up a controller constructor function registered elsewhere in our application: angular.module('myApp', []) .directive('myDirective', function() { restrict: 'A', // always required controller: 'SomeController', link: function(scope, element, attrs, SomeController) { SomeController.doSomething(scope); }, }) // elsewhere in our application // either in the same file or another // one included by our index.html angular.module('myApp') .controller('SomeController', function($scope, $element, $attrs, $transclude) { // controller logic goes here })
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25165834
has comment: http://stackoverflow.com/comment/39181100
answer count: 2
has comment: http://stackoverflow.com/comment/39194140
tagged with: javascript
tagged with: jquery
tagged with: inline-editing
tagged with: ajax
has comment: http://stackoverflow.com/comment/39195343
score: 0
has answer: http://stackoverflow.com/a/25168299
has body: I am trying to do inline editing by cell, not by row, upon a double click. This much works but it won't update the record- the "SaveCustomer" call to controller isn't made. What is it that I'm doing wrong? here is my index view file (part of it, the rest is irrelevant) @foreach (var item in Model.Drivers) { @Html.DisplayFor(modelItem => item.ID) @Html.DisplayFor(modelItem => item.LastName) @Html.DisplayFor(modelItem => item.FirstName) @if (item.Seniority != null) {@Convert.ToDateTime(item.Seniority).ToShortDateString()} //more go here Then here is the javascript file- sorry for the formatting, happens everytime I copy&paste $("td").dblclick(function () { if (!$(this).hasClass("edit")) { var value = jQuery.trim($(this).html()); $(this).html(" "); $(this).addClass("edit"); $("#txtEdit").focus(); } }); function PutCursorAtEnd(obj) { if (obj.value == obj.defaultValue) { $(obj).putCursorAtEnd(obj.length); } } function SaveValue(obj, oldValue) { var value = $(obj).val(); $(obj).parent().removeClass("edit"); if (value != oldValue) { var property = $(obj).parent().attr("id"); var id = $(obj).parent().parent().attr("id"); $.ajax({ type: "POST", url: '@Url.Action("SaveCustomer", "save")', data: { ID: id, Property: property, Value: value }, contentType: "application/json; charset=utf-8", dataType: "json", success: SaveCustomer_Success, error: Error }); } else { $(obj).parent().html(oldValue); } } function SaveCustomer_Success(data, status) { $(data.d.ID).parent().html(data.d.NewValue); } and lastly here is the controller method public object SaveCustomer(int ID, string Property, string Value) { Driver driver = unitOfWork.DriverRepository.GetByID(ID); switch(Property) { case "id": driver.ID = Convert.ToInt32(Value); break; case "firstName": driver.FirstName = Value; break; case "lastName": driver.LastName = Value; break; case "seniority": driver.Seniority = Convert.ToDateTime(Value); break; } unitOfWork.DriverRepository.Update(driver); unitOfWork.Save(); return new { ID = ID, N…
has comment: http://stackoverflow.com/comment/39182492
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39181209
has comment: http://stackoverflow.com/comment/39182440
has comment: http://stackoverflow.com/comment/39182460
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25173274
has title: Ajax won't call controller method mvc
type: Question

http://stackoverflow.com/comment/39236893
type: Comment
comment on: http://stackoverflow.com/q/25196001
has text: possible duplicate: http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie
score: 0
type: QuestionComment

http://stackoverflow.com/q/25146417
accepted answer: http://stackoverflow.com/a/25146512
has body: Say I have a type called MyObject and I want to add the method myMethod to it. Is there any difference (logically, but also performance-wise) between the following ways? #1 function MyObject() { ... } MyObject.prototype.myMethod = function() { ... }; #2 function MyObject() { this.myMethod = function() { ... }; ... } #3 function MyObject() { this.myMethod = myMethod; ... } function myMethod() { ... } I wouldn't mind knowing if there's a performance difference - e.g. if way #2 is costly because it defines the function separately every time an object is instantiated - but I'm mostly concerned with whether the results are equivalent. In addition, with method #2, isn't this the same way that a class-level/static method would be defined, so does it have the danger of being called like MyObject.myMethod();? If myMethod used this and it was called on MyObject rather than an instance of MyObject, I would think this would cause issues. So does the compiler/interpreter check to see whether this is present or would it throw an error?
has comment: http://stackoverflow.com/comment/39145010
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25146547
score: 1
tagged with: methods
has answer: http://stackoverflow.com/a/25146512
type: Question
has answer: http://stackoverflow.com/a/25146547
has title: Is there any difference between these three ways of declaring methods in JS?
has comment: http://stackoverflow.com/comment/39145060
tagged with: javascript
has comment: http://stackoverflow.com/comment/39144965
tagged with: prototype
answer count: 2
upvote count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/39131999
comment on: http://stackoverflow.com/q/25139414
has text: I've deleted my previous comments because I misunderstood your problem.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39223486
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25188416
score: 0
has text: @zebediah49 The cookie is part of the options of a component on the page. If a user leaves the page without saving anything, I don't want those options to be still loaded when they come back to create something else.

http://stackoverflow.com/comment/39249721
has text: `$("*").not(".dropdown").click` ?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25203088

http://stackoverflow.com/comment/39095690
comment on: http://stackoverflow.com/a/25111329
has text: I thought it's all about `background-image` in cells, coz half of them have it so in 7200 elements i need to render 3600 images (each of them has 9kb) but when i disable it, its no big difference. Also before draw every ` ` I'm iterating by JSON array (has same size as last changed table) for some data to insert into new ` `. It's sth like back-up when im changing my table size.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25227904
type: Question
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm trying to retrieve left/right status when sliding but i can't figure out how to get the information. I get TRUE when the slider is sliding and FALSE when not. myInstance.$IsSliding(); // Return true/false With reference from the Jssor documentation under API: $IsSliding() //Retrieve right&lt;-->left sliding status of the slider I expect to get left right status, but when I check in the core file jssor.slider.js, the only thing I see with left / right is this: _SelfSlider.$IsSliding = function () { /// &lt;summary&gt; /// instance.$IsSliding(); //Retrieve right&lt;--&gt;left sliding status of the slider. /// &lt;/summary&gt; return _IsSliding; }; the _IsSliding in the core files is only assigned true/false as I see it. How can I get this information from the API? I ended up doing this: slider1.$On($JssorSlider$.$EVT_POSITION_CHANGE, function(position, fromPosition) { if (sliderLock === false) { if (position &gt; fromPosition) { console.log(Math.ceil(position)); console.log("next"); addElementsToScroller(Math.ceil(position)); } else { console.log("prev"); console.log(Math.floor(position)); addElementsToScroller(Math.floor(position)); } } sliderLock = true; });
tagged with: slider
answer count: 0
has title: Jssor slider how to retrieve right<-->left sliding status of the slider
type: UnansweredQuestion
upvote count: 1
tagged with: jssor
score: 1

http://stackoverflow.com/q/25095857
favorite count: 0
has body: Suppose that I have the following models in Sails.js v0.10: Person.js module.exports = { attributes: { name: 'string', books: { collection: 'book', via: 'person' } } }; Book.js module.exports = { attributes: { name: 'string', person: { model: 'person' } } }; I want a query to return an array of people that have a certain associated book. I would like to do something like the following query, but i don't know how: Person.find() .populate('books') .where({ books.name: 'Game of Thrones'}) .exec(function(err, person) { if (err) return res.send(err, 500); res.json(person); }); Any ideas if this is possible to do using a simple query?
tagged with: node.js
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25098667
upvote count: 3
type: Question
tagged with: sails.js
downvote count: 0
tagged with: javascript
has title: Sails.js query model filtering by collection attribute
has answer: http://stackoverflow.com/a/25098667
answer count: 1
linked to: http://stackoverflow.com/q/27275641

http://stackoverflow.com/a/25094920
answers question: http://stackoverflow.com/q/25094648
type: Answer
has body: Edit Your Json like { "jsontext":[ {"name":"Usman ","task":"Getting work","date":"27-07-2014 12:28:45 PM","status":"1"}, {"name":"Hamza","task":"Starting work","date":"27-07-2014 12:29:36 PM","status":"1"}, {"name":"Hamza","task":"Geted","date":"27-07-2014 2:04:07 PM","status":"1"}, {"name":"Hamza","task":"Start work","date":"02-08-2014 3:56:37 PM","status":"1"} ] } and the ajax code should be as $.ajax({ url: '/getdata.txt', complete: function (data) { if (data.responseText != "") { var NewTxt = data.responseText; NewTxt = NewTxt.replace(/\n/g, ""); NewTxt = NewTxt.replace(/\s/g, ""); obj = JSON.parse(NewTxt); var NewStr = ""; for (var i = 0; i &lt; obj.jsontext.length; i++) { NewStr += obj.jsontext[i].name + "&lt;br/&gt;" + obj.jsontext[i].task + "&lt;br/&gt;" + obj.jsontext[i].date + "&lt;br/&gt;" + obj.jsontext[i].status + "&lt;br/&gt;&lt;br/&gt;"; } document.getElementById("demo").innerHTML = NewStr; } } }); and the HTML as: &lt;div id="demo"&gt;&lt;/div&gt;
score: 0

http://stackoverflow.com/q/25180235
has comment: http://stackoverflow.com/comment/39207039
has title: how to search object by hash key in a array
type: Question
type: AnsweredQuestion
score: 0
upvote count: 1
has body: I have an objects in a array, If now I want to pickup the 2nd object {'name':'automating','letter':'Automating', 'num':1, 'color':'red' } with the key name and value equals to automating. How could I pick up it from the array? Ember.A([ Ember.Object.create({'name':'manual','letter':'Manual', 'num':1 }), Ember.Object.create({'name':'automating','letter':'Automating', 'num':1, 'color':'red' }), Ember.Object.create({'name':'coverage','letter':'Coverage', 'num':1,'color':'yellow' }), Ember.Object.create({'name':'round','letter':'Rounds', 'num':1}), Ember.Object.create({'name':'roi_round','letter':'Round', 'num':1 }), Ember.Object.create({'name':'roi_year','letter':'Year', 'num':1}), Ember.Object.create({'name':'roi_round_coverage','letter':'Round"', 'num':1 }), Ember.Object.create({'name':'roi_year_with_coverage','letter':'Year"', 'num':10 }), ]);
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25180494
accepted answer: http://stackoverflow.com/a/25180494
tagged with: ember.js

http://stackoverflow.com/a/25124804
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25124693
downvote count: 0
has body: Works fine for me. Jsfiddle showing it works. What are you entering that isn't working? Your code should probably be as follows however: var answer=prompt("Rock, paper or scissors?"); if (answer==="rock"){ console.log ("tie"); } else if(answer==="paper"){ console.log("you win!"); } else { console.log("You Lose!"); //you shouldn't be setting the answer variable here, just outputting a console.log message } Edit: as Luke B pointed out, you weren't setting the variable, but you were printing out the result of the comparison. I.e. The answer to answer === 'you lose' is always going to be false unless you typed you lose instead of rock or paper or scissors.
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39105160
score: 1
answers question: http://stackoverflow.com/q/25124693

http://stackoverflow.com/a/25119946
accepted answer of: http://stackoverflow.com/q/25119253
type: Answer
answers question: http://stackoverflow.com/q/25119253
score: 2
has comment: http://stackoverflow.com/comment/39095567
has comment: http://stackoverflow.com/comment/39098225
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39097471
has comment: http://stackoverflow.com/comment/39095595
upvote count: 2
has body: Your selectors are all muddled, and you weren't correctly referencing the elements you needed within the chain. In this instance (for diagnositic purposes) I removed .html() from the end and outputted newCode into a console.log() command which I could interrogate in fireBug. This showed me that the filter selector couldn't find a matching element. I changed the filter to use a different selector. Then I realised that you were trying to unwrap the wrong element which was removing most of your mark-up. So I descended to the child of the matching bold spans and then unwrapped them. I then ended the chain. var code = 'asdasdad '; var newCode = $(' ').append(code) .find('iframe') .wrap(' ') .end() .find('img') .removeAttr('style') .wrap(' ') .end() .find('span') .filter("[style*='bold']") .wrapInner('') .children() .unwrap() .end() .end() .end() .html(); $('.output').text(newCode); See this updated fiddle for details: http://jsfiddle.net/P2Ry8/6/

http://stackoverflow.com/comment/39193665
type: AnswerComment
score: 0
type: Comment
has text: Perfect and quick answer thank you :) *edit fixed // i see ^^* thanks again
comment on: http://stackoverflow.com/a/25172571

http://stackoverflow.com/a/25179742
type: Answer
answers question: http://stackoverflow.com/q/25179608
score: 0
has body: Using Javascript, first write line below, and write rest of code in function load(). document.getElementById("Main").data = swf;

http://stackoverflow.com/comment/39112579
has text: Is there some other way to server static content with a post?
comment on: http://stackoverflow.com/a/25128836
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39247741
type: QuestionComment
has text: Does Master.UserNTGroup actually include quotes? If not `escape("<%=Master.UserNTGroup %>")`
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25202010

http://stackoverflow.com/q/25217747
has answer: http://stackoverflow.com/a/25218199
has comment: http://stackoverflow.com/comment/39277919
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39278191
upvote count: 2
has body: I am using jQuery Mobile, and for now, I have the following at the bottom of my tag: help Since the user may have a very bad network access, I hope the user can load my page faster, even though the JavaScript or CSS is not ready. Will it work if I: Put the after Put the in the end of
possible better answer: http://stackoverflow.com/a/25218199
type: Question
has comment: http://stackoverflow.com/comment/39278119
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/39277920
has comment: http://stackoverflow.com/comment/39278163
answer count: 2
linked to: http://stackoverflow.com/q/436411
downvote count: 0
has answer: http://stackoverflow.com/a/25217796
accepted answer: http://stackoverflow.com/a/25217796
has title: Should JavaScript/CSS be put in the bottom of an HTML page?
tagged with: jquery
has comment: http://stackoverflow.com/comment/39278386
has comment: http://stackoverflow.com/comment/39277887

http://stackoverflow.com/a/25125504
has comment: http://stackoverflow.com/comment/39149595
accepted answer of: http://stackoverflow.com/q/25124223
score: 2
answers question: http://stackoverflow.com/q/25124223
has comment: http://stackoverflow.com/comment/39138548
has comment: http://stackoverflow.com/comment/39106529
has comment: http://stackoverflow.com/comment/39111397
has comment: http://stackoverflow.com/comment/39138990
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39110463
has comment: http://stackoverflow.com/comment/39149544
has body: to add all billable rows you can use .DataTable().rows().eq(0) and apply a filter like this $(document).ready(function() { var table=$('#pricetable').DataTable({//use DataTable instead to use .rows() "sPaginationType": "full_numbers", "iDisplayLength": 5 }); var priceTotal = 0; table.rows().eq(0).filter( function (row) {//each row inside the .DataTable if(table.cell(row,1).data() === 'y'){//if it is billable priceTotal+=parseInt(table.cell(row,0).data());//parse the data to int and sum } }); alert("price "+priceTotal); }); you need to use .DataTable() to return a DataTables API instance so you can access each row with .rows() and loop to add only the billable rows http://jsfiddle.net/s827x/
has comment: http://stackoverflow.com/comment/39110649
upvote count: 2
has comment: http://stackoverflow.com/comment/39108670
has comment: http://stackoverflow.com/comment/39110581
type: Answer

http://stackoverflow.com/comment/39012312
type: QuestionComment
has text: @Mike'Pomax'Kamermans 01/08/2014 right 01-08/14 not right
comment on: http://stackoverflow.com/q/25075418
score: 0
type: Comment

http://stackoverflow.com/q/25184190
downvote count: 4
has body: Could someone please suggest a method in doing the following. I have a string which contents look like this. var string = "Argentina,2,Australia,17,Azerbaijan,1,Bangladesh,1,Belgium,2" And i am wanting to only wrap the country's name in quotes. so it would look like this. "Argentina",2,"Australia",17,"Azerbaijan",1,"Bangladesh",1,"Belgium",2 How can i go about achieving this. Thanks in advance.
has comment: http://stackoverflow.com/comment/39214382
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25184430
has comment: http://stackoverflow.com/comment/39214153
tagged with: javascript
has answer: http://stackoverflow.com/a/25184340
has comment: http://stackoverflow.com/comment/39214991
has comment: http://stackoverflow.com/comment/39214191
favorite count: 0
upvote count: 0
type: UnansweredQuestion
score: -4
has title: Wrap only words in a string in quotation marks - JavaScript?

http://stackoverflow.com/comment/39052745
type: AnswerComment
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58549/discussion-between-runt-and-fred-ii).
comment on: http://stackoverflow.com/a/25096288
score: 0

http://stackoverflow.com/comment/39216058
type: Comment
comment on: http://stackoverflow.com/a/25184696
type: AnswerComment
has text: Combining your answer with syntax correction (and minor tweaks to negate a logic check) produces http://jsfiddle.net/zlatin_zlatev/bue3ytek/1/
score: 0

http://stackoverflow.com/a/25185777
has comment: http://stackoverflow.com/comment/39282084
has comment: http://stackoverflow.com/comment/39217664
has comment: http://stackoverflow.com/comment/39219800
answers question: http://stackoverflow.com/q/25185566
has comment: http://stackoverflow.com/comment/39220331
has body: Try $('#myBtn').on('click', function(event) { $("#joyRideTipContent").joyride({ modal:true, expose: true, autoStart: true }); }); you're mixing jquery and classic js - not good.
score: 0
type: Answer

http://stackoverflow.com/q/25108941
favorite count: 0
has comment: http://stackoverflow.com/comment/39075144
has answer: http://stackoverflow.com/a/25112125
has comment: http://stackoverflow.com/comment/39075032
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39075040
has body: http://jsfiddle.net/6L2pJ/ var test = function () { var i, a, startTime; startTime = new Date().getTime(); for (i = 0; i &lt; 3000000000; i = i + 1) { a = i % 5; } console.log(a); //prevent dead code eliminiation return new Date().getTime() - startTime; }; var results = []; for (var i = 0; i &lt; 5; i = i + 1) { results.push(test()); } for (var i = 0; i &lt; results.length; i = i + 1) { console.log('Time needed: ' + results[i] + 'ms'); } Results in: First execution: Time needed: 13654ms Time needed: 32192ms Time needed: 33167ms Time needed: 33587ms Time needed: 33630ms Second execution: Time needed: 14004ms Time needed: 32965ms Time needed: 33705ms Time needed: 33923ms Time needed: 33727ms Third execution: Time needed: 13124ms Time needed: 30706ms Time needed: 31555ms Time needed: 32275ms Time needed: 32752ms What is the reason for the jump from first to second row? My setup: Ubuntu 13.10 Google Chrome 36.0.1985.125 (Mozilla Firefox 30.0 giving same kind of results) EDIT: I modified the code leaving it semantically the same but inlining everything. Interestingly it does not only speed up the execution significantly but it also removes the phenomena that I described above to a great extent. A slight jump is still noticable though. Modified code: http://jsfiddle.net/cay69/ Results: First execution: Time needed: 13786ms Time needed: 14402ms Time needed: 14261ms Time needed: 14355ms Time needed: 14444ms Second execution: Time needed: 13778ms Time needed: 14293ms Time needed: 14236ms Time needed: 14459ms Time needed: 14728ms Third execution: Time needed: 13639ms Time needed: 14375ms Time needed: 13824ms Time needed: 14125ms Time needed: 14081ms
has comment: http://stackoverflow.com/comment/39077196
has comment: http://stackoverflow.com/comment/39075538
has comment: http://stackoverflow.com/comment/39075521
has comment: http://stackoverflow.com/comment/39075127
score: 7
has comment: http://stackoverflow.com/comment/39075198
has answer: http://stackoverflow.com/a/25109184
upvote count: 7
type: Question
has comment: http://stackoverflow.com/comment/39075056
tagged with: performance
has comment: http://stackoverflow.com/comment/39075035
tagged with: javascript
has comment: http://stackoverflow.com/comment/39075047
has comment: http://stackoverflow.com/comment/39075017
has comment: http://stackoverflow.com/comment/39075615
has title: Understanding JavaScript performance variance
has comment: http://stackoverflow.com/comment/39075224
has comment: http://stackoverflow.com/comment/39076965
answer count: 3
has answer: http://stackoverflow.com/a/25109156
downvote count: 0

http://stackoverflow.com/a/25121871
has comment: http://stackoverflow.com/comment/39099476
type: Answer
has comment: http://stackoverflow.com/comment/39099655
answers question: http://stackoverflow.com/q/25121240
score: 0
has body: Because you say you can use JavaScript, the simplest way to do this would be to set the initial line-height of the &lt;textarea&gt; equal to its initial height. Then onkeypress or a similar JavaScript event you can check textarea.value.length and if it's long enough to wrap, then you would set the line-height back to the font-size.

http://stackoverflow.com/q/25153901
answer count: 1
tagged with: minify
has title: unpack packed scripts with javascript function
linked to: http://stackoverflow.com/q/2460751
favorite count: 0
has answer: http://stackoverflow.com/a/25153936
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/2460751
has body: unpack javascript code with function.js I need the function and not the online websites for jsbeautifier. I want to beautifier scripts with our own function. code for example : &lt;script&gt; eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('8("2q").2p({13:"7://2o.6.5:2n/2m/2l.2k",2j:"7",2i:"4",d:"7://6.5/9/w.p",2h:"2g",2f:2e,2d:2c,2b:"6.5",2a:"",29:{13:\'/28/27.26\',s:\'e\',n:\'25-24\',23:\'22\',12:\'/\'},21:{20:"e",1z:"1y",1x:"e"},1w:{"1v-3":{"12":"7://6.5/r","1u":\'&lt;11 q="7://6.5/1t-r-1s.1r" 1q=0 1p=0 1o=0 1n=1m 1l=1k 1j=1i&gt;&lt;/11&gt;\'},"/9/1h.1g?1f":{"1e":"r"},"1d-2":{},"1c-1":{}},10:[{g:"v",f:{d:"7://6.5/c/c.u"}},{g:"z",q:"7://6.5/9/9.y",f:{d:"7://6.5/c.p"}}],10:[{g:\'z\',q:"7://6.5/9/9.y",f:{d:"7://6.5/9/w.p"}},{g:\'v\',f:{d:"7://6.5/c/c.u"}}]});o h;o m=0;o a=0;8().1b(b(x){i(a&gt;0)m+=x.n-a;a=x.n;i(0!=0&amp;&amp;m&gt;=0){a=-1;8().1a();8().19(e);$(\'#18\').l();$(\'k.j\').l()}});8().17(b(x){a=-1});8().16(b(x){t(x)});8().15(b(){$(\'k.j\').l()});b t(x){$(\'k.j\').s();i(h)14;h=1}',36,99,'|||||org|youwatch|http|jwplayer|player|p016043|function|lulu|skin|false|config|type|vvplay|if|video_ad|div|show|tt16043|position|var|zip|src|q0dwycezrio5|hide|doPlay|xml|html5|bekle||swf|flash|modes|iframe|link|file|return|onComplete|onPlay|onSeek|video_info_box|setFullscreen|stop|onTime|backstroke|timeslidertooltipplugin|video_id|nocache|js|download|380|HEIGHT|640|WIDTH|NO|SCROLLING|MARGINHEIGHT|MARGINWIDTH|FRAMEBORDER|html|640x380|embed|code|sharing|plugins|oncomplete|none|callout|onpause|viral|_0|linktarget|left|top|png|logo_player|images2|logo|aboutlink|abouttext|650|width|360|height|7895|duration|bufferlength|provider|mp4|video|tlvp43czfwoax3ptxzfinrfyuh4xxzcjmtk2ojth3w2upbsc5dae55p7zy|8777|fs37|setup|flvplayer'.split('|'),0,{})) ; &lt;/script&gt; Something lik…
score: -5
has comment: http://stackoverflow.com/comment/39158600
has comment: http://stackoverflow.com/comment/39158607
type: Question
has comment: http://stackoverflow.com/comment/39159287
downvote count: 5
tagged with: javascript
upvote count: 0

http://stackoverflow.com/comment/39097211
has text: Added in to the question
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25120764
score: 0

http://stackoverflow.com/comment/79764328
comment on: http://stackoverflow.com/q/25144428
has text: I want to do the reverse conversion of the question above. Is there any way to convert some of the existing 'key' as values in the new format by adding new key values?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39227715
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25191009
score: 4
has text: Let us know what is being return by `$('#geofenceId').val()`

http://stackoverflow.com/comment/72028522
type: AnswerComment
has text: correct, Firefox doesn't have ::webkit .. you would have to use some javascript or jquery to hide it or try using some css to style it.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/40852544

http://stackoverflow.com/a/56601499
score: 3
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/99779074
upvote count: 3
has body: NO, it does NOT! tested in Chrome and Firefox. which is a silly thing, as custom fonts may change dimensions of the layout, so you have to apply some tricks.. to make it pixel perfect. The simpliest way to bypass this (initialization pitfails with size/position detection, like getBoundingClientRect() etc.) with modern browsers is to do: window.addEventListener('load', /* do things here */) ..or, another way is to put, for example: &lt;link rel="preload" href="fonts/Oxygen.woff2" as="font"&gt; inside the head (it's called browser preload hints).
answers question: http://stackoverflow.com/q/25223470

http://stackoverflow.com/a/25201023
has comment: http://stackoverflow.com/comment/39256296
answers question: http://stackoverflow.com/q/25200740
has comment: http://stackoverflow.com/comment/39258523
score: 0
type: AcceptedAnswer
has body: You must use ID only once in a document, so you have to change #osother to .osother. And also fields should be hidden when the value of dropdown is changed from osother. JSFiddle is here. HTML Operating System: -- Select an Option -- Windows iOS Other Please Specify: Version: JS $(document).ready(function () { $("select").change(function () { $("select option:selected").each(function () { if ($(this).attr("value") == "otheros") { $(".osother").show(); } else { $(".osother").hide(); } }); }).change(); }); CSS .osother { display:none; }
accepted answer of: http://stackoverflow.com/q/25200740
type: Answer

http://stackoverflow.com/comment/39078022
score: 0
type: Comment
has text: @LironShapira I've removed the bit about the RPS, I agree that bit was unnecessary.
comment on: http://stackoverflow.com/a/25102619
type: AnswerComment

http://stackoverflow.com/q/25178894
tagged with: web
favorite count: 0
has answer: http://stackoverflow.com/a/25179764
tagged with: android
has title: Multilanguage in a HTML webpage
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39204824
accepted answer: http://stackoverflow.com/a/25179764
type: AnsweredQuestion
downvote count: 2
has body: I am realtivly new to web programming and I am looking for something similar as res/values/strings.xml in android, but for a webpage. Does something like this exist (a link to a book describing this solution)? Thanks!
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39205430
has comment: http://stackoverflow.com/comment/39206430
upvote count: 0
answer count: 1

http://stackoverflow.com/a/25106230
has body: The code that sets the session variable gets run when the page is rendered and before the JavaScript is run. This is the difference between client n server side code.
answers question: http://stackoverflow.com/q/25105976
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39127485

http://stackoverflow.com/comment/39259708
comment on: http://stackoverflow.com/a/25193849
type: AnswerComment
has text: I tested isEmail() and isPhoneNumber() and they both passed. Maybe you need to tweak the 'validate' function to your needs.
score: 0
type: Comment

http://stackoverflow.com/comment/39032423
comment on: http://stackoverflow.com/q/25085897
has text: This is question that can be googled. There are many readily available answer via google. And even some within stackoverflow http://stackoverflow.com/questions/5731224/calling-javascript-function-from-codebehind.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25205331
answers question: http://stackoverflow.com/q/25205056
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: You could simply parse the XML and get its content function extractJson() { var jsonData = '&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;string xmlns="http://tempuri.org/"&gt;[ {'sone': 'json'},{'some': 'json2'}]&lt;/string&gt;'; var parser = new DOMParser(); var xmlDoc = parser.parseFromString(jsonData,"text/xml"); console.log(xmlDoc.getElementsByTagName('string')[0].innerHTML); } extractJson(); Note: Internet Explorer uses the loadXML() method to parse an XML string, while other browsers use the DOMParser object.

http://stackoverflow.com/a/25099701
downvote count: 0
answers question: http://stackoverflow.com/q/25099651
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25099651
score: 1
has body: When setTimeout is executed there is no more "this". Try saving this in a variable and then use the variable.
type: AcceptedAnswer

http://stackoverflow.com/a/25095236
score: 0
has body: What you have is fine, although it does involve creating unnecessary function objects (bind creates and returns a new function). As an alternative, just use a variable you close over: function myclass() {} myclass.prototype.dosomthing = function () {} myclass.prototype.init = function() { var self = this; // Remember `this` pool.getConnection(function(err,connection)){ self.dosomthing(); // Use it connection.query("sql_statement", function(err,rows){ self.dosomething(); // Use it }); }); }; I've used self above, but generally I pick a name based on what the object actually is. So for instance, if myclass were Foo, I'd probably use the name thisFoo or similar. Side note: The overwhelming convention in JavaScript is that functions meant to be used as constructors are named with an initial uppercase character. So MyClass rather than myclass.
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25095217
answers question: http://stackoverflow.com/q/25095217

http://stackoverflow.com/q/25229888
has comment: http://stackoverflow.com/comment/39300441
has comment: http://stackoverflow.com/comment/39300611
has title: Generate Unique UInt32 ID for Couchbase
has comment: http://stackoverflow.com/comment/39300367
favorite count: 0
has comment: http://stackoverflow.com/comment/39300466
has comment: http://stackoverflow.com/comment/39300631
has comment: http://stackoverflow.com/comment/39300532
score: 6
tagged with: couchbase
has answer: http://stackoverflow.com/a/25237184
upvote count: 6
tagged with: node.js
has comment: http://stackoverflow.com/comment/39300341
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39300417
has answer: http://stackoverflow.com/a/57925726
has body: I am looking for a way to generate a unique ID for nosql database. Unlike relational database there is no idea of rows which means there is no last row to increment from. The most common way to handle this is to use UUID's. But my problem is I need to add another ID (other than the UUID) which needs to be: Unique Unsigned Int32 Total data could reach around 50,000,000. So how would you generate somewhat unique uint32 ID's? The UInt32 value type represents unsigned integers with values ranging from 0 to 4,294,967,295. Only generated when a new user registers. 3 Id's are given to each new user. Currently using Couchbase Server.
type: Question
has comment: http://stackoverflow.com/comment/39300403
has comment: http://stackoverflow.com/comment/39300310
accepted answer: http://stackoverflow.com/a/25237184
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25229998
answer count: 3
has answer: http://stackoverflow.com/a/25229998

http://stackoverflow.com/q/25185059
linked to: http://stackoverflow.com/q/25185512
accepted answer: http://stackoverflow.com/a/25185461
tagged with: dom
has comment: http://stackoverflow.com/comment/39216918
score: 2
answer count: 1
has title: How to check if JS object implement some DOM IDL interface?
has body: Specs say that document nodes satisfy HTMLElement IDL interface. This evaluates to true: document.querySelectorAll('a')[0] instanceof HTMLElement Is that a correct way to test (by instanceof HTMLElement)?
downvote count: 0
tagged with: javascript
tagged with: specifications
favorite count: 0
has answer: http://stackoverflow.com/a/25185461
upvote count: 2
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/25160900
score: 0
answers question: http://stackoverflow.com/q/25160700
has comment: http://stackoverflow.com/comment/39170995
type: Answer
has body: Shallow copies, such as underscore's, or JSON parse+strinfigy won't copy functions (if you have any). Depending on the structure of your current person object, it might be enough to do person1= new person(); JS doesn't have a real "class" object type. Functions can be treated as classes in most cases. Keep in mind that any person's properties that are, in turn, a reference to a global object, will be common among all instances of person. That's not necesarily a bad thing. I've seen class properties used as a datastore to make instances talk among themselves. EDIT: I remembered about a post I read long ago about an "elegant way to deep clone objects". It helped me a lot back then. It's meant to clone objects and properties of variable depth, but again, it won't copy methods.
has comment: http://stackoverflow.com/comment/39171173

http://stackoverflow.com/comment/39144460
has text: try to set the html in initialize listener or method. `config : { listeners : { initialize : function () { this.setHtml(< >); } }`
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25136901
type: Comment

http://stackoverflow.com/a/25152412
accepted answer of: http://stackoverflow.com/q/25152160
answers question: http://stackoverflow.com/q/25152160
has body: I would use getBoundingClientRect: function on_screen(elt) { var rect = elt.getBoundingClientRect(); return rect.top &lt;= window.scrollY + window.innerHeight &amp;&amp; rect.bottom &gt;= window.scrollY &amp;&amp; rect.left &lt;= window.scrollX + window.innerWidth &amp;&amp; rect.right &gt;= window.scrollX; }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39304560
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/35131804
score: 10
has comment: http://stackoverflow.com/comment/58125761
has comment: http://stackoverflow.com/comment/58475381
has comment: http://stackoverflow.com/comment/58116056
has comment: http://stackoverflow.com/comment/58076883
has comment: http://stackoverflow.com/comment/58075525
has body: In the current version on select2 - v4.0.1 you can set the value like this: var $example = $('.js-example-programmatic').select2(); $(".js-programmatic-set-val").on("click", function () { $example.val("CA").trigger("change"); }); // Option 2 if you can't trigger the change event. var $exampleDestroy = $('.js-example-programmatic-destroy').select2(); $(".js-programmatic-set-val").on("click", function () { $exampleDestroy.val("CA").select2('destroy').select2(); }); using "trigger(change)" Alaska Hawaii California Nevada Oregon Washington Arizona Colorado Idaho Montana Nebraska New Mexico North Dakota Utah Wyoming Alabama Arkansas Illinois Iowa Kansas Kentucky Louisiana Minnesota Mississippi Missouri Oklahoma South Dakota Texas Tennessee Wisconsin Connecticut Delaware Florida Georgia Indiana Maine Maryland Massachusetts Michigan New Hampshire New Jersey New York North Carolina Ohio Pennsylvania Rhode Island South Carolina Vermont Virginia West Virginia using destroy: Alaska Hawaii California Nevada Oregon Washington Arizona Colorado Idaho Montana Nebraska New Mexico North Dakota Utah Wyoming Alabama Arkansas Illinois Iowa Kansas Kentucky Louisiana Minnesota Mississippi Missouri Oklahoma South Dakota Texas Tennessee Wisconsin Connecticut Delaware Florida Georgia Indiana Maine Maryland Massachusetts Michigan New Hampshire New Jersey New York North Carolina Ohio Pennsylvania Rhode Island South Carolina Vermont Virginia West Virginia set value
answers question: http://stackoverflow.com/q/25187926
has comment: http://stackoverflow.com/comment/58087540
has comment: http://stackoverflow.com/comment/58123762
upvote count: 10
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/58107586
has comment: http://stackoverflow.com/comment/58483669
has comment: http://stackoverflow.com/comment/58116371

http://stackoverflow.com/q/25174055
type: UnansweredQuestion
has title: How to persist the value of label after using getElementById() javascript function in asp.net?
type: Question
has comment: http://stackoverflow.com/comment/39198516
has answer: http://stackoverflow.com/a/25174127
answer count: 3
has body: This is my code -- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="myfirst()" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:HiddenField ID="Hidden1" runat="server" /> After running this code i get the output perfectly on the label i.e text of label1 gets change but again it is assigned to its original "value" after page is refreshed. Infact, i want to persist its value to "abc" after page is refreshes.
tagged with: javascript
tagged with: asp.net
score: 0
has answer: http://stackoverflow.com/a/25174715
has answer: http://stackoverflow.com/a/25174312

http://stackoverflow.com/comment/134536367
type: AnswerComment
type: Comment
has text: This doesn't appear to work.
score: 2
comment on: http://stackoverflow.com/a/25136759

http://stackoverflow.com/q/25115535
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25120636
type: Question
tagged with: momentjs
favorite count: 0
score: 97
answer count: 2
downvote count: 1
possible better answer: http://stackoverflow.com/a/55019956
has body: What is the difference between those two: var year = moment().format('YYYY'); var year = moment().year(); Is it just type of a returned value or anything else?
upvote count: 98
has answer: http://stackoverflow.com/a/25120636
has answer: http://stackoverflow.com/a/55019956
type: AnsweredQuestion
has title: What is difference between 'year()' and 'format('YYYY')'?

http://stackoverflow.com/comment/39274778
has text: @user1724317 - `getJSON()` is an Ajax call underneath - same issue. What library is `UI`? We can't help you in a very detailed manner when you don't show us any of your code or tell us what libraries you're using. It's like we're blindfolded and you're hiding most of the problem.
type: AnswerComment
comment on: http://stackoverflow.com/a/25215824
score: 0
type: Comment

http://stackoverflow.com/comment/39282637
score: 0
type: Comment
type: QuestionComment
has text: you need to use the JSON.parse(artist_likes)
comment on: http://stackoverflow.com/q/25220348

http://stackoverflow.com/comment/39056600
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25098884
score: 0
has text: `new Array(len)` can be just `[]`.

http://stackoverflow.com/comment/39283242
type: QuestionComment
has text: Can you explain why you need a template for each month? I think my approach would instead to be to have a single template that is smart enough to put the days of the months into the right column. This could be done with a little bit of logic at the start of the directive's `link` function. If you don't use that approach, and you don't want sub-directives, you'll have to start looking at using `$compile`, which is more complicated (imo).
comment on: http://stackoverflow.com/q/25220478
score: 0
type: Comment

object
tags question: http://stackoverflow.com/q/25110066
tags question: http://stackoverflow.com/q/25077682
tags question: http://stackoverflow.com/q/25142300
tags question: http://stackoverflow.com/q/25193720
tag name: object
tags question: http://stackoverflow.com/q/25146826
tags question: http://stackoverflow.com/q/25100707
tags question: http://stackoverflow.com/q/25172082
tags question: http://stackoverflow.com/q/25085103
tags question: http://stackoverflow.com/q/25170534
tags question: http://stackoverflow.com/q/25095789
tags question: http://stackoverflow.com/q/25128278
tags question: http://stackoverflow.com/q/25140723
tags question: http://stackoverflow.com/q/25079189
tags question: http://stackoverflow.com/q/25114882
tags question: http://stackoverflow.com/q/25212810
tags question: http://stackoverflow.com/q/25188811
tags question: http://stackoverflow.com/q/25212116
tags question: http://stackoverflow.com/q/25218842
tags question: http://stackoverflow.com/q/25105094
tags question: http://stackoverflow.com/q/25112718
tags question: http://stackoverflow.com/q/25196776
tags question: http://stackoverflow.com/q/25090581
tags question: http://stackoverflow.com/q/25218922
tags question: http://stackoverflow.com/q/25123740
tags question: http://stackoverflow.com/q/25103793
tags question: http://stackoverflow.com/q/25101038
tags question: http://stackoverflow.com/q/25190400
tags question: http://stackoverflow.com/q/25075334
tags question: http://stackoverflow.com/q/25079095
tags question: http://stackoverflow.com/q/25161438
tags question: http://stackoverflow.com/q/25152414
tags question: http://stackoverflow.com/q/25072701
tags question: http://stackoverflow.com/q/25110315
tags question: http://stackoverflow.com/q/25127224
tags question: http://stackoverflow.com/q/25220820
tags question: http://stackoverflow.com/q/25191594
tags question: http://stackoverflow.com/q/25160700
type: Tag
tags question: http://stackoverflow.com/q/25170659
tags question: http://stackoverflow.com/q/25113414
tags question: http://stackoverflow.com/q/25077355

http://stackoverflow.com/a/25168382
has comment: http://stackoverflow.com/comment/39189345
has body: Here's my suggestion ? function LongestWord(sen) { return sen.split(/\b/).filter(function(item) { return item.trim().length; }).sort(function(a,b) { return b.length - a.length; }); } split the sentence on word boundary, then trim off empty spaces, finally sort by length of each word and return the sorted array.
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39185927
score: 3
answers question: http://stackoverflow.com/q/25168312
has comment: http://stackoverflow.com/comment/39186209
upvote count: 3
has comment: http://stackoverflow.com/comment/39190677
has comment: http://stackoverflow.com/comment/39186422

character-encoding
tags question: http://stackoverflow.com/q/25172861
tags question: http://stackoverflow.com/q/25184917
tag name: character-encoding
tags question: http://stackoverflow.com/q/25119265
type: Tag
tags question: http://stackoverflow.com/q/25178761
tags question: http://stackoverflow.com/q/25184479

w3c
type: Tag
tag name: w3c
tags question: http://stackoverflow.com/q/25172549

http://stackoverflow.com/a/25100414
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25100353
has body: The problem here is that para is a live collection. So, when you remove the first paragraph, para changes and becomes a collection of just one element, terminating the for loop because para.length becomes 1. To avoid this, convert the collection to an array: function removeall(){ var para = [].slice.call(document.getElementsByTagName('P')); for(var i = 0; i &lt; para.length; i++){ document.body.removeChild(para[i]); } } Or iterate from the end instead: for (var i = para.length; i--;) document.body.removeChild(para[i]); Others suggest to use a while loop: it's fine too.
upvote count: 1
type: Answer

http://stackoverflow.com/q/25217072
has body: I have a very confusing problem. I want to do some action within an HTML site, when a link is clicked. I implemented the following code with a click event, which should handle this behaviour: $(document).ready(function() { console.log("Ready!"); $( "a" ).click(function() { console.log("Alert!"); alert("Test"); }); }); I implmented it in the head and at the end of the body but nothing happens. I don't get the console.log or alert. When I change the click to mouseover everything ist fine. Do you have any suggestions? Regards, Jens
has comment: http://stackoverflow.com/comment/39276610
has comment: http://stackoverflow.com/comment/39276837
has title: Javascript jQuery click function doesn't work
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25217240
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25217463
has answer: http://stackoverflow.com/a/25217118
has answer: http://stackoverflow.com/a/25217284
answer count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39276766
has answer: http://stackoverflow.com/a/25217898
type: Question
has comment: http://stackoverflow.com/comment/39277390

http://stackoverflow.com/q/25154786
type: Question
has title: Instagram OAuth user data
tagged with: javascript
upvote count: 1
favorite count: 0
tagged with: oauth
tagged with: angularjs
tagged with: instagram
type: UnansweredQuestion
has body: I have an app for client side Instagram login. So far, user can successfully login into Instagram and recieve access token. The problem is that I want to make a request, and get the Instagram user data, but don't know how. I also want to know how to clear user's access token to logout. My code: angular.module('instagramApp.services', []).factory('instagramService', function($q) { var authorizationResult = false; return { initialize: function() { authorizationResult = OAuth.create('instagram'); }, isReady: function() { return (authorizationResult); }, connectInstagram: function() { var deferred = $q.defer(); OAuth.redirect('instagram', 'https://instagram.com/oauth/authorize/?client_id='CLIENT_ID'&amp;redirect_uri=http://localhost/insta-login&amp;response_type=token'); return deferred.promise; } } });
downvote count: 0
answer count: 0
score: 1
tagged with: oauth-2.0

http://stackoverflow.com/a/25130760
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25130654
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25130654
has body: I realize this is a slight variation on what you're trying to do but think you may find it useful in this case. You can use a float left for each div in the row followed by a div with style="clear:both" to begin a new row. Here is the code in action in a JSFiddle .box { float:left; width:100px; height:100px; margin-right:5px; margin-bottom:5px; background-color:#0000FF; } var $container = $("&lt;div&gt;&lt;/div&gt;").css("float","left"); for(var i = 0; i &lt; 3; i++) { for (var j = 0; j &lt; 4; j++){ $("&lt;div&gt;&lt;/div&gt;").addClass("box").appendTo($container); } $("&lt;div&gt;&lt;/div&gt;").css("clear", "both").appendTo($container); } $container.appendTo($("body"));
type: Answer
score: 2

http://stackoverflow.com/q/25172671
has answer: http://stackoverflow.com/a/25174285
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39193992
score: 5
has body: From my understanding JavaScript doesn't have a ints or floats, but just a Number type which is formatted as a double-precision 64-bit floating point value, but JavaScript also has typed arrays which can be many types including: Int32Array, Uint32Array, and Float32Array. So my question is: do typed arrays underneath just use the Number type with some bit operation wrapper functions, or does it actually use some other data type? And if they do use some other type, then is it possible to actually create your own int and float types by wrapping typed arrays.
accepted answer: http://stackoverflow.com/a/25174285
tagged with: types
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: number-formatting
favorite count: 0
possible better answer: http://stackoverflow.com/a/25174038
has answer: http://stackoverflow.com/a/25174038
has title: JavaScript Data Types
type: AnsweredQuestion
upvote count: 5

http://stackoverflow.com/comment/39273026
type: Comment
has text: Only integers up to 2^53 can be *distinctly* represented - a double is used for all numeric values. This is a duplicate, I am sure.
comment on: http://stackoverflow.com/q/25215222
score: 0
type: QuestionComment

http://stackoverflow.com/comment/133514386
type: Comment
comment on: http://stackoverflow.com/a/45357082
has text: Big thanks! This still works in v8.0.4, march 2023.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39087581
has text: What exactly jqgrid columns are going to return. i want to save that order in database.(format).
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25094613

http://stackoverflow.com/comment/39092320
comment on: http://stackoverflow.com/q/25093465
has text: yes. i also considered exporting frame-by-frame instead. but stil i want to understand why is the simple method of addSymbol() not working when i try to pass the name. according to adobe documentation: http://help.adobe.com/en_US/flash/cs/extend/WSd5f4b6c52cfaa4b1-d3431961351cb0528c-7ffe.html it should work. thanks for your suggestion i will check it out.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39326303
comment on: http://stackoverflow.com/a/25217451
score: 0
type: AnswerComment
type: Comment
has text: thank you for your help. but it is working fine now, and I'm still using the code I have given above. thanks for your help, though.

http://stackoverflow.com/comment/39097120
type: AnswerComment
has text: oh, no that is not the issue, it is just the way my method is setup, I should just remove the db.obj and put db for the question, My guess is you can not add tables to the database once it has completed the onupgradeneeded method.
type: Comment
comment on: http://stackoverflow.com/a/25104444
score: 0

http://stackoverflow.com/comment/39125859
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25126820
has text: Hello Paul, what do you mean by "in this case"? Is there a valid timezone list?

http://stackoverflow.com/q/25149521
downvote count: 0
accepted answer: http://stackoverflow.com/a/25149693
has comment: http://stackoverflow.com/comment/39151063
type: AnsweredQuestion
has body: I can load external scripts with this code: newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.src = 'http://code.jquery.com/jquery-latest.js'; document.getElementsByTagName('head')[0].appendChild(newScript); But I looked this page: http://www.w3schools.com/jsref/event_onload.asp And I tried my new code: &lt;script type="text/javascript"&gt; newScript = document.createElement('script'); newScript.type = 'text/javascript'; newScript.onload = 'loaded();'; newScript.src = 'http://code.jquery.com/jquery-latest.js'; document.getElementsByTagName('head')[0].appendChild(newScript); function loaded() { alert('The script is loaded'); } &lt;/script&gt; But it dont worked. I want to get an alert when script is loaded
tagged with: alert
score: 1
has comment: http://stackoverflow.com/comment/39151040
has comment: http://stackoverflow.com/comment/39151079
has answer: http://stackoverflow.com/a/25149693
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39151237
favorite count: 0
has title: alert when script loaded
tagged with: load

http://stackoverflow.com/comment/39067138
has text: So if I understand you correctly, I could define `.off()` to do what it normally does, and then use `setupEventHandlers()` as a callback?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25104772

http://stackoverflow.com/comment/39228307
score: 0
type: Comment
type: QuestionComment
has text: @m.e.conroy I know if I add it in the controller header then it will give me error but in my case I am not and its still giving DI error.
comment on: http://stackoverflow.com/q/25191048

http://stackoverflow.com/comment/39324527
comment on: http://stackoverflow.com/q/25218550
has text: Hi, what sort of events do you have in mind? If the idea is to share the data between the two renderings, then just put the data somewhere common, then render both based on the same data. Good presentation about how this can work here: http://facebook.github.io/react/blog/2014/08/03/community-roundup-21.html
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25080392
tagged with: angular-ngmodel
has answer: http://stackoverflow.com/a/25080939
tagged with: javascript
has body: I want to convert lenghts from mm to ft and inches or vice versa. User can input either mm or ft&amp;in.The case is I always want to save data in mm to database but use angular to see it in both format. I have already created a solution for it. http://plnkr.co/edit/thgx8vjsjxwfx6cLVVn1?p=preview But it is using ng-change everytime to convert the values. I was wondering if some angular expert has better idea of doing similar stuff. Please note that I am only planning to save single value $scope.lengthmm var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope) { // $scope.lengthtodb = 0; $scope.mmToFtIn =function(){ toInch = $scope.lengthmm * 0.0393701; toFt = toInch/12; OutputFT = Math.floor(toFt); OutputInch = (toFt - Math.floor(toFt))*12; $scope.lengthft = OutputFT; $scope.lengthin = OutputInch; $scope.Result1 = OutputFT + "ft" + OutputInch + "Inches"; }; $scope.FtInTomm =function(){ tomm = (($scope.lengthft *12)+ $scope.lengthin)*25.4; $scope.lengthmm = tomm; $scope.Result2 = tomm; }; }); In addition, as there will be lots of fields using the the same logic maybe method mmToFTIn needs to split in two methods to bind ft and inches separately. But I am really looking forward to see a smarted solution.
has title: Data Binding to convert mm to ft and inches or vice versa using Angularjs and ng-model
has answer: http://stackoverflow.com/a/32656013
score: 0
has answer: http://stackoverflow.com/a/25080787
answer count: 3
tagged with: angularjs
type: UnansweredQuestion
type: Question
tagged with: angularjs-directive

http://stackoverflow.com/a/25106388
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39080221
has body: Edit: Original code below has callback. The other control routine without callback is to use Promise/A+ and at time of writing (Aug 2014), Mozilla page says it is still experimental and not fully supported by all browsers. Basically, promise goes like this (on FireFox):- var p1 = new Promise(function(resolve, reject) { setTimeout(resolve, 400, "a"); }); var p2 = new Promise(function(resolve, reject) { setTimeout(resolve, 200, "b"); }); Promise.all([true, p1, p2]).then(function(values) { // values == [ true, 'a','b'] }); ~~ Use async.js library which allows you to control the asynchronous function, minor tweak to add callback to your existing functions. Here's a code snippet:- /* start with some synchronous functions */ /* rewrite your async functions with callback, and use async.parallel() */ async.parallel([ function(callback){ /*asynchronous functions*/ setTimeout(function(){ callback(null, 'one'); }, 200); }, function(callback){ /*asynchronous functions*/ setTimeout(function(){ callback(null, 'two'); }, 100); } ], // optional callback function(err, results){ // the results array will equal ['one','two'] even though // the second function had a shorter timeout. /* continue with some synchronous functions */ });
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25104224
score: 1
answers question: http://stackoverflow.com/q/25104224
has comment: http://stackoverflow.com/comment/39070166

http://stackoverflow.com/comment/39049095
score: 1
type: AnswerComment
has text: I'm not using jQuery in this project.
type: Comment
comment on: http://stackoverflow.com/a/25087749

http://stackoverflow.com/comment/39134544
comment on: http://stackoverflow.com/q/25141004
score: 0
type: Comment
type: QuestionComment
has text: Which browser are you using?

http://stackoverflow.com/a/25073724
score: 1
type: AcceptedAnswer
downvote count: 0
has body: You can't. An application adapter changes the way the application server resolves JSPs - while JS files are directly requested from the browser. As JS files are typically minified, with no notion of different files due to the site, you'll have to make your JS files aware of the different conditions in which they run - e.g. introduce conditional initialization in them or embed different JS files in your themes (or make the themes configurable to include different JS files)
type: Answer
accepted answer of: http://stackoverflow.com/q/25070366
answers question: http://stackoverflow.com/q/25070366
upvote count: 1

http://stackoverflow.com/a/25128456
upvote count: 7
has comment: http://stackoverflow.com/comment/39112992
has comment: http://stackoverflow.com/comment/39112972
downvote count: 0
has comment: http://stackoverflow.com/comment/39112415
accepted answer of: http://stackoverflow.com/q/25128210
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39135925
has body: All you have to do is return a rejected promise. All of your steps should be returning promises if they're doing any asynchronous actions. var success1 = function () { return $.Deferred(function (d){ return d.resolve();}).promise(); }; var success2 = function () {return $.Deferred(function (d){ return d.resolve();}).promise();}; var success3 = function () {return $.Deferred(function (d){ return d.resolve();}).promise();}; var fail = function () { return $.Deferred(function (d){ return d.reject();}).promise(); }; var success4 = function () {return $.Deferred(function (d){ return d.resolve();}).promise();}; success1() .then(success2) .then(success3) .then(fail) .then(success4) .done(function() { console.log("Successful. :("); }) .fail(function () { console.log("Failure. :)"); // this one happens }); success1-4 are simply returning resolved promises while fail returns a rejected promise. http://jsfiddle.net/43Mr8/
has comment: http://stackoverflow.com/comment/39112774
type: Answer
answers question: http://stackoverflow.com/q/25128210
score: 7
has comment: http://stackoverflow.com/comment/39113150

http://stackoverflow.com/a/25090885
has body: I solved my issue by moving the javascript from the Header to appear at the bottom of the included page: jamesmsg.php. I'm now able to post and have the appropriate div refresh without the entire page always refreshing.
type: Answer
answers question: http://stackoverflow.com/q/25087908
score: 0

http://stackoverflow.com/comment/39063612
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25102897
has text: ITS already inside a div
score: 0

http://stackoverflow.com/q/25184739
tagged with: javascript
tagged with: jquery
score: 0
has title: How to set the background color of the content that should be displayed in a fancybox in jquery?
tagged with: fancybox
has answer: http://stackoverflow.com/a/25185147
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39217779
has comment: http://stackoverflow.com/comment/39215390
has body: I have a div that forms the content of the fancybox. I need to change the background color of the div which froms the content of the fancybox on click of a link which will popup the fancybox? How to change it in jquery? /* Href */ click here /* FancyBox */ $('#link').on('click', function(e) { e.preventDefault(); $.fancybox({ 'autoScale' : false, 'autoSize' : false, 'autoDimensions': false, 'titleShow' : false, 'padding' : 0, 'overlayOpacity': '.8', 'overlayColor': '#333', 'transitionIn': 'none', 'transitionOut': 'none', 'centerOnScroll': true, 'showCloseButton': true, 'closeBtn' : true, 'scrolling' : true, 'height': 'auto', 'width': 120, 'minHeight' : 160, 'minWidth' : 10, 'maxWidth' : 780, 'type':'ajax', 'href' : 'url/something.html', helpers : { overlay : {closeClick: false} }, 'beforeShow' : function(){ var closer = $('button.buttonCTW'); closer.on('click', function() { $.fancybox.close(); }); $.fancybox.update(); }, }); });
has answer: http://stackoverflow.com/a/25186879
type: Question
answer count: 2

http://stackoverflow.com/comment/39243916
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25199573
has text: I thought any fast solution would be useful as he didn't specify

http://stackoverflow.com/q/25070962
score: 0
has title: JS: Why is ~10 (binary, ~1010) = -11 (binary, -1011)?
answer count: 1
tagged with: binary
has body: In Javascript, if I do the bitwise NOT operation on the decimal integer 10: ~10 I expect it to compute bitwise NOT on the binary integer as follows: ~1010 = 0101 In otherwords, I expected decimal integer 5. Instead, the operation gives me -11. (try it in your console) ~10 = -11 If I check that more explicitly by looking at -11 and ~10 as binary integer strings: parseInt(~10,10).toString(2) "-1011" parseInt(-11,10).toString(2) "-1011" Consistent. But I don't understand. Can anyone explain to me why? I'm guessing that it is something to do with the sign. EDIT: I found this question after posting, it also helped me understand this phenomena much better.
tagged with: signed
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/12337360
tagged with: twos-complement
accepted answer: http://stackoverflow.com/a/25070987
tagged with: bitwise-operators
type: Question
has answer: http://stackoverflow.com/a/25070987
tagged with: javascript

http://stackoverflow.com/q/25108097
tagged with: node.js
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39073634
type: Question
has answer: http://stackoverflow.com/a/25108161
downvote count: 0
tagged with: javascript
has body: Suppose i have a form which asks for username only and has a button called login. The URL for the current scenario is localhost:8080/beforelogin . Once I click on login, the form redirects to localhost:8080/loginsuccess . I have to show the message WELCOME USER (the username was entered on localhost:8080/beforelogin) . I can fetch username but because of the page refresh (redirect to different URL), I cannot show it on different URL. My code on client side $('.login').on('click', function() // login is class of button Login { document.location.href = "/loginsuccess"; var username=$('.username_entered').val()); // username_entered is class username entered before login. $('.user-name-to-publish').html(username); // user-name-to-publish is the class where i have to publish username entered before login }); I can explain more if I am not clear.
answer count: 1
has title: Retrieve form value after redirecting to different URL in node.js
accepted answer: http://stackoverflow.com/a/25108161
favorite count: 0
upvote count: 1

http://stackoverflow.com/q/25116219
tagged with: jquery-knob
has title: data-step attribute not working in jquery knob
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25116426
type: Question
tagged with: javascript
has body: How to change data-step attribute in jQuery knob. I have tried data-step="25" in input html tag, but it's not working. Here is the jsfiddle http://jsfiddle.net/vishnur15/6SH5t/
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25116426
tagged with: jquery

http://stackoverflow.com/a/25154561
upvote count: 3
answers question: http://stackoverflow.com/q/25154538
score: 3
has comment: http://stackoverflow.com/comment/39160414
has body: If $content was a DOM node, then the way you are doing it would be fine. However, it appears to be a jQuery object, so you use the CSS method instead. $content.css("font-size", "14px"); You also appear to be changing the CSS of $content but the text of $head, so you need to change the CSS for the element that contains the text you are trying to modify. $head.css("font-size", "14px");
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25154538
type: Answer
has comment: http://stackoverflow.com/comment/39160183
has comment: http://stackoverflow.com/comment/39159829

http://stackoverflow.com/q/25172861
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25174760
accepted answer: http://stackoverflow.com/a/25174760
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: character-encoding
answer count: 1
downvote count: 0
has title: Escape with Unicode Code Points similar to PHP in Javascript
tagged with: unicode
favorite count: 0
has comment: http://stackoverflow.com/comment/39194400
has body: When using PHP to generate JSON, it encodes higher characters using the ģ code-point notation. (I know this not necessary, but for unnamed reasons I want that.) I am trying to achieve the same in JavaScript. I searched high and low and found nothing. The encodeUri function does nothing for me (even though many suggested that it would). Any helpful hints? I hope that I do not have to use some big external library but rather something build-in or a few lines of nice code - this can not be this hard, can it...?! I have an input string in the form of: var stringVar = 'Hällö Würld.'; My desired conversion would give me something like: var resultStringVar = 'Hällö Würld.';

http://stackoverflow.com/q/25084008
has comment: http://stackoverflow.com/comment/39028715
has comment: http://stackoverflow.com/comment/39028592
has comment: http://stackoverflow.com/comment/39028644
has comment: http://stackoverflow.com/comment/39028999
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39029114
has body: I want to populate the contents of #city div dynamically from $.each() function that loops through an Json object (result). How can I get all the elements from the object an put them in the #city div? What is the best way to create and replace html elements in this situation? (from am each function) My code: &lt;div id="city"&gt;&lt;/div&gt; $.ajax({ url: "/Home/GetCity", type: "GET", data: { county: County} }) .done(function (result) { $.each(result, function (index, value) { console.log(this.CityName); //here it returns all the elements $('#city').html("&lt;h4&gt;" + this.CityName+ "&lt;/h4&gt;"); //here it return only the first one }); });
has comment: http://stackoverflow.com/comment/39029252
has comment: http://stackoverflow.com/comment/39028573
tagged with: each
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25084033
has comment: http://stackoverflow.com/comment/39028765
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39029351
downvote count: 1
accepted answer: http://stackoverflow.com/a/25084033
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/39028609
tagged with: javascript
tagged with: jquery
score: -1
has title: jQuery $.each() returns only the first element from a Json object
tagged with: ajax

http://stackoverflow.com/q/25121964
has body: Which one do you prefer and what are pros &amp; cons one over another ?. Personally i found singleton hard to read and maintain, a lot of context changes(this), always ends with caching right context through var self = this (or some proxy like $.proxy) + i will always have one global variable(singleton), while in second approach i can avoid creating global variable if module doesn't need to expose any API. Simple example: (User click on "add to cart", some ajax get triggered and on success html(notification) is created) Html &lt;div class="cart"&gt; &lt;a href="#" data-product-id="200"&gt; Add to cart &lt;/a&gt; &lt;/div&gt; Module pattern Not truly module pattern by definition, because i'm not returning anything from it, click handler can access outer scope via closure. ;(function(window, $, undefined) { function constructHtml(data) {...} function addToCart(product_id, quantity) { ... $.ajax({ ... success: function(data) { constructHtml(data); } }); } $(function() { var $addBtn = $('div.cart a'); var productId = $addBtn.data('product-id'); $addBtn.click(function(e) { e.preventDefault(); addToCart(productId); }); }); })(this, jQuery); Singleton - Object literal(same example) var Cart = { settings: { $addBtn: $('div.cart a'), productId: $('div.cart a').data('product-id') }, init: function() { this.bindUiActions(); }, bindUiActions: function() { var self = this; this.settings.$addBtn.click(function(e) { e.preventDefault(); self.addToCart(self.settings.productId); }); }, addToCart: function(product_id, quantity) { ... var self = this; $.ajax({ ... success: function(data) { self.constructHtml(data); } }); }, constructHtml: function(data) {...} }; Cart.init();
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25123822
score: 1
has comment: http://stackoverflow.com/comment/39101482
type: Question
answer count: 2
upvote count: 1
has title: Singleton through object literal versus module pattern, code organization pros&cons
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/38033350
has answer: http://stackoverflow.com/a/38033350
has comment: http://stackoverflow.com/comment/39101564
downvote count: 0
accepted answer: http://stackoverflow.com/a/25123822

http://stackoverflow.com/comment/39226071
type: QuestionComment
has text: this code actually works for me... I just had to put some text in the `` to have something to click on.
score: 0
comment on: http://stackoverflow.com/q/25189891
type: Comment

http://stackoverflow.com/q/25225575
has title: jQuery function in time interval
has comment: http://stackoverflow.com/comment/39292220
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25225651
tagged with: css
has comment: http://stackoverflow.com/comment/39292099
has body: I am using this jQuery code to animate two div's and and when the page load the divs are already there .Then it start the animation. How do I hide the div when the page load and start this animation after few seconds one after the other. Here is the process that I am expecting (page load -> after few seconds -> #float img load -> after few seconds- >#floatbubble load) &lt;script&gt; $(function(){ var effect_selector = "#float img"; $(effect_selector).height(0); $(effect_selector).width(0); $(effect_selector).animate({ width: 125, height : 125 },"slow",function(){ $(effect_selector).removeAttr("style"); //Another effect var effect_selector = "#floatbubble"; $(effect_selector).height(0); $(effect_selector).width(0); $(effect_selector).animate({ width: 125, height : 125 },"slow",function(){ $(effect_selector).removeAttr("style"); }); }); }); &lt;/script&gt; Jsfiddle DEMO
type: Question
type: AnsweredQuestion
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25225615
has answer: http://stackoverflow.com/a/25225651
score: 0
has answer: http://stackoverflow.com/a/25225615
answer count: 2
tagged with: jquery

http://stackoverflow.com/a/25149191
type: Answer
answers question: http://stackoverflow.com/q/25149114
score: 0
has body: Assignment "returns" the value assigned. Returning any kind of value from a javascript: link indicates to the browser that it should replace the document with that value. Usually you might see javascript:void(stuff goes here) to suppress the return value. You already seem to be aware of why you shouldn't do this, though. onClick event handler is a step in the right direction, but really it should be attached externally.

http://stackoverflow.com/q/25209749
downvote count: 0
answer count: 1
favorite count: 0
has body: I add an y axis to a chart and it looks as simple as this one: I want to add a top value tick that will be on the same vertical position as the biggest bar of the chart, now it's blue bar on the very left of the chart. Is there a standard way to set axis option to make it put that cap tick so that not to add it manually? As an alternative, it can be next step in ticks, so for this chart it can be $700k value.
type: AnsweredQuestion
tagged with: d3.js
score: 1
upvote count: 1
type: Question
tagged with: charts
has answer: http://stackoverflow.com/a/25210392
accepted answer: http://stackoverflow.com/a/25210392
tagged with: javascript
has title: How to make axis have a top tick

http://stackoverflow.com/comment/39154455
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25151288
has text: It doesn't matter which the other classes are. You can do class="class1 class2 hello permission-check class3 ok" and it will still work. The only thing that you need to perform the check is that the element has got the class permission-check.
score: 0

http://stackoverflow.com/a/25140534
has body: You should change your map-canvas width and height values from fixed (px) to dynamic (%), because now, even though the window changes in dimensions, your div keeps its fixed size. You also need to change the html and body elements' width to 100% .
has comment: http://stackoverflow.com/comment/39134041
accepted answer of: http://stackoverflow.com/q/25140180
has comment: http://stackoverflow.com/comment/39134429
has comment: http://stackoverflow.com/comment/39133977
answers question: http://stackoverflow.com/q/25140180
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39133698

http://stackoverflow.com/q/25169493
tagged with: http://stackoverflow.com/tag/svg
has answer: http://stackoverflow.com/a/25169652
type: UnansweredQuestion
tagged with: physics
tagged with: animation
downvote count: 0
score: 1
tagged with: raphael
type: Question
has title: Animate spinning wheel with cubic-bezier in Raphael.js
tagged with: javascript
upvote count: 1
answer count: 1
has body: I've constructed a "wheel of fortune" using Raphael.js and now wish to animate this wheel to some arbitrary degree of rotation. I perform this animation using Raphael.js's animate function: degrees += 360; var duration = 1000; wheel.animate({transform:"r"+degrees+" 250 250"},duration,"cubic-bezier(0,0,1,1)",null); In this snippet I've specified a constant duration and a linear cubic-bezier which is nothing like the real spin of a wheel. Given some change in rotation how can I best animate this change so as to model the physics of a wheel being spun and then friction bringing the wheel to a stop at the final degree of rotation?
favorite count: 0

http://stackoverflow.com/comment/39139455
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25124399
type: AnswerComment
has text: @Brunis If you have a better solution, new answers are always welcome.

http://stackoverflow.com/comment/39081828
has text: you need to put `success` inside the `$.ajax({..})`
type: AnswerComment
comment on: http://stackoverflow.com/a/25112619
score: 0
type: Comment

http://stackoverflow.com/comment/39080497
comment on: http://stackoverflow.com/a/25111621
type: AnswerComment
score: 0
type: Comment
has text: no this is array foreach so it can't return the value of the object to get the object you have to do `obj[key]`.

http://stackoverflow.com/a/41544776
answers question: http://stackoverflow.com/q/25071718
type: Answer
has body: Late with the answer, but if you're after writing plain JS code (without jQuery or other frameworks), I've found that there's the deploader.js repo, which you can use to wrap any kind of JS into modules and do dependency loading. May worth checking out.
has comment: http://stackoverflow.com/comment/134897916
score: 0

http://stackoverflow.com/comment/39144562
comment on: http://stackoverflow.com/q/25145924
type: Comment
type: QuestionComment
has text: The language of your post is a little confusing, I believe what you want to do is configure `msgText` to be 'loading more posts' and `finishedMsg` to be 'all posts loaded'
score: 0

http://stackoverflow.com/comment/39169616
comment on: http://stackoverflow.com/a/25157646
type: AnswerComment
has text: No need to be sorry :) Thanks a lot for your comments!
score: 0
type: Comment

http://stackoverflow.com/q/25227901
upvote count: 1
downvote count: 1
type: Question
has title: json object split into two json objects
has answer: http://stackoverflow.com/a/25228005
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25227948
score: 0
has answer: http://stackoverflow.com/a/25227948
favorite count: 0
has answer: http://stackoverflow.com/a/25227956
accepted answer: http://stackoverflow.com/a/25228005
has answer: http://stackoverflow.com/a/25228192
has body: I have this JSON Object {1: "test projekt", 4: "Second Project", 5: "Third Project", 6: "Fourth Project", 7: "5th one", 8: "6th one dude", uhash: "7021a11332508b6e30d3b6d3e95180398228b0e4010fc3f05db81e80"} i want to split it into: {1: "test projekt", 4: "Second Project", 5: "Third Project", 6: "Fourth Project", 7: "5th one", 8: "6th one dude"} and {uhash: "7021a11332508b6e30d3b6d3e95180398228b0e4010fc3f05db81e80"} how can I do it in js?
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/39019455
type: QuestionComment
comment on: http://stackoverflow.com/q/25078689
type: Comment
has text: opacity is supported in all IE Versions http://caniuse.com/css-opacity
score: 0

http://stackoverflow.com/a/25190980
has body: Maybe I'm looking at this wrong, but it seems that you are assigning this object to model.items { fieldCodes: { items: [ { id: XXX name: CCC value: DD comment: AA }, { id: aaaa name: aaaaadd value: ddf comment: ee }] } } Wouldn't you instead want model = data.fieldCodes; to be able to use fieldCodes.items?
score: 0
has comment: http://stackoverflow.com/comment/39230830
type: Answer
answers question: http://stackoverflow.com/q/25189237
has comment: http://stackoverflow.com/comment/39228614

http://stackoverflow.com/comment/39096416
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25120435
type: Comment
has text: I tried inArray, http://stackoverflow.com/questions/5424488/javascript-search-for-a-string-inside-an-array-of-strings , and http://stackoverflow.com/questions/6116474/how-to-find-if-an-array-contains-a-specific-string-in-javascript-jquery

http://stackoverflow.com/q/25130595
favorite count: 0
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25130721
has title: Clear the ng-model asssociated to textarea inside Angular Bootstrap UI tabset form an outside button
type: Question
tagged with: angularjs-directive
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25132018
tagged with: angular-ui-bootstrap
upvote count: 2
answer count: 2
has body: I have used angular bootstrap ui tabset to create two tabs and both of the tabs have textareas associated with a ng-model, i have a clear button outside the tabset and i want to clear the ng-model of the textArea in active tab when user presses the clear button. what is the best way to do this? this is what i have done so far. HTML Clear Controller .controller('myController', ['$scope', function ($scope) { $scope.data = { tabOne: '', tabTwo: '' }; $scope.ClearFn = function () { // I want to clear the model of the active tabs textArea here. }; }]);
possible better answer: http://stackoverflow.com/a/25130721
has answer: http://stackoverflow.com/a/25132018

html5-canvas
tags question: http://stackoverflow.com/q/25129326
tags question: http://stackoverflow.com/q/25102650
tags question: http://stackoverflow.com/q/25184464
tags question: http://stackoverflow.com/q/25099230
tags question: http://stackoverflow.com/q/25089229
tags question: http://stackoverflow.com/q/25139471
tags question: http://stackoverflow.com/q/25183808
tags question: http://stackoverflow.com/q/25132685
tags question: http://stackoverflow.com/q/25215141
tags question: http://stackoverflow.com/q/25129081
tag name: html5-canvas
tags question: http://stackoverflow.com/q/25141513
tags question: http://stackoverflow.com/q/25172693
type: Tag
tags question: http://stackoverflow.com/q/25169235
tags question: http://stackoverflow.com/q/25139515

http://stackoverflow.com/q/25175317
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25175433
tagged with: jquery
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25175551
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25175551
score: 0
accepted answer: http://stackoverflow.com/a/25175433
type: Question
tagged with: angularjs-directive
has body: can you please tell me why my row is not deleted.I I make a demo in which I added the student name .I am able to add the student name .Now I have two issue I am not able to delete row and Edit.can you please tell where i am wrong ? here is my demo http://plnkr.co/edit/1lem6t4h7b6Eefsz32t6?p=preview app.controller("studentcntr",['$scope',function(scope){ scope.studentDetail=[]; scope.addStudent=function(){ bootbox.prompt("Enter Name!",function(res){ console.log(res); if(res==null){ }else { scope.studentDetail.push({ name: res }); } scope.$digest(); }); }; scope.editRowName=function (name) { // body... // alert(name); setTimeout(function() { $('.bootbox-input').val(name); }, 10); } scope.deleteRow=function (id) { // body... alert('s'+id) $('#'+id).remove(); } }]) I am able to delete row .But problem is that when I remove row and add new name it create again delete row why ? why it is now delete permanently
has title: Why row is not deleted in angular?

http://stackoverflow.com/comment/39175322
type: AnswerComment
comment on: http://stackoverflow.com/a/25144985
type: Comment
has text: @Jay you'll have to update your original question to include the details if the problem.
score: 0

http://stackoverflow.com/a/33901453
type: Answer
answers question: http://stackoverflow.com/q/25122596
score: 0
has body: You are fundamentally correct in that in order to use Angular.js dependency injection, you have to inject a lot of services into the controller. This is unavoidable in a framework that uses constructor dependency injection. However, in your example you can factor out several of the services you are injecting. Some of them will still have an alternate that you will have to inject, but the alternate can factor out repeated code. While you are still injecting a lot of services, you will reduce the amount of boilerplate code you have to write. Services $scope If you use controllerAs syntax, you can simply put your properties on the controller and reference the controller within you templates. Todd Motto has a pretty good explanation of how it works. John Papa recommends using this feature in his style guide. $http As a general rule, you shouldn't use $http directly in your controller. Instead, create a service to abstract the call to $http. It looks like the Post service may already be doing this. John Papa's style guide has a great explanation of the benefits of using a data service. $modal This can be also be abstracted to different services (e.g. a ConfirmModalService). This can be helpful to factor out code. For example if you are using $timeout for some confirmation modal purpose, you can just use it in your confirmation modal service and not in the template. As for the modalHtml, you can keep the html for the modal in that service as a property or save it in a html file and use templateUrl when instantiating the modal. Other style notes If you want to simplify your controller more, you move some of the service (even the data service and modal abstractions I referenced above) into a separate service to abstract user interactions. There is really a lot of flexibility in how you organize your code. I noticed that you were also using the global window object. This can be hard to mock when doing testing so the suggested style is to inject the angular $window service (I…

http://stackoverflow.com/q/25195612
upvote count: 2
type: UnansweredQuestion
tagged with: firefox-os
downvote count: 1
score: 1
has body: Is HTML5 data-list supported in Firefox OS? I can see in this MDN article that it is supported in Firefox 4.0 and gecko 2.0 for desktop. And I can see for Mobile too it has the exact same settings. But I cannot get this to work in Firefox OS simulator 1.3 (stable). So is it supported or I am doing something stupidly wrong (very much possible).
type: Question
tagged with: firefox
answer count: 1
has title: Is HTML5 Datalist element supported in FirefoxOS?
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25195687
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39300826
has text: The issue is you are treating objects in your json as arrays, when they are not.
score: 0
comment on: http://stackoverflow.com/q/25229368
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39221793
type: QuestionComment
has text: Well that's weird. The only thing I can imagine is that the code isn't running such that it's modifying the global context, but I don't understand how that's possible. As an experiment, you could try changing the function declaration to `window.closePopup = function() { alert(''); };` to explicitly create a global function. I am puzzled as to why that would be necessary however.
comment on: http://stackoverflow.com/q/25187239
score: 0
type: Comment

http://stackoverflow.com/comment/39139696
has text: I finally understood the problem. You should move the code to the control's `PreRender` event. Will you test it till I return from the barber's?
comment on: http://stackoverflow.com/a/25140277
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25159250
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25162691
has title: onChange does not work for DateTimePicker in Struts 2
has comment: http://stackoverflow.com/comment/39169014
has body: I have the following piece of code : <sx:datetimepicker name="dateOfBirth" id="dateOfBirth" displayWeeks="5" displayFormat="dd/MM/yyyy" onchange="test()"/> But, for this the onChange event does not work, although I have a simple JavaScript ipt function like this: Note: I read somewhere that it is a bug in Struts 2 that the onChange event doesn't work for <sx:DateTimePicker>. However, I am not sure about it. Is there any workaround discovered for it?
type: Question
tagged with: javascript
tagged with: jquery
tagged with: struts2
tagged with: struts2-jquery
score: 0

http://stackoverflow.com/a/56025841
upvote count: 29
downvote count: 2
has body: This is an extremely old question, but here are the approaches I personally use ... Get Standard/Base URL As many have already stated, this works for most situations. var url = window.location.origin; Get Absolute Base URL However, this simple approach can be used to strip off any port numbers. var url = "http://" + location.host.split(":")[0]; Edit: To address the concern, posed by Jason Rice, the following can be used to automatically insert the correct protocol type ... var url = window.location.protocol + "//" + location.host.split(":")[0]; Set Base URL As a bonus -- the base URL can then be redefined globally. document.head.innerHTML = document.head.innerHTML + "&lt;base href='" + url + "' /&gt;";
score: 27
answers question: http://stackoverflow.com/q/25203124
type: Answer
has comment: http://stackoverflow.com/comment/103700922

http://stackoverflow.com/a/25218099
score: 0
upvote count: 1
downvote count: 1
has body: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html (look up 406) In your response you have: Content-Type:text/html; charset=iso-8859-1 In your request: Accept:application/json, text/javascript, */*; q=0.01 My guess is you have to set Accept. If you're not using jQuery (not tagged with it) then here is how you can do it with vanilla JS: xmlhttp.setRequestHeader("Accept" , "text/html"); You should try to open the url in a browser, since you need to post values to it to see if it works correctly you can create a html file with a form method=post action=your godaddy site.
answers question: http://stackoverflow.com/q/25217469
type: Answer

http://stackoverflow.com/q/25186537
has title: Google Maps Not Displaying - Weird Errors
tagged with: javascript
has body: I am writing an app that has Google Maps in it. All the code appears to be correct but the map simply does not show up. I get these two errors: Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'plnkr_dirty_exit' exceeded the quota. and Uncaught SyntaxError: Unexpected token { Here is a plnkr of my work: http://plnkr.co/edit/AiVc6nccqke8Jluonpxl?p=preview Here is the code that pertains to Google Maps: app.js (function() { angular.module("siteLookUpApplication", ["ngRoute"]); angular.module("siteLookUpApplication").config(function($routeProvider) { $routeProvider .when("/search", { templateUrl: "search.html", controller: "searchController" }) .when("/map/:locationName/:locationCoords", { templateUrl: "map.html", controller: "mapController" }) .otherwise({ redirectTo: '/search' }); }); }()); index.html Site ID Site Finder map.html Back To Search Map for {{locationName}} map-controller.js (function() { function mapController($scope, $routeParams) { $scope.locationCoords = $routeParams.locationCoords; $scope.locationName = $routeParams.locationName; function initialize() { var center = new google.maps.LatLng($scope.locationCoords); var mapOptions = { center: center, zoom: 5 }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); } google.maps.event.addDomListener(window, 'load', initialize); } angular.module("siteLookUpApplication").controller("mapController", mapController); }()); I thought the problem was that initialize(); was not being called but I believe it is called when the page loads here google.maps.event.addDomListener(window, 'load', initialize); inside map-controller.js I have also tried using ng-init and onLoad to initialize the map I have had this issue for a while now and i'm all out of ideas. Can anyone tell me why it won't work? Thanks in advance. P.S. Would you consider using AngularUI for this?
tagged with: google-maps-api-3
type: Question
score: 0
tagged with: google-maps
tagged with: jquery
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39219860
has comment: http://stackoverflow.com/comment/39219754
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/q/25191855
has comment: http://stackoverflow.com/comment/39229443
has answer: http://stackoverflow.com/a/25192322
type: AnsweredQuestion
tagged with: performance
has answer: http://stackoverflow.com/a/25191943
has comment: http://stackoverflow.com/comment/39229531
has answer: http://stackoverflow.com/a/25192025
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/25191943
downvote count: 2
has comment: http://stackoverflow.com/comment/39229329
has title: Is there a difference in performance when having code in a tag or from a .js file?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39229370
has comment: http://stackoverflow.com/comment/39229406
has body: I have a few hundred lines of javascript code that is only going to be used on a single page. However, I am unsure if I should put the code into an external .js file or keep it in a tag. I believe the script tag would have to load before the rest of the page could load, but the .js file would have to load side by side with the html and could become slower in the long run. I understand the performance difference between the two options are close to negligible (down to milliseconds with a good network connection), but I would really like to know if there is and which one would be faster. When I say 'faster', I am talking about the page download speed, how long it takes before the code actually runs, if there could be an impact on the speed of code as it start running, or if there is any other delay that I am not aware of. Also, I have my code wrapped in a jquery $(document).ready() I believe that would have an impact on when the code would start running in this situation. Thanks
has answer: http://stackoverflow.com/a/25191968
score: 0
has comment: http://stackoverflow.com/comment/39229419
tagged with: http://stackoverflow.com/tag/html
answer count: 4
favorite count: 0
accepted answer: http://stackoverflow.com/a/25192322
has comment: http://stackoverflow.com/comment/39229460
has comment: http://stackoverflow.com/comment/39229506
has comment: http://stackoverflow.com/comment/39229536

http://stackoverflow.com/comment/39301223
type: Comment
comment on: http://stackoverflow.com/a/25229915
score: 0
type: AnswerComment
has text: Yes it would be my first source just funny that we both did :)

http://stackoverflow.com/comment/39054182
type: Comment
comment on: http://stackoverflow.com/a/25097620
has text: @adeneo I tried your 2nd answer but it still clears all inside of input field and inputs '@marry':(
score: 0
type: AnswerComment

http://stackoverflow.com/q/25177463
possible better answer: http://stackoverflow.com/a/25177664
has answer: http://stackoverflow.com/a/25177664
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39202247
accepted answer: http://stackoverflow.com/a/25177758
has body: I have some jquery which is used after a postback to the page on which i take a value that was set in a hidden field and find the div corresponding to that value. I then do some css class changes on the div and its contents. I have similar code for the click event of this but need this to work on page startup. Here is my fiddle: http://jsfiddle.net/amwz/vks4n5bo/ and the jquery I am using: $(document).ready(function () { var currPackage = $("#HF_Package").val(); $("#" + currPackage).closest('.radio-group-row').find('.package-title').removeClass('highlight'); $("#" + currPackage).closest('.radio-group-row').find('.package-footer').removeClass('highlight'); $("#" + currPackage).find('input:radio').prop('checked', true); $("#" + currPackage).find('.package-title').addClass('highlight'); $("#" + currPackage).find('.package-footer').addClass('highlight'); }); EDIT___ Error: Syntax error, unrecognized expression: #E/CS/PSTN_P1 The console in the fiddle gives me this error, although my jquery is valid no?
type: Question
has title: Jquery not running on page load
has comment: http://stackoverflow.com/comment/39202279
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39202064
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39202151
has comment: http://stackoverflow.com/comment/39202164
linked to: http://stackoverflow.com/q/70579
tagged with: asp.net
has answer: http://stackoverflow.com/a/25177758
has comment: http://stackoverflow.com/comment/39202191

http://stackoverflow.com/q/25128513
has body: I am trying to upload and delete pictures in my app but sometime when I delete my pictures it keeps replacing it with an img with height and width of 0. I was wondering if there was a way to use jQuery to target all imgs with 0x0 dimensions and remove them only.
tagged with: jquery
has comment: http://stackoverflow.com/comment/39112219
favorite count: 0
type: UnansweredQuestion
score: -3
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
has answer: http://stackoverflow.com/a/25128549
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39127722
has title: Is there a way to target all img tags with 0x0 size and remove them in jQuery?
has comment: http://stackoverflow.com/comment/39191667
answer count: 2
downvote count: 3
has answer: http://stackoverflow.com/a/25128548

http://stackoverflow.com/q/25144008
tagged with: twitter-bootstrap
type: UnansweredQuestion
has title: Bootstrap 3 carousel showing blank slide at the end
has answer: http://stackoverflow.com/a/25144990
tagged with: css
has body: This is interesting. I have a carousel on the homepage and a carousel on an internal page. Both codes are exactly the same, but for some reason, the internal page carousel shows a blank slide at the end, then goes to a height of 10px and starts the slideshow over (at 10px still). The homepage carousel works perfectly. Here is the code for both of the carousels I thought that maybe it was a conflicting "ID" error, so I changed the ID on the internal page carousel and it did nothing. Homepage template code: <?php /* Template Name: Homepage */ ?> <?php get_header(); ?> <?php if (is_front_page() ) { ?> <?php } else { } ?> test test test <?php get_footer(); ?> Internal page code: <?php get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (!is_front_page() ) { ?> <?php the_title() ;?> <?php } else {} ?> <?php the_content(); ?> <?php endwhile; else: ?> Sorry, this page does not exist <?php endif; ?> <?php get_footer(); ?> Thank you!
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39141585
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39140385
favorite count: 0

http://stackoverflow.com/q/25107198
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39071942
has comment: http://stackoverflow.com/comment/39071740
tagged with: image
type: Question
tagged with: javascript
has title: check image width from its source and not from its size on the page - javascript
tagged with: jquery
has body: i have user submitted content on my website that contains image tags. I have used this: &lt;script type="text/javascript"&gt; $(document).ready(function () { // check each image in the .blogtest divs for their width. If its less than X make it full size, if not its poor and keep it normal function resize() { var box = $(".blogtest"); box.find("img.buildimage").on('load', function () { var img = $(this), width = img.width(); if (width &gt;= 650) { img.addClass("buildimage-large"); } else if (width &lt; 500 &amp;&amp; width &gt; 101) { img.addClass("buildimage-small"); } // if image is less than X, its most likely a smiley else if (width &lt; 100) { img.addClass("buildimage-smiley"); } }).filter(function () { //if the image is already loaded manually trigger the event return this.complete; }).trigger('load'); } resize(); }); &lt;/script&gt; Which assigns a different class to each image depending on its size. This works fine, however if the user is on a ipad / small screen size and the .blogtest div is less than the defined size, it always get put as a small image. What i wanted to do was the check the image width from its source so that no matter what the screen size, i can always assign the best class. Thanks. Craig.
linked to: http://stackoverflow.com/q/1944280
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0

http://stackoverflow.com/comment/39173070
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25161751
has text: ok you said that your ajax is being executed (checkek with firebug). But, does it return any data? in proper format? Also, is it possible you get an undefined error on your myheader = lnkClicked.closest('th'); ?

http://stackoverflow.com/comment/39254924
has text: This seems to be an issue with `angular-strap`. Have you tried posting an issue on github ?
type: QuestionComment
comment on: http://stackoverflow.com/q/25192309
score: 0
type: Comment

http://stackoverflow.com/a/25216616
has body: There is a typo where you use $pristine, the myform should be myfrm like you set in ng-form: Please enter a valid email To show different messages for invalid email and empty email, you could use $error instead of $invalid like this: Please enter a valid email Please enter the email Example Plunker: http://plnkr.co/edit/eD4OZ8nqETBACpSMQ7Tm?p=preview
downvote count: 0
has comment: http://stackoverflow.com/comment/39275980
answers question: http://stackoverflow.com/q/25212991
score: 1
has comment: http://stackoverflow.com/comment/39275857
has comment: http://stackoverflow.com/comment/39276096
has comment: http://stackoverflow.com/comment/39275962
has comment: http://stackoverflow.com/comment/39276509
upvote count: 1
has comment: http://stackoverflow.com/comment/39275791
type: Answer

http://stackoverflow.com/comment/39084927
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25114302
score: 0
has text: what do you mean by "object"?

http://stackoverflow.com/comment/39170874
has text: @JavaScripter because `find()` returns a jQuery object even if only one element is matched. [`get()`](http://api.jquery.com/get/) returns the list of native DOM elements corresponding to the jQuery object and we want the first one (index `[0]`). You can also use `.get(0)` if you prefer. I remember reading somewhere that it's about 1 nanosecond slower though. Pick whichever you think is more readable :)
comment on: http://stackoverflow.com/a/25142745
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25177646
score: 1
has comment: http://stackoverflow.com/comment/39229508
upvote count: 1
type: AcceptedAnswer
has body: The thing that changes when you .sort() the selection (of rect elements in this case) is the index of each element. The data does not change. The example you've linked to uses the index of the respective element to determine the x position of the bars after sorting and during redrawing. Hence, the positions of the bars change. In your code, you're not using the index of the bars to determine their position at all. You're using the data bound to the elements, which does not change when sorting. Your general approach is different from the one taken in the example you've linked to. There, the data itself is sorted (or rather the selection) and its order matters for the positions of the bars. In what you're doing, the order of the data does not matter because you're only using the data itself. So to make the sorting have any effect, change your code to use the index to determine the position of the bars: svg.selectAll("rect") .sort(function(a, b) { if (sortOrder) { return d3.ascending(a.Ratio, b.Ratio); } else { return d3.descending(a.Ratio, b.Ratio); } }) .transition() .delay(function(d, i) { return i * 50; }) .duration(1000) .attr("x", function(d, i) { return i * x.rangeBand(); });
has comment: http://stackoverflow.com/comment/39221542
accepted answer of: http://stackoverflow.com/q/25175299
type: Answer
answers question: http://stackoverflow.com/q/25175299
downvote count: 0

imageurl
tags question: http://stackoverflow.com/q/25222756
type: Tag
tag name: imageurl

http://stackoverflow.com/a/25080464
answers question: http://stackoverflow.com/q/25079411
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25079411
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39021759
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39022542
has body: You cannot use setTimeout() to call break. Try the following change: notice the spelling of length and that normally you should compare to length - 1 to get the index of last element if (j == (defaultOrder.length-1)) { /*if last box*/ setTimeout((function() { var j_ = j; //keep j during timeout return function() { boxes.eq(j_).removeClass("hovered"); }; })(), 1000); break; } The modification for default case is accordingly: if (i == (defaultOrder.length-1)) { /*if last box*/ setTimeout((function() { var i_ = i; //keep i during timeout return function() { boxes.eq(defaultOrder[i_]).removeClass("hovered"); }; })(), 1000); break; }
has comment: http://stackoverflow.com/comment/39021902

http://stackoverflow.com/comment/39184622
type: Comment
comment on: http://stackoverflow.com/a/25167659
score: 0
type: AnswerComment
has text: Ahhh, gotcha. So that means I shouldn't need to check the password - as long as it's of type 'password' it should work

http://stackoverflow.com/a/25146620
type: Answer
has comment: http://stackoverflow.com/comment/39145815
answers question: http://stackoverflow.com/q/25146580
has body: Yes! You can do this: &lt;script type='text/javascript'&gt; $(document).ready(function() { $('#dp1').datepicker({ autoclose: true, format: "yyyy-mm-dd" }); $('#dp2').datepicker({ autoclose: true, format: "yyyy-mm-dd" }); $('#dp3').datepicker({ autoclose: true, format: "yyyy-mm-dd" }); $('#dp4').datepicker({ autoclose: true, format: "yyyy-mm-dd" }); }); &lt;/script&gt;
upvote count: 2
has comment: http://stackoverflow.com/comment/39145305
score: 2
has comment: http://stackoverflow.com/comment/39145919
has comment: http://stackoverflow.com/comment/39145342
downvote count: 0
has comment: http://stackoverflow.com/comment/39145708

http://stackoverflow.com/q/25122596
has answer: http://stackoverflow.com/a/33901453
tagged with: javascript
answer count: 2
upvote count: 1
favorite count: 0
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: I'm new to angular. I've included angular-ui so I can have bootstrap modals to add data. Seems like i'd have to put all these functions EVERY controller that I wanted to have a modal in...seems kinda dumb to do it like that though. Is there a way to make this thing more reusable? lassoControllers.controller('PostsController', ['$scope', '$timeout', '$http', 'Post', '$modal', function($scope, $timeout, $http, Post, $modal) { $scope.posts = Post.query(); $scope.askDelete = function(item) { var message = "Are you sure ?"; var modalHtml = ' ' + message + ' '; modalHtml += ' OK Cancel '; var modalInstance = $modal.open({ template: modalHtml, controller: 'ModalInstanceCtrl' }); modalInstance.result.then(function() { reallyDelete(item); }); }; var reallyDelete = function(item) { $scope.items = window._.remove($scope.items, function(elem) { return elem != item; }); }; }]);
has answer: http://stackoverflow.com/a/25123597
downvote count: 0
score: 1
has title: How to clean up angular ui controllers
has comment: http://stackoverflow.com/comment/39100803
type: Question
has comment: http://stackoverflow.com/comment/39101399

http://stackoverflow.com/a/25175248
has comment: http://stackoverflow.com/comment/39198261
has comment: http://stackoverflow.com/comment/39198303
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39231340
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39200193
has body: You need to use a tick function to update your canvas. You can use requestAnimationFrame() and choose a time interval you'd like to animate on (you can determine this using Date.now()). Then, keep a list of your bars and change their height. Then re-render it to your canvas. Here is some quick hacky code... var width = 8; var distance = 3; var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.canvas.width = window.innerWidth; var total = ctx.canvas.width; var max = total / 2 + 52; var min = total / 2 - 60; ctx.fillStyle = "black"; ctx.globalAlpha = 0.3; var lastDrawTime = Date.now(); var draw = function () { if (Date.now() - lastDrawTime &lt; 60) { return webkitRequestAnimationFrame(draw); } ctx.clearRect(0, 0, c.width, c.height); for (var x = 0; x &lt; total; x += 12) { if (x &lt;= max &amp;&amp; x &gt;= min) { var height = Math.floor(Math.random() * 40) + 5; } else { var height = Math.floor(Math.random() * 100) + 5; } ctx.fillRect(x, 100 - height, width, height); } lastDrawTime = Date.now(); webkitRequestAnimationFrame(draw); }; draw();
has comment: http://stackoverflow.com/comment/39198351
answers question: http://stackoverflow.com/q/25175192

http://stackoverflow.com/q/25189394
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39224560
has comment: http://stackoverflow.com/comment/39229686
has body: I understand prototypes can be used to extend properties to their children. However I don't understand why you would want to have a "Object.prototype.property" in the main object constructor class itself? In the Person constructor why Person.prototype.name = "Nicholas"; VS this.name = "Nicholas"; function Person(){ Person.prototype.name = "Nicholas"; Person.prototype.age = 29; Person.prototype.job = "Software Engineer"; }; var person1 = new Person(); var person2 = new Person(); person1.name = "Greg"; alert(person1.name); //"Greg" – from instance alert(person2.name); //"Nicholas" – from prototype
has title: Understanding prototypes used in the object constructor function
has comment: http://stackoverflow.com/comment/44870776
upvote count: 2
answer count: 2
linked to: http://stackoverflow.com/q/16063394
downvote count: 1
linked to: http://stackoverflow.com/q/28255957
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39234197
tagged with: prototype
has comment: http://stackoverflow.com/comment/39229323
has answer: http://stackoverflow.com/a/25194379
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/25194283
has comment: http://stackoverflow.com/comment/39225070

http://stackoverflow.com/a/25099937
has body: Something like this, assuming those letters are strings var arr1 = ['a','c','e'], arr2 = ['b','d','f']; var arr3 = arr1.map(function(item,i) { return item + arr2[i]; }); FIDDLE
score: 2
accepted answer of: http://stackoverflow.com/q/25099913
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39058192
type: Answer
answers question: http://stackoverflow.com/q/25099913
upvote count: 2
has comment: http://stackoverflow.com/comment/39058258

http://stackoverflow.com/a/25078957
has body: You can use separate CSS classes for moving to left and to right instead of one so you can check the current class at a given point of time.. Following is a quick example i made using CSS transitions instead of animations. HTML &lt;div id='boy'&gt;&lt;/div&gt; CSS #boy{ position:absolute; top:0; left:0; width:50px; height:50px; background:red; transition:all 5s; } #boy.right{ left:90%; } jQuery $("#boy").addClass("right"); $("#boy").on("transitionend. webkitTransitionEnd",function(){ $(this).toggleClass('right'); }); $("#boy").on("click",function(){ var position = ($(this).hasClass("right"))?"right":"left"; alert(position); }); Demo Update Same thing using CSS animations (Setup for webkit browsers): Demo You could also use single animation and do fancy mathematic stuff using the elapsedTime property of animationiteration event.
answers question: http://stackoverflow.com/q/25078454
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/39309143
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25225242
type: Comment
has text: Well that might be your problem, make sure that the script is in the page and being executed, after that, you can use the developer's tools to check if a network request to your chat.php is being made every second. In order to do this, check the Network tab: https://i.sstatic.net/fgtIm.png

http://stackoverflow.com/comment/39245529
comment on: http://stackoverflow.com/a/25200650
score: 0
type: Comment
has text: Thanks. Should that just run in its current format if I place it either my external JS file or the head of the page? Or do I need to call it or something?
type: AnswerComment

http://stackoverflow.com/comment/39059095
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25100268
score: 0
has text: can also do `var v; while(v = a.shift()) b.unshift(v);`

http://stackoverflow.com/a/25137951
type: Answer
has body: you are missing val() of jquery . $('#registration_type').val();
score: 0
answers question: http://stackoverflow.com/q/25137798

http://stackoverflow.com/q/25191394
has comment: http://stackoverflow.com/comment/39228907
has comment: http://stackoverflow.com/comment/39228449
type: Question
has comment: http://stackoverflow.com/comment/39228464
tagged with: javascript
tagged with: jquery
has title: How do I drag, drop and scale an image in a div and maintain the same large size?
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25191643
has comment: http://stackoverflow.com/comment/39228706
type: UnansweredQuestion
has body: I've been working on a new project that requires me to drag elements from a div on the left and drop them to a div on the right. When they get to the right side they need to increase in size and stay that way until clicked. The dragging and dropping is working fine, but I can't seem to get the images to keep the new larger size. I tried changing my class with javascript when it's dropped into said div and am currently trying to apply a transition with a duration of 9999s to pull off what I'm looking to do. Is there a better way of doing this? I have to imagine there is. Here's the code I'm working with now. Html &lt;div class="grow" id="div1" ondrop="drop(event)" ondragover="allowDrop(event)"&gt;&lt;/div&gt; &lt;img id="drag1" src="img/mountains.jpg" draggable="true" ondragstart="drag(event)" width="336" height="69"&gt; Javascript function allowDrop(ev){ ev.preventDefault(); } function drag(ev){ ev.dataTransfer.setData("content", ev.target.id); } function drop(ev){ ev.preventDefault(); var image= ev.dataTransfer.getData("content"); ev.target.appendChild(document.getElementById(image)); } CSS #div1 { width:500px; height:200px; padding:10px; border:1px solid #aaaaaa;} /* 2D TRANSITIONS */ /* Grow */ .grow { display: inline-block; -webkit-transition-duration: 0.3s; transition-duration: 0.3s; -webkit-transition-duration: 9999s; -webkit-transition-property: transform; transition-property: transform; transform: translateZ(0); box-shadow: 0 0 1px rgba(0, 0, 0, 0); } .grow:hover, .grow:focus, .grow:active { -webkit-transform: scale(1.1); transform: scale(1.9); }
tagged with: css

http://stackoverflow.com/a/25096780
has body: Try This: $(document).on("click", "#FirstLine", function(){ $('.Liregion2').css("background-color" , "transparent"); });
answers question: http://stackoverflow.com/q/25096728
type: Answer
score: 0

magento
tags question: http://stackoverflow.com/q/25134857
tags question: http://stackoverflow.com/q/25137687
tags question: http://stackoverflow.com/q/25137198
tags question: http://stackoverflow.com/q/25132698
tags question: http://stackoverflow.com/q/25099945
tags question: http://stackoverflow.com/q/25221090
tag name: magento
tags question: http://stackoverflow.com/q/25219799
tags question: http://stackoverflow.com/q/25106452
type: Tag

http://stackoverflow.com/a/25070775
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25070533
downvote count: 0
has body: Can you further explain what the "command arrow" is? If you want something to follow the mouse around that's 2D, one option is to create something like: &lt;div id="mouseHover" style="position: absolute; z-index: 999"&gt;&lt;/div&gt; And then run a script to update the x and y position of the div: &lt;script&gt; &lt;!-- if using a library like jQuery, which has a mousemove event handler --&gt; $('body').mousemove({ document.getElementById('mouseHover').style.left = e.pageX; document.getElementById('mouseHover').style.top = e.pageY; }); &lt;/script&gt; If you really need something to render in 3D that follows the mouse, the issue is simply relative position. You can create a THREE.WebGLRenderTarget with its own scene showing the 3D object on a transparent background, map it to a texture, and apply it to a THREE.PlaneGeometry that hovers in front of the camera. I would provide some code for you, but I would need to know more about your particular setup to do so.
type: Answer

http://stackoverflow.com/comment/39243920
comment on: http://stackoverflow.com/q/25197919
score: 0
has text: @MickyDuncan can you zoom your page so its more easy to read from image?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39274823
comment on: http://stackoverflow.com/a/25209953
type: AnswerComment
score: 0
type: Comment
has text: Okay it works when I do it offline but when I put it online it doesn't work (at http://snapsite.byethost22.com )

http://stackoverflow.com/comment/39088423
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25116118
score: 0
has text: @ chandu how can I fix in my localhost

http://stackoverflow.com/comment/39691620
has text: I try your solution but i get "xpconnect wrapped nsIUR". I need program return original link.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25153329
type: AnswerComment

http://stackoverflow.com/comment/39276974
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25217222
score: 0
has text: Hi; it's not very clear what exactly you're asking. You should post some of your code (see: http://stackoverflow.com/help/mcve); you may also want to rephrase the question to state the problem you're having more clearly.

http://stackoverflow.com/comment/42838023
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25098667
has text: Ok, so it's just going to take more queries of more things and then handling the "joins" in code. Which, now that I think about it, is probably better because it forces you to not use "joins" which you end up having to remove in large scale search pages anyway. It's still pretty funny coming from relational DBs that this is not supported, but I get it.
score: 0

timer
tag name: timer
tags question: http://stackoverflow.com/q/25221893
tags question: http://stackoverflow.com/q/25203571
tags question: http://stackoverflow.com/q/25218296
tags question: http://stackoverflow.com/q/25104224
type: Tag
tags question: http://stackoverflow.com/q/25106099
tags question: http://stackoverflow.com/q/25150896
tags question: http://stackoverflow.com/q/25191569
tags question: http://stackoverflow.com/q/25080159
tags question: http://stackoverflow.com/q/25205839

http://stackoverflow.com/comment/39271695
type: Comment
score: 1
has text: Please modify the demo I shared to show the problems you are having.
comment on: http://stackoverflow.com/a/25193786
type: AnswerComment

http://stackoverflow.com/comment/39112666
type: Comment
type: QuestionComment
has text: Is this a BUG??? Why its not updating the latest version of the now.jpeg?
comment on: http://stackoverflow.com/q/25128762
score: 0

http://stackoverflow.com/q/25206171
favorite count: 0
has body: I have a signup form which is having some 12 fields. I want to validate data in those fields. First step is to check if any field is empty. One way of doing this is to get each field using Jquery and check if it is empty. I was planning to create a var array and check status of each field inside a loop using this code : var input = new Array(); input[0] = $('.fullName')[0]; input[1] = $('.emailID')[1]; input[2] = $('.phno')[2]; input[3] = $('.userName')[3]; input[4] = $('.password')[4]; input[5] = $('.batch')[5]; input[6] = $('.nickname')[6] input[7] = $('.enrno')[7]; input[8] = $('.dob')[8]; input[9] = $('.fromCity')[9]; input[10] = $('.currcity')[10]; input[11] = $('.interests')[11]; input[12] = $('.currComp')[12]; input[13] = $('.currDesig')[13]; Now I have to run a loop to get the values and check if any field is blank. I am writing this code for checking for(i=0;i&lt;14;i++) if(input[i].val()=="") { // do my work } But the problem is that the last 15 lines of code are pointing to actual HTML DOM element, so I can't use input[i].val() directly to access the value. Any way out?
has comment: http://stackoverflow.com/comment/39255863
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39255913
has answer: http://stackoverflow.com/a/25206235
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Validating multiple fields in an HTML form using JS
score: 0
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1

http://stackoverflow.com/comment/39214911
type: Comment
type: QuestionComment
has text: Quite possibly your `.on('dblclick.zoom',null);` is interfering but I'm really just guessing :( - Proxy servers or VPN's are great for getting round those over-restrictive firewalls!
comment on: http://stackoverflow.com/q/25182617
score: 1

http://stackoverflow.com/comment/39293536
has text: well , thats all the code , can u tell me what im doing wrong? https://mauyhasworkspace-c9-mauyhas.c9.io/jobCricle.html
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25226017

http://stackoverflow.com/q/25130301
possible better answer: http://stackoverflow.com/a/25144614
type: AnsweredQuestion
tagged with: google-analytics
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/25144614
has comment: http://stackoverflow.com/comment/39115606
has comment: http://stackoverflow.com/comment/39120056
has answer: http://stackoverflow.com/a/25151131
accepted answer: http://stackoverflow.com/a/25151131
has body: I have a static blog using Jekyll hosted on GitHub. I have set up Google Analytics for it and works well enough. Now I want to show how many people viewed each post in my blog. I found Google Analytics JavaScript API to get the information. But it seems that this API uses OAuth for data access. So I think this might not be the API I needed. Is it possible to do so with Google Analytics? I don't have any server since it's hosted on GitHub.
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39115364
tagged with: javascript
upvote count: 3
tagged with: jekyll
tagged with: github
favorite count: 0
has comment: http://stackoverflow.com/comment/39153739
tagged with: google-analytics-api
has title: Is it possible to show blog view counter with information Google Analytics

http://stackoverflow.com/comment/39144299
score: 0
has text: @blurfus Thanks, I'll do some tinkering along the lines of what you suggested. Google gives me similar numbers but I'd like to do my own test too. Google says the Document Interactive Time, Document Content Loaded Time, and Page Load Time are all slower with ajax on, but server interactions like Server Connection, Server Response etc are all just about the same. I still can't imagine why it's slower - the browser is getting only a portion of the data in the ajax request, and this portion is exactly the same as what a full page load would send.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25144648

http://stackoverflow.com/comment/39032494
has text: Thx for mention that. What I want is to display event_detail.title which is the old info, and store it into eve.title and submit with it.
comment on: http://stackoverflow.com/a/25086000
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25070862
answers question: http://stackoverflow.com/q/25070558
type: Answer
upvote count: 1
score: 1
has body: You might have to change you controller to the followning .controller('myController', ['$scope', '$sce', function($scope, $sce) { $scope.testWorks = 'John'; $scope.testText = $sce.trustAsHtml(" Peter "); $scope.testTable = [$sce.trustAsHtml(' A '), $sce.trustAsHtml(' B '), $sce.trustAsHtml(' C ')]; }]); and you html to: here is an example
downvote count: 0

http://stackoverflow.com/comment/39025066
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25082070
has text: If the network as fine (and the browser not buggy), there must be a problem with your server. Investigate.

http://stackoverflow.com/comment/39202667
has text: you can give same width for both table....@justin
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25177809

http://stackoverflow.com/comment/39256752
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25206567
has text: `var self = this;` in the beginning of MyClass and then use `self.objects`
type: Comment

http://stackoverflow.com/comment/39294402
score: 0
type: Comment
type: QuestionComment
has text: There's no div with id 'habla_topbar_div' available.
comment on: http://stackoverflow.com/q/25226850

http://stackoverflow.com/a/30884004
score: 0
answers question: http://stackoverflow.com/q/25110287
type: Answer
has body: Make your own script rather than using any tool for signalr performance monitoring. I used Gatling tool as framework(for to create multiple virtual users i.e. multithreading) and attached my load testing script written in java(java signalr client) to it and it worked very nice it is light weight and you can easily increase users! I tested up to 200 users! please specify in comment if you want help in deciding performance(load and stress) test plan as it is key point in any performance test!

http://stackoverflow.com/a/25134690
answers question: http://stackoverflow.com/q/25134218
has body: First you missed out your target div id "container".. second you need to clean up your code I noticed jquery is including twice in your code. Here is the working code with example JSON. Test Dash
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39156642
downvote count: 0

http://stackoverflow.com/comment/39138354
type: Comment
type: QuestionComment
score: 1
has text: Check out raspberry pi... There's a ton of insane things you can do with those.
comment on: http://stackoverflow.com/q/25143059

http://stackoverflow.com/q/25140217
has comment: http://stackoverflow.com/comment/39157136
has body: How to identify whether a page request has been issued by meta refresh, in servlet or java based web application or server side? I want to restrict a request if that has been issued by meta refresh. I have tried below js code, but it doesn't solving the issue. &lt;script language="JavaScript"&gt; var metas = document.getElementsByTagName('meta'); for (i=0; i&lt;metas.length; i++) { if (metas[i].getAttribute('http-equiv') == 'refresh') { session.setAttribute("source", "meta"); } } &lt;/script&gt; Thanks.
has comment: http://stackoverflow.com/comment/39147511
type: Question
has comment: http://stackoverflow.com/comment/39238272
has comment: http://stackoverflow.com/comment/39200368
has comment: http://stackoverflow.com/comment/39252734
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/39231951
has comment: http://stackoverflow.com/comment/39260074
tagged with: servlets
tagged with: xss
score: 0
upvote count: 1
downvote count: 1
favorite count: 0
answer count: 0
has comment: http://stackoverflow.com/comment/39181580
has title: how meta refresh has identified at server side to restrict spam sites?
has comment: http://stackoverflow.com/comment/39315668
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39145157
tagged with: meta-tags

http://stackoverflow.com/a/25150097
has body: What you're seeing is called clock skew. Like any clock, the clock inside a computer has to be set to the correct time, and the clocks for any two computers slowly diverge from one another. Therefore, it's almost certain that any two computers will think its a slightly different time. Usually, this difference is small enough that you don't notice, but it can be big enough to see it when you deliberately run an experiment like the one you just did.
answers question: http://stackoverflow.com/q/25150070
score: 1
has comment: http://stackoverflow.com/comment/39152084
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25150070
downvote count: 0
has comment: http://stackoverflow.com/comment/39152979
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39152106
has comment: http://stackoverflow.com/comment/39152554
type: Answer

http://stackoverflow.com/comment/39220887
type: AnswerComment
has text: `$(window).on("beforeunload", function(){ if ($("#pdf_element").length > 0) { if ($(window).width() < 480 || $(window).height() < 480) { $("#pdf_element").remove(); } }`
type: Comment
comment on: http://stackoverflow.com/a/25187393
score: 0

http://stackoverflow.com/comment/39041069
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25090581
type: QuestionComment
has text: This looks like nonsense to me, what do you exactly want to achieve?

http://stackoverflow.com/q/25208881
possible better answer: http://stackoverflow.com/a/25208963
has comment: http://stackoverflow.com/comment/39261164
has comment: http://stackoverflow.com/comment/39261092
favorite count: 0
has comment: http://stackoverflow.com/comment/39261299
has comment: http://stackoverflow.com/comment/39261464
has comment: http://stackoverflow.com/comment/39261197
has title: split not working with attribute
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25208963
has comment: http://stackoverflow.com/comment/39260965
has answer: http://stackoverflow.com/a/25209001
accepted answer: http://stackoverflow.com/a/25209001
has comment: http://stackoverflow.com/comment/39261177
has comment: http://stackoverflow.com/comment/39261017
has comment: http://stackoverflow.com/comment/39261138
has comment: http://stackoverflow.com/comment/39260963
downvote count: 1
has comment: http://stackoverflow.com/comment/39261581
type: Question
has comment: http://stackoverflow.com/comment/39261057
has comment: http://stackoverflow.com/comment/39261209
answer count: 2
has comment: http://stackoverflow.com/comment/39261036
upvote count: 0
has body: So I was making a function to link to a page without showing the direction to the user and I had a problem and I don't know why is happening this. here's my code: function goTo(path) { var pageAttr = $(this).attr('goTo'), pageNExtension = pageAttr.split(' '), page = pageNExtension[0], extension = pageNExtension[1], pathName = path, locationToGo = pathName + page + extension; if (pathName == 'root') { window.location.href = locationToGo; } else if (pathName == 'sub') { window.location.href = locationToGo; } else { window.location.href = locationToGo; }; }; here is the element that calls the function: Home
has comment: http://stackoverflow.com/comment/39261014
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/39261174

http://stackoverflow.com/q/25072536
upvote count: 2
has title: Three.js - Using PlaneGeometry to generate hills
accepted answer: http://stackoverflow.com/a/25107827
type: Question
tagged with: javascript
has body: I'm looking for a simple way to generate no-uniform hills in Three.js. I've been able to create to a hill effect using particles and positioning them using a sine wave algorithm like (roughly) x = Math.random() * 1000 y = Math.sin( x / freq ) * amp z = Math.random() * 1000 However, this method seems hacky, and the hills produced are uniform in height. I was thinking of using PlaneGeometry, but I'm not sure if this is a good approach. Any ideas would be helpful.
score: 2
answer count: 1
downvote count: 0
favorite count: 0
tagged with: three.js
has answer: http://stackoverflow.com/a/25107827
type: AnsweredQuestion

http://stackoverflow.com/comment/39268679
type: QuestionComment
comment on: http://stackoverflow.com/q/25212810
has text: Is there a specific issue you're having a hard time with?
score: 0
type: Comment

http://stackoverflow.com/comment/39314926
score: 0
type: Comment
has text: the py file is too big to paste here
comment on: http://stackoverflow.com/a/25236293
type: AnswerComment

http://stackoverflow.com/comment/39111684
type: AnswerComment
has text: I showed as 120%, because I want to make an example of what happens if that div overflows the body height.
comment on: http://stackoverflow.com/a/25128415
type: Comment
score: 0

http://stackoverflow.com/comment/39151159
has text: That depends on the angular version. Take this fiddle for instance http://jsfiddle.net/joshdmiller/HB7LU/
type: AnswerComment
comment on: http://stackoverflow.com/a/25149646
score: 0
type: Comment

extjs
tags question: http://stackoverflow.com/q/25200529
tags question: http://stackoverflow.com/q/25096010
tags question: http://stackoverflow.com/q/25178241
tags question: http://stackoverflow.com/q/25198722
tags question: http://stackoverflow.com/q/25123817
tags question: http://stackoverflow.com/q/25173909
tags question: http://stackoverflow.com/q/25199278
tags question: http://stackoverflow.com/q/25203596
tags question: http://stackoverflow.com/q/25142111
tags question: http://stackoverflow.com/q/25083982
tags question: http://stackoverflow.com/q/25135044
tags question: http://stackoverflow.com/q/25187765
tags question: http://stackoverflow.com/q/25079546
type: Tag
tags question: http://stackoverflow.com/q/25178657
tags question: http://stackoverflow.com/q/25148381
tags question: http://stackoverflow.com/q/25182362
tags question: http://stackoverflow.com/q/25170018
tags question: http://stackoverflow.com/q/25206946
tags question: http://stackoverflow.com/q/25187508
tags question: http://stackoverflow.com/q/25071088
tags question: http://stackoverflow.com/q/25161698
tags question: http://stackoverflow.com/q/25197181
tags question: http://stackoverflow.com/q/25204555
tags question: http://stackoverflow.com/q/25116668
tags question: http://stackoverflow.com/q/25078202
tags question: http://stackoverflow.com/q/25150829
tags question: http://stackoverflow.com/q/25116824
tag name: extjs
tags question: http://stackoverflow.com/q/25080574
tags question: http://stackoverflow.com/q/25163678
tags question: http://stackoverflow.com/q/25182072
tags question: http://stackoverflow.com/q/25081346
tags question: http://stackoverflow.com/q/25218849
tags question: http://stackoverflow.com/q/25198959

http://stackoverflow.com/q/25113015
has body: http://jsfiddle.net/#run&amp;togetherjs=2c9lcPPkKn source is right on there. and my question is, html : onClick="this.blahblahblah='blah'" &lt;- this code works, but function test() { this.blahblah='blah'; } html : onClick="test()" &lt;- this doesn't work. why is that? why the keyword 'this' doesn't work?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39082606
has answer: http://stackoverflow.com/a/25113096
has answer: http://stackoverflow.com/a/25113042
type: Question
has comment: http://stackoverflow.com/comment/39082633
tagged with: this
tagged with: javascript
has title: why keyword 'this' doesn't work, in html and js?
score: 0
has answer: http://stackoverflow.com/a/25113247
accepted answer: http://stackoverflow.com/a/25113247
answer count: 5
has answer: http://stackoverflow.com/a/25113558
possible better answer: http://stackoverflow.com/a/25113042
has comment: http://stackoverflow.com/comment/39082989
linked to: http://stackoverflow.com/q/21894118
has answer: http://stackoverflow.com/a/25113118

http://stackoverflow.com/q/25224129
has answer: http://stackoverflow.com/a/25224168
has comment: http://stackoverflow.com/comment/39289369
has answer: http://stackoverflow.com/a/25224160
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25224149
tagged with: rounding
type: Question
has title: Round every textbox to 2 decimal places
has answer: http://stackoverflow.com/a/25224149
tagged with: javascript
tagged with: jquery
tagged with: tofixed
score: 0
has answer: http://stackoverflow.com/a/25224174
has body: This is probably really simple, but for the life of me I can't work out how to do it. So here goes: I have a large form with lots of text boxes, which are all currency based and so need to be rounded off to 2 decimal places. The values of these textboxes are all generated dynamically by some JavaScript functions I wrote, and I can use .toFixed(2); to round them up/down to 2 decimal places. However, it gets tiring and repetitive to have to put this after working out each value of each textbox. How could I write a simple piece of JavaScript (can be jQuery) to target all the textboxes and round them ALL to 2 decimal places? Thanks for any help :) P.S Sorry for the lack of any code, but there isn't really any to show, as its all locked up in big functions. But here's what I'm essentially doing: function workOutSomeVal() { // lots of code to work out values and stuff var finalValue = some mathematical equation to work out value; var anotherValue = a different value; $(".some-textbox").val((finalValue).toFixed(2)); $(".another-textbox").val((anotherValue).toFixed(2)); } // my question is, how could I get rid of .toFixed(2) and put in a generic statement somewhere to target all the textboxes?
answer count: 4
possible better answer: http://stackoverflow.com/a/25224168

http://stackoverflow.com/q/25094648
type: Question
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25094920
has answer: http://stackoverflow.com/a/25094692
has comment: http://stackoverflow.com/comment/39048373
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25094920
has comment: http://stackoverflow.com/comment/39048420
has title: Get json data through ajax
accepted answer: http://stackoverflow.com/a/25094692
has comment: http://stackoverflow.com/comment/39048352
has body: The question I am asking is a basic question because I am new in json and ajax. so I have a json data of name , task , date and status I am getting data through ajax but it is not showing in on my page. my ajax code is this: $(document).ready(function(e) { // Using the core $.ajax() method $.ajax({ url: "getdata.php", type: "GET", dataType : "json", success: function( json ) { $( "&lt;h1/&gt;" ).text( json.name ).appendTo( "body" ); $( "&lt;div class=\"content\"/&gt;").html( json.task ).appendTo( "body" ); }, complete: function( xhr, status ) { alert( "The request is complete!" ); } }); }); this is my json data: [ {"name":"Usman ","task":"Getting work","date":"27-07-2014 12:28:45 PM","status":"1"}, {"name":"Hamza","task":"Starting work","date":"27-07-2014 12:29:36 PM","status":"1"}, {"name":"Hamza","task":"Geted","date":"27-07-2014 2:04:07 PM","status":"1"}, {"name":"Hamza","task":"Start work","date":"02-08-2014 3:56:37 PM","status":"1"} ] I don't know why It is not appending html data but it is showing complete alert. I have added fiddle even if it is not working. Fiddle
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1078118
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript

http://stackoverflow.com/comment/39121167
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25131997
has text: should I create the map instance within pan function then?
score: 0

http://stackoverflow.com/comment/39144296
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25145705
has text: Thanks for the reply roman, that resolved the validation msg, still working on the 'select' though
type: AnswerComment

http://stackoverflow.com/comment/39092300
has text: How about trying `d3.select("#SVGBlock").append("g").html("__your saved svg__")`.
comment on: http://stackoverflow.com/q/25115548
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25148604
has comment: http://stackoverflow.com/comment/39149299
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39150117
linked to: http://stackoverflow.com/q/17131643
has comment: http://stackoverflow.com/comment/39150035
has comment: http://stackoverflow.com/comment/39150066
has comment: http://stackoverflow.com/comment/39149870
has comment: http://stackoverflow.com/comment/39149249
has comment: http://stackoverflow.com/comment/39149966
has comment: http://stackoverflow.com/comment/39149749
has comment: http://stackoverflow.com/comment/39149869
has comment: http://stackoverflow.com/comment/39149783
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39149558
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39150436
has comment: http://stackoverflow.com/comment/39150255
has comment: http://stackoverflow.com/comment/39149787
has comment: http://stackoverflow.com/comment/39149748
has title: angularjs $resource $save not posting data
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/39149395
has comment: http://stackoverflow.com/comment/39150210
linked to: http://stackoverflow.com/q/13312162
upvote count: 1
has comment: http://stackoverflow.com/comment/39149542
type: Question
has comment: http://stackoverflow.com/comment/39150168
has body: api/profile/:accountname/:profilename I am trying to use my api in a restful way using $resource. My data model is: each account has a list of profiles, and those profiles should have GET, POST, PUT. However, I generally don't get just one profile, rather all the profiles if I GET without profilename, then the whole account is returned. var re = $resource('/api/profile/:accountname/:profilename', { accountname : '@accoutname', profilename : '@profilename' }); var r = re.get({ accountname: 'leo', profilename: 'qwe' }, function (data ) { //change some properties on r. //ideally, I should be able to put r is a $scope, and have two-way binding working and $save the changes to the server. r.$save({ accountname: 'leo', profilename: 'qwe' }); }); The problem with this code is that there is no data posted to the server. It was already frustrating enough that I have to pass the parameters again in the $save method. Shouldn't it remember its parameters, since I already specified it in the get method from which I got the object I am calling $save on. If there is a better way to do it please let me know. When I inspect data in the callback, it is what I expect from the server, but now I just need to be able to post whatever itself is to the server when call $save. The official doc is so minimal that it is not obvious to know what each method takes and returns, it needs a lot of improvement. EDIT: I solved the no data posted to server problem, and it is in the comments. The mystery still remains that I have to supply parameters in my $save method while the official doc doesn't. EDIT2: Mystery solved, see comments.
has comment: http://stackoverflow.com/comment/39150826
has comment: http://stackoverflow.com/comment/39149585

http://stackoverflow.com/comment/39092071
type: Comment
comment on: http://stackoverflow.com/q/25117790
type: QuestionComment
has text: @urbz He is creating ASP.NET application and not desktop application so the link is not useful for him
score: 0

http://stackoverflow.com/q/25217933
has body: I am trying to make view from json .When I have array of objects .I am able to make view and validate that view . If I have this array of object ,in that case I make able to view , check plunker http://plnkr.co/edit/eD4OZ8nqETBACpSMQ7Tm?p=preview [{ type: "email", name: "email", required:true }, { type: "text", name: "name", required:true }, { type: "number", name: "phonenumber", required:true }, { type: "checkbox", name: "whant to check" }, { type: "url", name: "server Url" }]; Now the problem occurred when i have json object .I need to show view from json object .I don't know from where I will start work I have this json "displayName": display the name of label which is from of input text field. inputValues :represent the type of tmput filled .if it is number then user fill only number , text then user only fill number ,email then user fill email , if it switch then it is drop down with given option. "required" give if field is required or not ?
has comment: http://stackoverflow.com/comment/39285299
has comment: http://stackoverflow.com/comment/39287363
tagged with: angularjs-directive
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25225112
type: Question
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39287968
has title: how to make view (form)from json using angular?
favorite count: 0
has answer: http://stackoverflow.com/a/25225112
upvote count: 2

http://stackoverflow.com/a/25113611
type: Answer
has body: You need to take the greediness out of your regexp. str.replace(/START.+?(END)/g,'NEW'); =&gt; "NEW_okok_NEW" Demo
answers question: http://stackoverflow.com/q/25113513
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25113513
score: 0

http://stackoverflow.com/comment/39158505
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25153798
has text: See if your expected url got called, and if so, what the response was.

http://stackoverflow.com/comment/39254017
comment on: http://stackoverflow.com/q/25204780
score: 0
type: Comment
type: QuestionComment
has text: Thank you for the insight. What is odd is that it is traversing and getting value. I may test this in another browser to see if it is IE.

http://stackoverflow.com/q/25185043
has comment: http://stackoverflow.com/comment/39218026
type: Question
has comment: http://stackoverflow.com/comment/39328645
tagged with: javascript
has comment: http://stackoverflow.com/comment/39218524
has comment: http://stackoverflow.com/comment/39218655
has comment: http://stackoverflow.com/comment/39218323
score: 0
has comment: http://stackoverflow.com/comment/39218313
has comment: http://stackoverflow.com/comment/39218128
answer count: 1
has comment: http://stackoverflow.com/comment/39218593
has comment: http://stackoverflow.com/comment/39216583
has body: I'm writing a code currently, and it's working good so far, however, my "onmouseout" command doesnt work properly. Ill give you the .js first: function getEventTarget(e){ e = e || window.event; return e.target || e.srcElement; } var ul = document.getElementById('index_cards'); ul.onclick = function (event) { var target = getEventTarget(event); if(target.tagName != 'LI') target = target.parentNode; if(hasClass(target, 'active')) target.className=''; else target.className='active'; } ul.onmouseout = function (event){ var target = getEventTarget(event); if(target.tagName != 'LI') target = target.parentNode; if(hasClass(target, 'active')) target.className=''; } function hasClass(el, className){ return new RegExp(className). test(el.className); } So this is what happens: When I leave the li element, the effect works, but same goes for inside the element. If I move outside of a tag inside the html element(move out of &lt;p&gt; or out of &lt;img&gt;) the effect applies as well. I only want to apply the onmouseout to the li element though. What am I doing wrong? Edit: Code works now, the solution was like this: function getEventTarget(e){ e = e || window.event; return e.target || e.srcElement; } function onMouseOut(event) { e = event.toElement || event.relatedTarget; if (e.parentNode == this || e == this) { return; } var target = getEventTarget(event); if(target.tagName != 'LI') target = target.parentNode; if(hasClass(target, 'active')) target.className=''; }; var ul = document.getElementById('index_cards'); ul.addEventListener('click', function(event){ var target = getEventTarget(event); if(target.tagName != 'LI') target = target.parentNode; if(hasClass(target, 'active')) target.className=''; else target.className='active'; target.addEventListener('mouseout', onMouseOut, true); }); function hasClass(el, className){ return new RegExp(className). test(el.className); }
has comment: http://stackoverflow.com/comment/39219120
has comment: http://stackoverflow.com/comment/39217941
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39216982
has comment: http://stackoverflow.com/comment/39217364
has answer: http://stackoverflow.com/a/25185204
linked to: http://stackoverflow.com/q/4697758
has title: Javascript getEventTarget?

http://stackoverflow.com/q/25110290
has title: Using Global Variables between multiple functions in JQuery?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39077715
tagged with: client-side
has answer: http://stackoverflow.com/a/25110335
accepted answer: http://stackoverflow.com/a/25110335
type: AnsweredQuestion
has body: I want to dynamically load an image using jQuery like this: main.js var slidersrc=""; //try to define global variable - not sure if this is correct jQuery(document).ready(function() { jQuery("#sliderimg").attr('src', slidersrc); }); jQuery("#selection1").click(function() { slidersrc='wp-content/themes/*****/slide1.png'; }); So the first time user access my website, the slider is empty. After user clicks on one of the selection areas, I set the global variable value. Then if user continues to navigate at my website to different pages, the user should be shown a slider image as a result of his selection. However, this doesn't appear to work. Am I correctly using the global variable in jQuery? Or is there a better way to save the user selection value in client side? thanks!
has comment: http://stackoverflow.com/comment/39078339
tagged with: global-variables
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/60443536
score: 0
type: Comment
has text: As of TinyMCE 4.3 its no longer font awesome. I think it's icomoon now.
comment on: http://stackoverflow.com/a/25192950
type: AnswerComment

http://stackoverflow.com/comment/39050843
has text: add the html source as well
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25095974

http://stackoverflow.com/q/25088431
has answer: http://stackoverflow.com/a/25167405
possible better answer: http://stackoverflow.com/a/25090527
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25090527
answer count: 2
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25167405
tagged with: dygraphs
has title: dygraph rolling average for data with holes
has body: Dygraphs options provide 'rollPeriod' to support rolling averages and 'stepPlot' to support step plots. When set together when some data is missing in between, they give very unexpected results. For example, attached image link shows graph for original data (rollPeriod=1) and rollPeriod=5. (https://i.sstatic.net/yRAgv.jpg) At 40,000 for example, the rolling average must be zero. But, dygraphs takes average of last 5 datapoints instead of last 5 seconds. Is it possible to get rolling average that maintains notion of time rather than data points. Thanks in advance ! PS- Sorry for image link. SO won't allow me to directly post images due to lack of reputation. :(
type: Question

http://stackoverflow.com/a/25107403
has body: I moved your code inside of: &lt;script type="text/x-handlebars" data-template-name="index"&gt; To inside of the first script tag, and it worked. I think to get the code to work the way you have it you need to specify the controller to be Index Controller to match the Route, like so: App.IndexController = Ember.ObjectController.extend({ selectedName: 'Tom', names: ["Yehuda", "Tom"] });
answers question: http://stackoverflow.com/q/25107122
score: 0
type: Answer

http://stackoverflow.com/a/25071047
answers question: http://stackoverflow.com/q/25070999
has comment: http://stackoverflow.com/comment/39038515
score: 2
accepted answer of: http://stackoverflow.com/q/25070999
has comment: http://stackoverflow.com/comment/39030300
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
has body: You can use Sinon for stubbing/spy your ajax calls, check how many times they was executed, which params were passed etc. Check examples from the Sinon website for more info.

iframe
tags question: http://stackoverflow.com/q/25191001
tags question: http://stackoverflow.com/q/25197693
tags question: http://stackoverflow.com/q/25072248
tags question: http://stackoverflow.com/q/25170285
tags question: http://stackoverflow.com/q/25155740
tags question: http://stackoverflow.com/q/25156704
tag name: iframe
tags question: http://stackoverflow.com/q/25204097
tags question: http://stackoverflow.com/q/25109902
tags question: http://stackoverflow.com/q/25094397
tags question: http://stackoverflow.com/q/25120646
tags question: http://stackoverflow.com/q/25137866
tags question: http://stackoverflow.com/q/25198613
tags question: http://stackoverflow.com/q/25138861
tags question: http://stackoverflow.com/q/25107250
tags question: http://stackoverflow.com/q/25190851
tags question: http://stackoverflow.com/q/25190897
tags question: http://stackoverflow.com/q/25169646
tags question: http://stackoverflow.com/q/25123313
tags question: http://stackoverflow.com/q/25214530
tags question: http://stackoverflow.com/q/25193607
tags question: http://stackoverflow.com/q/25216672
tags question: http://stackoverflow.com/q/25147588
tags question: http://stackoverflow.com/q/25153000
tags question: http://stackoverflow.com/q/25200741
tags question: http://stackoverflow.com/q/25098021
tags question: http://stackoverflow.com/q/25153224
tags question: http://stackoverflow.com/q/25126091
tags question: http://stackoverflow.com/q/25146194
type: Tag
tags question: http://stackoverflow.com/q/25164426
tags question: http://stackoverflow.com/q/25132764
tags question: http://stackoverflow.com/q/25081204
tags question: http://stackoverflow.com/q/25204617
tags question: http://stackoverflow.com/q/25141476
tags question: http://stackoverflow.com/q/25215941
tags question: http://stackoverflow.com/q/25205742
tags question: http://stackoverflow.com/q/25127575
tags question: http://stackoverflow.com/q/25195439
tags question: http://stackoverflow.com/q/25075427
tags question: http://stackoverflow.com/q/25162918
tags question: http://stackoverflow.com/q/25150129
tags question: http://stackoverflow.com/q/25107941
tags question: http://stackoverflow.com/q/25096114
tags question: http://stackoverflow.com/q/25104334
tags question: http://stackoverflow.com/q/25227054
tags question: http://stackoverflow.com/q/25080656

http://stackoverflow.com/a/25157835
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25157301
answers question: http://stackoverflow.com/q/25157301
has body: Because you are passing Location to your function. Which is a native constructor in some browsers. It's not a string in your code. You should avoid using onclick attributes. You can store the value in a data-* attribute, delegate the events for dynamically generated elements using jQuery, and then read the data-* attribute in your event handler using the .data() method, like: $(this).data('location').
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25193720
has comment: http://stackoverflow.com/comment/39232713
has comment: http://stackoverflow.com/comment/39232702
has body: I was testing some code just to have a better understanding of variable scope chain in JS. I’ve set up 2 similar object constructors containing a function that calls a variable from the previous scope. The results that I get are unexpected from my understanding. var name = "Outter!"; var o = new function () { this.name = "Jill"; this.age = 23; this.func = function () { console.log(name); } } //output to console for: o.func()// Outter! From my understanding I wasn’t expecting this result. Since console.log(name) is trying to access name and name is in the previous scope (the o object’s scope), following the chain path to the upper scope the first name variable that is met, is the one in the o object. Instead the global scope name variable is reference. Basically I was expecting as a result “Jill”. How come? Should the invocation of console.log(name) be seen as an invocation to console.log(window.name)? clearly if I use console.log(this.name), Jill will be the result, but this is not what I'm looking for, I want to know why just "name" isn't working.
type: Question
has comment: http://stackoverflow.com/comment/39232824
tagged with: function
answer count: 1
tagged with: javascript
has title: JS scope chain, variable scope in an object function
has comment: http://stackoverflow.com/comment/39232801
tagged with: scope
score: 0
tagged with: this
has comment: http://stackoverflow.com/comment/39232776
has answer: http://stackoverflow.com/a/25193764
has comment: http://stackoverflow.com/comment/39232682
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39233089
tagged with: object
has comment: http://stackoverflow.com/comment/39232662
has comment: http://stackoverflow.com/comment/39232789

http://stackoverflow.com/a/25122337
has comment: http://stackoverflow.com/comment/39136391
has comment: http://stackoverflow.com/comment/39132851
has comment: http://stackoverflow.com/comment/39218685
has comment: http://stackoverflow.com/comment/39201554
score: 0
has comment: http://stackoverflow.com/comment/39132948
type: Answer
has comment: http://stackoverflow.com/comment/39099975
answers question: http://stackoverflow.com/q/25122048
has comment: http://stackoverflow.com/comment/39101142
has body: According to a new report from AnandTech. html, body { height: 100%; } .view { color:#FFFFFF; width:1000px; height:300px; text-align:center; -webkit-animation:mymove 5s linear infinite; /* Safari and Chrome */ animation:mymove 5s linear infinite; background-size: 200% 100%; background-repeat: repeat-y; } @keyframes mymove { 100% { transform: translate3d(0px, -400px, 0px); } } @-webkit-keyframes mymove /* Safari and Chrome */ { 100% { transform: translate3d(0px, -400px, 0px); } } check jsfiddle

http://stackoverflow.com/comment/39057063
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25097501
type: Comment
has text: Ooo, nice! I'll look at it. But back to the question at the hand -- would my workaround mentioned be the best possible solution or are there better ones?

http://stackoverflow.com/a/27204072
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: It is now possible to catch mouse events in a VLC Web Plugin without any local programming knowledge. This method does although require some knowledge of QML (Official Docs). You will need to install WebChimera Plugin for this to work. See Working Demo
accepted answer of: http://stackoverflow.com/q/25133680
answers question: http://stackoverflow.com/q/25133680
type: Answer

http://stackoverflow.com/a/25156225
has body: This line and the others like it have a syntax error: change.button+(i-1).className='revealed'; // ^^^^^^^^^^^^ The change automatic global has automatic properties for each button; the names of those properties are button0, button2, etc. So to access button0 using i = 0, you use bracketed notation and string concatenation: change["button" + (i-1)].className='revealed'; Your code is relying on the browser creating an automatic global variable, change, because you've created a form element with name="change". It's also relying on that form object getting automatic properties for its fields because you've used name="button0" and such on them. I wouldn't recommend relying on either of those things. Instead, look up the form intentionally: var change = document.querySelector("form[name=change]"); and get the buttons from it intentionally: var buttons = change.querySelectorAll("input[type=button]"); buttons will be an array of the buttons in document order. To access a button by its index in that list you'd use buttons[i]. So: buttons[i-1].className='revealed'; FWIW.
upvote count: 2
has comment: http://stackoverflow.com/comment/39189489
score: 2
has comment: http://stackoverflow.com/comment/39203726
has comment: http://stackoverflow.com/comment/39168230
has comment: http://stackoverflow.com/comment/39167858
has comment: http://stackoverflow.com/comment/39167905
has comment: http://stackoverflow.com/comment/39219857
downvote count: 0
has comment: http://stackoverflow.com/comment/39167654
answers question: http://stackoverflow.com/q/25156091
type: Answer

http://stackoverflow.com/comment/39002486
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25069740
has text: @Waxen let's suppose it has a property `length`. this solution wouldn't work, it will return `[[1,1,1],[2,2,2],[3,3,3]]` while it should be `[1,2,3,1,2,3,1,2,3]`

http://stackoverflow.com/q/25156170
downvote count: 0
answer count: 1
has title: Using Mako Template in Javascript
tagged with: javascript
tagged with: jquery
tagged with: mako
has answer: http://stackoverflow.com/a/25156421
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: python
score: 2
has body: I have a dashboard I am working on, using Python cherrypy framework and Mako template language. I had an html file for each of dashboard pages. There, I used Mako to pass some data to html and inline Javascript. For example, to display the names of some processes when I only had the list of ids, I passed a Python dict that maps ids to their corresponding names, and then used the dict in ${} tags. However, as I am now moving these Javascript codes into a separate file with .js extension, I found out simply putting the same Mako code blocks in the Javascript code does not work. Is there any way I could use Mako template language in an external .js file that is imported in an html file? Is it considered a bad practice and should I pass all these data using XMLHTTPRequests when I am passing them to Javascript?
type: Question

http://stackoverflow.com/comment/39228907
type: Comment
comment on: http://stackoverflow.com/q/25191394
type: QuestionComment
score: 0
has text: Can you create a jsFiddle for this? I'm not exactly sure what you want. Your question mentions moving the image from one div to another, although your image is not in a div and you only have 1 div.

http://stackoverflow.com/comment/39100510
has text: okay that's very helpful! thanks! I need a little more help, there's only one windows.location but with different url every time. can I copy that url without any match? and finally I want to move that link. what to do for that?
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25116605
score: 0

http://stackoverflow.com/q/25184440
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25184595
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39214916
favorite count: 0
tagged with: angularjs
type: Question
upvote count: 2
possible better answer: http://stackoverflow.com/a/25184533
has title: Angular Ajax call, ng-repeat not showing
answer count: 2
has answer: http://stackoverflow.com/a/25184533
tagged with: php
has answer: http://stackoverflow.com/a/25184595
has body: The Js var app = angular.module('app' , ['ui.router']); app.controller('HeaderController',function( $scope , $http ){ $http.get("/data/main_menu.php") .success(function(data){ $scope.Menus = data; }); }); The HTML &lt;header ng-controller="HeaderController as header"&gt; &lt;ul id="menu_categories"&gt; &lt;li ng-repeat="menu in header.Menus"&gt;{{ menu.name }}&lt;/li&gt; &lt;/ul&gt; The /data/main_menu.php &lt;?php $menu = array( array('name' =&gt; 'FACE'), array('name' =&gt; 'BODY'), array('name' =&gt; 'HAIR'), array('name' =&gt; 'MEN'), array('name' =&gt; 'BABIES &amp; KIDS'), array('name' =&gt; 'SUN'), array('name' =&gt; 'AROMATHERAPY') ); echo json_encode($menu); ?&gt; I tried an update function in Controller or defining the $scope.Menus outside of $http.get Can you help me..? Might be somthing litle ! Thank you !
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/39214785
tagged with: javascript

http://stackoverflow.com/comment/39189913
comment on: http://stackoverflow.com/a/25154541
score: 0
type: AnswerComment
type: Comment
has text: On an unrelated note, the directive including its own controller and using that as a communication mechanism between parent and children is something I am using and I think it's extremely effective, it just doesn't help me with timing unless I'm willing to set up a $watch.

http://stackoverflow.com/a/25101394
has comment: http://stackoverflow.com/comment/39061064
upvote count: 0
has comment: http://stackoverflow.com/comment/39061037
score: -1
has comment: http://stackoverflow.com/comment/39061027
answers question: http://stackoverflow.com/q/25101356
has comment: http://stackoverflow.com/comment/39061072
type: Answer
has body: You have to setup the function outside of your initial function. It will look like this: $(function () { $("#slider-1").slider({ range: true, min: 0, max: 500, values: [0, 0], slide: function (event, ui) { $("#priceA").val("$" + ui.values[0] + " - $" + ui.values[1]); }, stop: function () { getValues(); } }); }); $("#slider-1").click(function(){ alert('Called'); });
has comment: http://stackoverflow.com/comment/39061040
has comment: http://stackoverflow.com/comment/39061039
downvote count: 1

datepicker
tags question: http://stackoverflow.com/q/25139225
tags question: http://stackoverflow.com/q/25159915
tags question: http://stackoverflow.com/q/25136508
tags question: http://stackoverflow.com/q/25164431
tags question: http://stackoverflow.com/q/25221335
tags question: http://stackoverflow.com/q/25133115
tag name: datepicker
type: Tag
tags question: http://stackoverflow.com/q/25227865
tags question: http://stackoverflow.com/q/25088245
tags question: http://stackoverflow.com/q/25197455
tags question: http://stackoverflow.com/q/25170018
tags question: http://stackoverflow.com/q/25171979
tags question: http://stackoverflow.com/q/25215876
tags question: http://stackoverflow.com/q/25116118
tags question: http://stackoverflow.com/q/25202077
tags question: http://stackoverflow.com/q/25075338
tags question: http://stackoverflow.com/q/25121798
tags question: http://stackoverflow.com/q/25117328
tags question: http://stackoverflow.com/q/25170515
tags question: http://stackoverflow.com/q/25187195
tags question: http://stackoverflow.com/q/25136650

http://stackoverflow.com/comment/39074181
comment on: http://stackoverflow.com/q/25095863
score: 0
type: Comment
has text: But I wana read the file first
type: QuestionComment

acrobat
type: Tag
tags question: http://stackoverflow.com/q/25085505
tag name: acrobat

http://stackoverflow.com/comment/39255086
score: 0
type: QuestionComment
type: Comment
has text: To clarify the above, the popup code/markup was present in the inspector for both AJAX and non-AJAX jQM navigation. I didn't see where anything was duplicated or recurring. When coming up with this solution, I did see mention on SO of memory leaks, etc. Hopefully, this way of injecting the popup won't contribute to that.
comment on: http://stackoverflow.com/q/25190411

http://stackoverflow.com/q/25070573
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39004846
tagged with: ajax
upvote count: 2
has comment: http://stackoverflow.com/comment/39003813
has comment: http://stackoverflow.com/comment/39003722
tagged with: http://stackoverflow.com/tag/html
has body: I have a function that's running for 2-3 seconds on the client (no ajax calls). I'm trying to show a "Busy/Processing" animation while this operation is running. simplified code is as followed: var ajaxContainer = $('.spinner'); // show $(ajaxContainer ).show(); // long operation var items = GetItems(); $.each(items, function (index, value) { ProcessItem(value.itemID); }); // hide $(ajaxContainer ).hide(); but this does not work as expected. the result that i get is that the operation runs without showing the spinner. although it does show when the operation ends. I saw some posts online mentioning that this could be done by using windows.setTimeout(). but since this operation is based on a dynamic number of items i would not want to set a specific timeout number in advance. instead i'd like to show the spinner when the operation starts, and hide it when it's finished. is there an elegant way to achieve this?
tagged with: client-side
favorite count: 0
has answer: http://stackoverflow.com/a/25070736
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/9516900
has answer: http://stackoverflow.com/a/25070909
has title: How to show a busy indicator for a long non-ajax operation?
has comment: http://stackoverflow.com/comment/39003781
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39003815
has comment: http://stackoverflow.com/comment/39003730
type: Question

http://stackoverflow.com/a/25132388
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39121481
type: AcceptedAnswer
downvote count: 0
has body: Bad practice but fine for example: // Split your title to words: var s = 'long title with more words'.split(' '); if (s.length &gt; 1) { // Add '&lt;br&gt;' into the center: s.splice(parseInt(s.length / 2) - 1, 0, '&lt;br&gt;'); // Here is your result. Update HTML tag: console.log(s.join(' ')); } else { console.log(s + '&lt;br&gt;&amp;nbsp;'); } Or you can do it right from PHP: &lt;?php $s = explode(' ', 'long title with more words'); if (count($s) &gt; 1) { array_splice($s, intval(count($s) / 2) - 1, 0, '&lt;br&gt;'); echo implode(' ', $s); } else { echo $s[0], '&lt;br&gt;&amp;nbsp;'; }
type: Answer
accepted answer of: http://stackoverflow.com/q/25132154
answers question: http://stackoverflow.com/q/25132154

http://stackoverflow.com/q/25075503
type: AnsweredQuestion
score: 0
tagged with: java
has comment: http://stackoverflow.com/comment/39012241
has body: Want to know what could be the best possible way to retrieve the images stored from database in javascript or jquery. Currently i am retrieving the image from database and storing into one temp folder into server side and in the javascript with the help of i am retrieving that particular image. But i am looking for some other way to retrieving the image directly from db without storing into temp folder. Tried my best to brief the problem.If unable to get Let me know i will try in some other way.
possible better answer: http://stackoverflow.com/a/25075671
has answer: http://stackoverflow.com/a/25075671
tagged with: servlets
type: Question
has answer: http://stackoverflow.com/a/25075755
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25075645
answer count: 3
has title: Best Possible Way to retrieve image from database in javascript or jquery
has comment: http://stackoverflow.com/comment/39012526
favorite count: 0
upvote count: 1
accepted answer: http://stackoverflow.com/a/25075645
downvote count: 1

http://stackoverflow.com/q/25098069
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39055064
has comment: http://stackoverflow.com/comment/39055386
has title: Declaring and assigning a function object with object keys in one line
has comment: http://stackoverflow.com/comment/39055727
favorite count: 0
has body: Is it possible to condense the following into a single statement? var foo = function () { return; }; foo.bar = 'baz'; The closest I came was: var foo = Object.create(function(){return;}, { bar : { value: 'baz' } }); But the function will not run.
accepted answer: http://stackoverflow.com/a/25098755
has comment: http://stackoverflow.com/comment/39055467
upvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25098382
score: 1
has answer: http://stackoverflow.com/a/25098382
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25098755

http://stackoverflow.com/a/25216360
answers question: http://stackoverflow.com/q/25216270
has comment: http://stackoverflow.com/comment/39275706
downvote count: 0
type: Answer
has body: You need to use a more structured data object to take into consideration the optgroup nesting when building your canonical "opts" list. For example, with your HTML snippet, opts might look like: [{'label': 'Group A', opts: ['Apple',...]}, {'label': 'Group B', opts: [...]}, ..] A loop to build this might look like: var optList = []; jQuery('#list optgroup').each(function() { var $group = $(this), optgroup = {'label': $group.attr('label'), opts: []}; $group.find('option').each(function() { optgroup.opts.push(this.innerText); }); optList.push(optgroup); }); Then you just iterate through your new data comparing the internal "opts" array values to the input value... of course, building your new optgroup/option markup for any matches you find. To reset the entire innerHTML of the list and replace it when the list is cleared: var optionHTML = $("#list")[0].innerHTML; then to reset the list: $("#list").html(optionHTML);
upvote count: 1
score: 1

http://stackoverflow.com/a/25175433
has comment: http://stackoverflow.com/comment/39198628
has body: why it is now delete permanently As you are not deleting it from scope.studentDetail it is persisting. Changes HTML Edit Delete Script scope.editRowName=function (student) { bootbox.prompt({ title: "What is your name?", //Title value: student.name, //Pre-filled name callback: function(result) { student.name = result; //Update name scope.$digest(); } }); } scope.deleteRow=function ($index) { scope.studentDetail.splice($index, 1); } DEMO
accepted answer of: http://stackoverflow.com/q/25175317
answers question: http://stackoverflow.com/q/25175317
has comment: http://stackoverflow.com/comment/39198567
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/25186436
type: Answer
answers question: http://stackoverflow.com/q/25186191
has comment: http://stackoverflow.com/comment/39219139
score: 0
has body: This works in jsfiddle (couldn't figure out how to save) http://jsfiddle.net/ you had invalid html by the way ( ) 1 2 3 4

http://stackoverflow.com/a/25124047
score: 0
has comment: http://stackoverflow.com/comment/39104304
type: Answer
has comment: http://stackoverflow.com/comment/39104376
has comment: http://stackoverflow.com/comment/39104637
has comment: http://stackoverflow.com/comment/39103396
has comment: http://stackoverflow.com/comment/39104592
has comment: http://stackoverflow.com/comment/39103491
accepted answer of: http://stackoverflow.com/q/25124019
has comment: http://stackoverflow.com/comment/39104373
has comment: http://stackoverflow.com/comment/39103429
has body: You should put inside of td http://plnkr.co/edit/APJ7mvfFrDNSWF2pKQ6m?p=preview
has comment: http://stackoverflow.com/comment/39104187
has comment: http://stackoverflow.com/comment/39103519
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39104485
answers question: http://stackoverflow.com/q/25124019
has comment: http://stackoverflow.com/comment/39103489
has comment: http://stackoverflow.com/comment/39103460

http://stackoverflow.com/a/25128719
answers question: http://stackoverflow.com/q/25128679
score: 1
has comment: http://stackoverflow.com/comment/39112434
type: AcceptedAnswer
has body: If you "view source" on that page, you see the image is represented by 24 hour Wind a) create a link directly to the latest image in firefox If you want to open that tab on the page, you will need a way to click the div with the h2 on it with the text 24 hour wind. You can accomplish that with a Bookmarklet (credit to @Jeff for pointing that out in the comments). If you just want to link to the image (without the rest of the page, you could link to http://www.bom.gov.au/tmp/current_obs/40211_wind.png b) put this link in one of my own web pages where I compile all key pieces of info I want to see in one page You can directly load that image from http://www.bom.gov.au/tmp/current_obs/40211_wind.png I suspect that the 40211 part changes from time-to-time. Unless you know how that number is generated, the safe bet would be to parse the page, find the current relative link, and change it to an absolute link. As always when scraping data from a website, make sure you are following the appropriate terms of use policy.
upvote count: 1
has comment: http://stackoverflow.com/comment/39112375
has comment: http://stackoverflow.com/comment/39113018
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25128679
type: Answer

http://stackoverflow.com/a/25209790
answers question: http://stackoverflow.com/q/25208591
has body: Conclusion: The developers behind Plnkr are morons. There is no they, there is only me and I don't typically think of myself as a moron. If you found yourself on Plunker it is likely because there is a body of people who find it useful and worthwhile, warts and all. If this is the attitude you bring to the community then you may find more fertile ground elsewhere. Have you considered that SHIFT-ALT-0 might seem like a very unlikely key combination to be used by someone who programs and closes braces quite often? If that is the setup you choose then I'm sorry that I have not considered your particular situation. As runTarm pointed out, SHIFT-ALT-0 is bound to the collapse command by default in the ace editor. Perhaps a better conclusion would be that configurable keybindings would be a great feature.
score: 15
type: Answer
upvote count: 15
downvote count: 0

http://stackoverflow.com/a/25092914
type: AcceptedAnswer
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/39047768
type: Answer
accepted answer of: http://stackoverflow.com/q/25092849
has body: var toAdd = document.createDocumentFragment(); var i=1; while(i < 101){ var newLi = document.createElement('li'); newLi.id = 'Product'+i; newLi.className = 'item'; newLi.innerHTML = ' '+i+' Buy '; toAdd.appendChild(newLi); i++; } document.getElementById('currentStore').appendChild(toAdd);
answers question: http://stackoverflow.com/q/25092849
score: 2
has comment: http://stackoverflow.com/comment/39045490

http://stackoverflow.com/comment/39060974
comment on: http://stackoverflow.com/q/25101356
score: 0
has text: The jquery ui is probably preventing event bubbling. What do you mean by "it isn't working"? Is there being an error thrown? Or just nothing happening.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25229647
tagged with: jquery
has body: Hi I have a wordpress site and I need to get data from a database and input it in a form. I have the following code: <?php /* Plugin Name: Wordpress Plugin Stijn 1 Description: Een Wordpress plugin die data uit een database haalt en invult via Ajax in een form. Version: 1.1 Author: Stijn Aerts Author URI: http://stijnaerts.be License: GPL2 */ add_action( 'wp_footer', 'ajax_lookup_userdata' ); function ajax_lookup_userdata(){ if (!is_admin()) { wp_enqueue_script('jquery'); } ?> <?php } ?> and the getuser.php file: <?php $q = intval($_GET['q']); $con = mysqli_connect('localhost',****,****,****); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con,"ajax_demo"); $sql="SELECT Naam FROM Personeel WHERE personeelsNummer = '1'"; $result = mysqli_query($con,$sql); return $result mysqli_close($con); ?> When I test it I get in the text input the following output: <!--[if IE 7]> <![endif]--> <!--[if IE 8]> <![endif]--> <!--[if !(IE 7) | !(IE 8) ]><!--> <!--<![endif]--> Test pagina <!--[if lt IE 9]> <![endif]--> <!--[if lt IE 9]> <![endif]--> Test pagina Menu Naar de inhoud springen Contact Home Registration Zoeken naar: Home Bewerken Geef een reactie Reactie annuleren Ingelogd als admin. Uitloggen? Reactie De volgende HTML-tags en -attributen zijn toegestaan: Zoeken naar: Ondersteund door WordPress Spring naar de toolbar Over WordPress WordPress.org Documentatie Ondersteuningsforums Terugkoppeling Test pagina Dashboard Thema's Aanpassen Widgets Menu's Header 43 Plugins bijwerken, Vertalingsupdates 0 Nieuw Bericht Media Link Pagina Gebruiker Pagina bewerken Hallo, admin adminstijnxk59 Mijn profiel wijzigen Uitloggen Uitloggen This is the first time I'm doing a thing like this, especially in Wordpress and I have no clue what is causing this. I just want the script to work! Lol. Help greatly appreciated.
has comment: http://stackoverflow.com/comment/39299795
tagged with: php
type: AnsweredQuestion
score: 0
tagged with: wordpress
has title: PHP script returns entire webpage instead of database data
type: Question
has answer: http://stackoverflow.com/a/25229758
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25229758
answer count: 1

http://stackoverflow.com/q/25101075
accepted answer: http://stackoverflow.com/a/25101182
tagged with: javascript
has answer: http://stackoverflow.com/a/25101639
has comment: http://stackoverflow.com/comment/39060483
has title: How to add events to innerHTML?
answer count: 4
type: AnsweredQuestion
upvote count: 0
has answer: http://stackoverflow.com/a/25101316
has comment: http://stackoverflow.com/comment/39060375
favorite count: 0
has comment: http://stackoverflow.com/comment/39060535
type: Question
possible better answer: http://stackoverflow.com/a/25101316
tagged with: http://stackoverflow.com/tag/html
has body: Ok, I am adding checkboxes to an HTML form using .innerHTML statement, and I want to add an event to those checkboxes when it is clicked. Here is an example code: One Two and my script looks like this: function sayHi() { alert("Hello!"); } var checkb = document.getElementById("checks") checkb.innerHTML = " Tets One"; The onclick event doesnt work, I get error saying: "sayHi is not defined".
tagged with: events
score: -2
has answer: http://stackoverflow.com/a/25101182
has comment: http://stackoverflow.com/comment/39060436
tagged with: innerhtml
downvote count: 2
has comment: http://stackoverflow.com/comment/39060424
has answer: http://stackoverflow.com/a/25101134

http://stackoverflow.com/comment/39278282
score: 0
has text: @user3043360, You cannot just rely on that event. This is because, The end user may end the browser process from task manager itself. Hence you instead should go for session timeouts.
type: Comment
comment on: http://stackoverflow.com/a/25217904
type: AnswerComment

http://stackoverflow.com/q/25195488
has title: How to return For function on new function?
has comment: http://stackoverflow.com/comment/39236321
has comment: http://stackoverflow.com/comment/39236291
has comment: http://stackoverflow.com/comment/39235954
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25195539
has comment: http://stackoverflow.com/comment/39236410
has comment: http://stackoverflow.com/comment/39236474
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
has comment: http://stackoverflow.com/comment/39236351
has body: I want to repack/create new For version for more shorthand use. the currenly my code: JavaScript &lt;script&gt; function loop(v){ return for(i=0; i&lt;v; i++){ function(){}} } loop(5){ console.log(i);} &lt;/script&gt; I repack For on new function call loop. how to do this? nb: answer it on basic operator solve not function. i think its about closure.
has comment: http://stackoverflow.com/comment/39235997
type: UnansweredQuestion

http://stackoverflow.com/comment/39281039
score: 0
comment on: http://stackoverflow.com/q/25219347
type: Comment
type: QuestionComment
has text: Plalx please put that as the answer

http://stackoverflow.com/q/25069901
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39002855
tagged with: ajax
has answer: http://stackoverflow.com/a/25069948
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/39002524
has comment: http://stackoverflow.com/comment/39002483
score: 1
upvote count: 1
has body: I am dynamically adding options to a drop down list with ajax jquery and PHP from my DB but for some reason it is not working. Please check my code: AJAX $("#course").change(function() { var id = $(this).val(); $.ajax({ type: "POST", url: "../ajax-select.php", data: id, cache: false, success: function(html) { $("#sub").html(html); } }); }); ajax-select.php <?php if($_POST['id']) { $id=$_POST['id']; $sql=mysql_query("SELECT * FROM `subjects` WHERE `course_id`='$id'"); while($row=mysql_fetch_array($sql)) { $id=$row['sub_id']; $data=$row['sub_name']; echo ' '.$data.' '; } } ?> HTML Select the Course <?select_course();?> Subject Select the subject Additional info: Ids assigned to the select options are correct ajax code is in a folder called js whereas all other files are on the root Jquery is included before the closing of the body Where am i going wrong?
type: Question
has title: Ajax not loading
tagged with: javascript
has comment: http://stackoverflow.com/comment/39002777
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25116824
type: AnsweredQuestion
score: 0
has body: I have to save a pdf file(which opens inside the browser) to the local directory on the same machine. Any idea ,How to do it by java script or ExtJS?
type: Question
accepted answer: http://stackoverflow.com/a/25121040
tagged with: javascript
tagged with: extjs
tagged with: sencha-touch-2
answer count: 1
has answer: http://stackoverflow.com/a/25121040
has title: how to save a file from browser to local directory by java script?

http://stackoverflow.com/a/25089898
downvote count: 0
has comment: http://stackoverflow.com/comment/39039984
has body: As you have discovered, there is no "ready" event when a template is loaded. The usual solution to knowing when anything that is dynamically loaded is ready is to supply a completion callback function to the code that is doing the loading. When that callback is called, the content is available in the page. I don't know exactly how you're loading the handlebars template, but the handlebars functions I see for loading a template, all take a callback argument that is called after the template has been successfully loaded. You would then trigger your map logic from within that callback. If you show us the code you're using for loading the template, we can be much more specific. Now, that you've shown us the code, your template is already preloaded and you can restructure you code like this to add the mapping stuff as soon as the fadeIn has finished: var source = $('#mapTemplate').html(); var template = Handlebars.compile(source); $('#wrapper').fadeOut(function() { $('#wrapper').html(template()).fadeIn(function() { var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8 }; var map = new google.maps.Map(document.getElementById("mapCanvas"),mapOptions); }); });
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39039911
has comment: http://stackoverflow.com/comment/39040067
score: 1
answers question: http://stackoverflow.com/q/25089748

http://stackoverflow.com/q/25205456
has comment: http://stackoverflow.com/comment/40437281
has title: Apache Cordova Facebook Plugin BUILD FAILED
has comment: http://stackoverflow.com/comment/40456755
tagged with: cordova
upvote count: 3
has body: I am trying to install the facebook cordova plugin using the cordova CLI but unfortunately, whatever I do, I get BUILD FAILED whenever I try to cordova build android. This is what I am using to install the plugin cordova plugin add https://github.com/phonegap/phonegap-facebook-plugin --variable APP_ID="my_facebook_app_id" --variable APP_NAME="my_facebook_app_name" Of course, I use my real facebook App_ID and App_Name. I also put them in plugin.xml everywhere there is APP_NAME or APP_ID. I don't know how to get older cmd error logs, because the only errors I see when the buld fails are error occuring because of a previous error. I tried cordova build android -d but it didn't help at all. I don't know if it has something to do with my cordova version or with the fact that I already have other plugins and have developed quite a lot and my app is no longer as empty as the example one. Cordova version: 3.5.0-0.2.6 P.S.: Just tried it on a new cordova build of my version, same error. I wonder how everybody else is not getting any, obviously the error is in me or the cordova version ;(
linked to: http://stackoverflow.com/q/25837802
has comment: http://stackoverflow.com/comment/40456050
tagged with: ant
type: UnansweredQuestion
answer count: 0
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question
score: 3
tagged with: android
tagged with: facebook

http://stackoverflow.com/comment/39003296
type: QuestionComment
comment on: http://stackoverflow.com/q/25070397
score: 6
has text: *"When I go to websites like google, youtube or this one etc, you don't see any PHP in the html source code."* - And so you shouldn't. PHP parses the information and then renders it to a format (HTML) a browser will let you read.
type: Comment

http://stackoverflow.com/comment/39196379
type: AnswerComment
type: Comment
has text: (function() { function fixTooltips(els) { for (var i = 0; i < els.length; i++) { var el = els[i]; var tooltip = el.getAttribute("data-tooltip"); if (tooltip) { el.title = tooltip; } } } var els = document.getElementsByTagName("a"); fixTooltips(els) }());</scrip>
comment on: http://stackoverflow.com/a/25163224
score: 0

http://stackoverflow.com/a/25220055
has comment: http://stackoverflow.com/comment/39284293
has comment: http://stackoverflow.com/comment/39284935
has body: Create a CSS class that defines the background-color change, and apply or remove it with $(target).parent().toggleClass('yourclass'); Insert this line wherever the expand is triggered.
score: 0
answers question: http://stackoverflow.com/q/25219979
has comment: http://stackoverflow.com/comment/39285872
type: Answer

http://stackoverflow.com/comment/39158450
comment on: http://stackoverflow.com/a/25153571
score: 0
type: AnswerComment
has text: I actually did this as well but it didn't seem to change anything... until I eventually found the reason: My browser was caching the old version of my host html page (without this meta tag)... hence the error. Anyway your answer is definitively correct since from a GWT perspective, that was the issue! Thanks!
type: Comment

http://stackoverflow.com/a/43383936
downvote count: 0
has body: This issue occurs when you sort the date order by desc Note Do not sort the data order by date desc Instead sort the data order by date Asc Your issue will be resolved. Happy Coding
score: 7
answers question: http://stackoverflow.com/q/25082034
type: Answer
upvote count: 7

http://stackoverflow.com/q/25185113
tagged with: jquery-ui-draggable
favorite count: 0
possible better answer: http://stackoverflow.com/a/73332615
type: AnsweredQuestion
upvote count: 1
type: Question
has title: jQuery UI dropover not always fired
tagged with: jquery-ui
score: 1
has answer: http://stackoverflow.com/a/73332615
answer count: 2
has body: I have a page with two DIVs, both of which are droppable. One of them (#droppable2) is initially hidden and is only shown when I hover the draggable item over the first DIV #droppable (with the dropover event). Example see here: http://codepen.io/anon/pen/AdLJr Drop here 1 Drop here 2 Drag me JS: $( "#draggable" ).draggable(); $( "#droppable,#droppable2" ).droppable({ drop: function() { $('#log').html($('#log').html() + ' DROP'); }, over: function() { $('#log').html($('#log').html() + ' over'); $('#droppable2').show(); } }); However, when I now hover the draggable item over the second DIV, its dropover event is not fired like it should. Only when drop the draggable item and then pick it up again does it seem to work. The drop event already works on the first try though. Any ideas what's causing this? I assume this might be a bug?
has answer: http://stackoverflow.com/a/25197737
accepted answer: http://stackoverflow.com/a/25197737
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39060259
has text: I'm not asking why you want human readability, I'm asking why reading line-by-line or as a whole object has anything to do with that. Just use `json_decode()` on the whole thing. Whitespace in the object structure doesn't matter.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25100983
type: Comment

http://stackoverflow.com/a/25110525
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39079484
accepted answer of: http://stackoverflow.com/q/25109627
type: Answer
has comment: http://stackoverflow.com/comment/39094042
answers question: http://stackoverflow.com/q/25109627
has comment: http://stackoverflow.com/comment/39093653
has comment: http://stackoverflow.com/comment/39096151
has comment: http://stackoverflow.com/comment/39079452
has comment: http://stackoverflow.com/comment/39078745
has body: If you have a function that returns the value needed you can simply do: function getUUID(){ var result = /* parse value */ return result; } $scope.project ={ trackid: getUUID() }; DEMO
score: 0
has comment: http://stackoverflow.com/comment/39078928

http://stackoverflow.com/comment/39284663
type: QuestionComment
comment on: http://stackoverflow.com/q/25220952
has text: Is the Form Data present? It should be right below the request headers.
score: 0
type: Comment

http://stackoverflow.com/a/25122410
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25106677
has body: As per Dan Davis, you have error, stderr, and stdout switched - not the console.log statements, but the order of the parameters in the function. Below is the correct order as per the docs var exec = require('child_process').exec; exec('phantomjs console.js', function(error, stdout, stderr){ if (error !== null) { console.log('exec error: ' + error); } console.log("Standard Output: " + stdout + " "); console.log("Error Output: " + stderr + " "); }); The reason for your output was that your stdout was where the actual error should have been, so it was empty. Your stderr was in the position of the actual stdout so it recieved the output. Your error was in the position of the actual stderr, so it was empty.
answers question: http://stackoverflow.com/q/25106677
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39113108

http://stackoverflow.com/comment/106711249
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25190668
score: 1
has text: Note also the `Number.MAX_SAFE_INTEGER` constant (`9007199254740991`).

http://stackoverflow.com/comment/39242159
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25198594
has text: @true: the user may click any line and the OP wants to count all br elements before that.

http://stackoverflow.com/comment/39104187
comment on: http://stackoverflow.com/a/25124047
type: AnswerComment
has text: but where is plunker pls give url
score: 0
type: Comment

http://stackoverflow.com/q/25153872
accepted answer: http://stackoverflow.com/a/25154127
linked to: http://stackoverflow.com/q/25306449
favorite count: 0
type: Question
tagged with: knockout-mapping-plugin
tagged with: getjson
has title: How to get json response in knockout js?
has body: i want to get a array from json to knockout js. for this i am using this code and i am trying to implement in adobe cq. but i am not able to get the response so any body can help here is my code in jsp First Name Last Name Month Year In Script in json file <%@page session="false" %> <%@ page import="org.apache.sling.jcr.api.SlingRepository" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.List" %> <%@ page import="java.util.ArrayList" %> <%@ page import="com.day.cq.commons.TidyJSONWriter, com.day.cq.tagging.Tag, java.util.Locale, com.day.cq.wcm.api.WCMMode, com.day.cq.tagging.TagManager, com.day.cq.tagging.TagCloud" %> <% //Local variables final SlingRepository repos = sling.getService(SlingRepository.class); final UserManagerFactory umFactory = sling.getService(UserManagerFactory.class); String pagepath = properties.get("propagePath",""); Session session = null; List<String> list = new ArrayList<String>(); String listString = ""; try { // Ensure that the currently logged on user has admin privileges. session = repos.loginAdministrative(null); final TidyJSONWriter writer = new TidyJSONWriter(response.getWriter()); list.add("a"); list.add("b"); list.add("a"); list.add("b"); list.add("a"); list.add("b"); //Begin writing JSON response writer.object(); writer.key("tagarray").array(); Iterator<String> it = list.iterator(); while(it.hasNext()) { listString += it.next(); if(it.hasNext()) { listString += ","; } } writer.value(listString); writer.endArray(); writer.endObject(); session.logout(); } catch (Exception e) { System.out.println("myajaxsample Exception Occured: " + e.getMessage()); } finally { session.logout(); session = null; } %> Please help me to resolve this as i am new in knockout
linked to: http://stackoverflow.com/q/25176821
upvote count: 2
tagged with: http://stackoverflow.com/tag/json
answer count: 1
tagged with: knockout.js
tagged with: javascript
has answer: http://stackoverflow.com/a/25154127
score: 2
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/39036841
type: QuestionComment
has text: Your `loggedin` variable is pointless. once you actually do manage to redirect to your new page, this page and all of its "state", including your `loggedin` variable, will no longer exist.
comment on: http://stackoverflow.com/q/25088223
score: 0
type: Comment

http://stackoverflow.com/comment/39238512
type: AnswerComment
has text: it has a one or two second wait until it fades in the topbar, thats why i was wondering about a demo :P
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25196832

http://stackoverflow.com/a/53000635
has body: You can do $(this).modal("toggle") if it open it will close and vice versa.
answers question: http://stackoverflow.com/q/25129041
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/34583575
score: 0
type: Answer
has body: Well after more than a year of experience with Angular, I now know what was the problem in the first instance. Reading Angular's documentation for ng-submit I found out this: Additionally it prevents the default action (which for form means sending the request to the server and reloading the current page), but only if the form does not contain action, data-action, or x-action attributes. Looking at the code it is evident that I mistakenly added an action attribute when I was defining the form element: &lt;form role="form" action="#" class="form-horizontal" ng-submit="saveUser()"&gt; Removing it will fix the problem: &lt;form role="form" class="form-horizontal" ng-submit="saveUser()"&gt;
answers question: http://stackoverflow.com/q/25114401

http://stackoverflow.com/comment/39233440
type: QuestionComment
has text: All the code is working flawlessly, I just want to do this validation check because right now if the user submits a value which is lower than the current bid the page just refreshes and there is no error message that his bid did not succeed, so i want to display with ajax the error message that his bid was too low and he has an 'outdated' version of the page
comment on: http://stackoverflow.com/q/25193904
score: 0
type: Comment

http://stackoverflow.com/a/25072632
upvote count: 1
has body: parseInt takes one required argument and one optional argument, and ignores everything else. The optional (second) argument is the radix, which tells the function which numerical base to use when converting the string. From the MDN docs on parseInt: The following examples all return 15: parseInt(" 0xF", 16) parseInt(" F", 16) parseInt("17", 8) parseInt(021, 8) parseInt("015", 10) parseInt(15.99, 10) parseInt("1111", 2) parseInt("12", 13) So, what's happening in your example is that your first function call is interpreting the characters "34" in base 22 and returning 70, and the second function call is interpreting the characters "34" in base 21 and returning 67.
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25072589

http://stackoverflow.com/comment/39008473
type: Comment
comment on: http://stackoverflow.com/a/25073326
has text: and the problem is where? There are lots of examples of how to get the value from a ` ` using jQuery, and equally many examples of how to set a value on an ` `. This is basic Google, what do you need stackoverflow for here?
type: AnswerComment
score: 0

http://stackoverflow.com/q/25101300
has title: Unable to get selected text using javascript
type: AnsweredQuestion
type: Question
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
has body: I am trying to modify code provided at 'http://jsfiddle.net/vivin/RjqUf/'(not adding code to keep question short and less confusing) to get a line or a word of pdf selected by user. I have added following javascript at the end of javascript window leaving everything else as it is. $(".textLayer").mouseup(function() { var selectedText; // IE version if (document.selection != undefined) { $(this).focus(); var sel = document.selection.createRange(); selectedText = sel.text; } // Mozilla version else if ($(this).selectionStart != undefined) { var startPos = $(this).selectionStart; var endPos = $(this).selectionEnd; selectedText = $(this).value.substring(startPos, endPos) } alert(selectedText ); }); Could you guys please tell me whats wrong?
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25101350
accepted answer: http://stackoverflow.com/a/25101350
has comment: http://stackoverflow.com/comment/39060817
downvote count: 2

http://stackoverflow.com/q/25159564
tagged with: javascript
has comment: http://stackoverflow.com/comment/39168399
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I have to invoke require module in html tag line.Also it is deprecate.I think it is need when html tag dynamic generated. The require module: define('index',['jquery','common','stat'],function($,common,stat){ return{ rankList:function(name){ stat.ranklist(name,function(data){ console.log('invoked...'); }); } } }); The html tag lines: 任务量大咖 收入大咖 准确大咖 Load script in html: The javascript I tried in html : var rankListCall=(function(){ var index=require(['index']); return{ rank:function(name){ index.rankList(name); } } })(); I got the script error in line index.rankList(name); Uncaught TypeError: undefined is not a function
accepted answer: http://stackoverflow.com/a/25159865
score: 0
tagged with: requirejs
has comment: http://stackoverflow.com/comment/39168695
type: AnsweredQuestion
type: Question
has title: How to invoke one method of require module in html tag line
has answer: http://stackoverflow.com/a/25159865

http://stackoverflow.com/a/25180334
type: Answer
answers question: http://stackoverflow.com/q/25180244
has body: since you MUST give id uniquely, you have to use this: http://jsfiddle.net/doniyor/L83guddg/ var count = $('span.countdown').length;
score: 0

http://stackoverflow.com/q/25222765
type: AnsweredQuestion
score: 2
has body: This simple code allows me to display a list of items in an array, and to delete a chosen item from the array, and finally display a new list without the deleted item. var carBrands = ["Toyota", "Honda", "BMW", "Lexus", "Mercedes","Peugeot","Aston Martin","Rolls Royce"]; var html=""; var newList=""; var itemToRemove; $(document).ready (function () { console.log("Ready to go!"); $("#displayList").bind('click', function(event) { displayList(); }); $("#removeItem").bind('click', function(event) { item = document.getElementById("input").value; removeItemFromList(item); }); }); function displayList() { for (var i = 0; i &lt; carBrands.length; i++) { html+= "&lt;li&gt;" + carBrands[i] + "&lt;/li&gt;"; document.getElementById("list").innerHTML=html; } } function removeItemFromList(item) { itemToRemove = item; for (var i=0; i&lt;carBrands.length; i++) { if (itemToRemove == carBrands[i]) { carBrands.splice(carBrands[i], 1); } newList+= "&lt;li&gt;" + carBrands[i] + "&lt;/li&gt;"; document.getElementById("newList").innerHTML=newList; } } This works fine on the first try, but if i try again the new list is appended to the old list and the item i removed initially is also added to it. My Question: How do i display the list without the removed items? Are html and newList objects?
accepted answer: http://stackoverflow.com/a/25222915
type: Question
tagged with: arrays
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/25222922
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/25222922
has answer: http://stackoverflow.com/a/25222915
favorite count: 0
upvote count: 2
has title: Remove item from Javascript array and display new array

http://stackoverflow.com/comment/39110248
comment on: http://stackoverflow.com/q/25127500
score: 0
has text: Why would it toggle back? You have no code that does so.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39026433
type: QuestionComment
has text: Do you have an element with `id="game"` in your HTML? After you've declared `canvas_holder` in the code, what is output in the console if you wrote `console.log(canvas_holder);`?
comment on: http://stackoverflow.com/q/25082864
score: 0
type: Comment

http://stackoverflow.com/q/25157749
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25157995
has title: Filtering a js query with the style
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25157799
score: 1
type: Question
has answer: http://stackoverflow.com/a/25158003
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have a html table element in which I hide all tr and I want to get all hide tr elements with this query : document.querySelectorAll("tr[style='display: none']"); But this query returns a empty List and I don't understand why. Is my selection is wrong or it isn't possible to get tr element like that ? Thanking in advance

http://stackoverflow.com/a/25116134
has body: You can use what's called "traditional event registering", which is what @user3218194 commented and Tsalikidis answered. But it's not recommended in modern web development, because it mixes the presentation and the logic of the page, and caused a lot of maintenance problems in the past (not to mention the inability to register more event listeners for the same event type). If you really can't stand registering your listeners, use event delegation: &lt;button data-behavior="click_me" type="button"&gt;&lt;/button&gt; jQuery: $(document).on("click", "button[data-behavior='click_me']", function() { // Note: when using event delegation in jQuery, the keyword 'this' refers to the // target element, not the element 'on' has been called on (document in this case) alert("Hello, " + this.tagName); // should alert "Hello, BUTTON" }); If you do this once and for all, even newly added buttons with data-behavior="click_me" will trigger the event listener. This way, you've attached to your element a semantic attribute, which is then managed by your script.
answers question: http://stackoverflow.com/q/25115842
upvote count: 3
has comment: http://stackoverflow.com/comment/39088339
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 3
accepted answer of: http://stackoverflow.com/q/25115842

http://stackoverflow.com/comment/39302139
type: Comment
has text: That does not seem to work either. Its weird its not even giving me any errors, if I write nonsense into Chat.php or auto_chat.php. Could that mean that Im not connecting to the source properly?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25225242

http://stackoverflow.com/a/25111797
type: Answer
accepted answer of: http://stackoverflow.com/q/25111720
score: 0
answers question: http://stackoverflow.com/q/25111720
type: AcceptedAnswer
has body: Your expiration date is a string, not a native Date object. Use Date.parse to convert the string to a Date object and then you can compare them. Like so: var now = new Date().valueOf(); var exp = Date.parse(expirationDate).valueOf(); if (exp - now &gt; 0) { return false; } else { return true; }

http://stackoverflow.com/comment/85422844
comment on: http://stackoverflow.com/a/40959313
score: 0
type: AnswerComment
type: Comment
has text: @MuhammadOmerAslam Nah! As it doesn't fulfill my requirement

http://stackoverflow.com/q/25139049
has comment: http://stackoverflow.com/comment/39209013
possible better answer: http://stackoverflow.com/a/25139660
has body: I'm trying to use the property overflow: visible on SVG. It's displaying well but there is an issue : When I try to put an event on the element that is out of the SVG, it doesn't work. It's like the svg element is behind the other elements. I've tried to play with z-index but it doesn't work. I would rather prefer to don't use the viewBox in that answer Overflow: Visible on SVG. Here is the code : HTML Blabla CSS svg { overflow: visible; } circle { fill: black; } circle:hover { fill: red; } Here is the jsfiddle When I click on the first circle that overflows the SVG it's not displaying the alert. But for the one, that is inside the SVG it works. The problem appears to be only in Chrome. On Firefox and IE it's working.
type: Question
has answer: http://stackoverflow.com/a/25139660
accepted answer: http://stackoverflow.com/a/25139354
upvote count: 5
tagged with: javascript
has title: SVG overflow visible in chrome but behind elements
answer count: 2
score: 5
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/12326838
has comment: http://stackoverflow.com/comment/39205486
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25139354
tagged with: css
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/svg

http://stackoverflow.com/q/25184755
has answer: http://stackoverflow.com/a/25184833
has comment: http://stackoverflow.com/comment/39215413
type: Question
has answer: http://stackoverflow.com/a/25184880
score: 5
has comment: http://stackoverflow.com/comment/39215368
upvote count: 5
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/8916360
has body: I am doing a multilingual website using HTML, CSS, PHP and JS, so the text might be in English or France according to user input as am pulling the data from DB. Is there a way in CSS that automatically checks if the text is in English so it will apply the embedded English's font, and if its in France it will apply the embedded France's font. if I previously know the language i would apply some CSS class to the text HTML element for example &lt;p class="en"&gt;&lt;/p&gt; or &lt;p class="fr"&gt;&lt;/p&gt;. But I don't know the language as the text coming from DB.
has title: Have two CSS embedded languages style in web page for different text lang type
possible better answer: http://stackoverflow.com/a/25184880
accepted answer: http://stackoverflow.com/a/25184833
answer count: 2
has comment: http://stackoverflow.com/comment/39215464
favorite count: 0
has comment: http://stackoverflow.com/comment/39215419
tagged with: http://stackoverflow.com/tag/html
tagged with: php
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39215357

http://stackoverflow.com/a/25196468
has comment: http://stackoverflow.com/comment/39237785
score: 0
type: AcceptedAnswer
has body: Supress from nav and ul height: 28px; Add overflow: auto; To your ul element. That will prevent your tab links to disapear. If you want them to stay in a line, you will need to set to your ul element min-width property like this: min-width: 800px;
accepted answer of: http://stackoverflow.com/q/25196273
has comment: http://stackoverflow.com/comment/39238156
type: Answer
answers question: http://stackoverflow.com/q/25196273

http://stackoverflow.com/a/25162652
has comment: http://stackoverflow.com/comment/39176522
has comment: http://stackoverflow.com/comment/39174944
has comment: http://stackoverflow.com/comment/39174784
accepted answer of: http://stackoverflow.com/q/25162596
answers question: http://stackoverflow.com/q/25162596
has body: You could try the below command, myVal.split(/[\r\n]+/g) [\r\n]+ Matches one or more new line or carriage return characters.split function splits the input string based on this pattern.
has comment: http://stackoverflow.com/comment/39174743
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39176320
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39174980
upvote count: 2
has comment: http://stackoverflow.com/comment/39176039

http://stackoverflow.com/comment/39285564
comment on: http://stackoverflow.com/a/25221821
score: 0
type: Comment
has text: @danbal: Yeah, I'm not 100% sure that the first and fourth bullets in that list are quite accurate. I suspect the issues related to the first and fourth bullets are simply down to timing: If your code is running after the browser has created the `img` element (as it must be, to hook an event on it) and that `img` element's `src` is set, you have to assume that the `load` event may have *already* been fired. :-) I'm reasonably certain that if you get an `img` element that doesn't yet have a `src`, hook `load`, and set the `src`, you'll see the event reliably (or the `error` event, of course).
type: AnswerComment

http://stackoverflow.com/a/25153520
has comment: http://stackoverflow.com/comment/39157914
has comment: http://stackoverflow.com/comment/39158055
upvote count: 1
downvote count: 1
score: 0
has body: "My name is Aditya Kumar".split(' ');//["My", "name", "is", "Aditya", "Kumar"]
type: Answer
answers question: http://stackoverflow.com/q/25153474

http://stackoverflow.com/comment/39249396
type: Comment
score: 0
has text: Not sure, I don't have IE8 to test, are there any errors?
comment on: http://stackoverflow.com/q/25200646
type: QuestionComment

http://stackoverflow.com/a/25167374
score: -1
downvote count: 1
upvote count: 0
has body: Change your code to use the one method: $('#newTest').one("click", function() { var newDiv = " Click Me "; $('#container').append(newDiv); apply_click(); }); The .one() method is identical to .on(), except that the handler is unbound after its first invocation. http://api.jquery.com/one/
answers question: http://stackoverflow.com/q/25167313
type: Answer

http://stackoverflow.com/comment/55515202
type: QuestionComment
has text: @Bergi Hmm. Given the context in which he found this code, you're clearly right that the code the OP was reading was using the JS 1.7 feature, but I think the OP in this case has come across this syntax and *doesn't know* which version of the syntax he's seeing. Wouldn't it be more useful to have a comprehensive duplicate target that explains that there are two specifications that introduce the syntax (as well as any differences between the two, although I think they're identical and the ES spec just copied the JavaScript 1.7 version exactly)?
type: Comment
comment on: http://stackoverflow.com/q/25187903
score: 0

http://stackoverflow.com/q/25097339
has answer: http://stackoverflow.com/a/25097747
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39053489
accepted answer: http://stackoverflow.com/a/25097450
has body: I have a button that when pressed will create a table in the database. I tried this index.html Carregar Base de Dados dash.js $('#loadButton').click(function() { $.ajax({ url: 'connectdb.php' }); }); connectdb.php <?php $server = 'localhost'; $user = 'root'; $password = '*****'; $database = 'test'; $con = mysql_connect($server, $user, $password, $database); if (!$con) { die('error: ' . mysql_error($con)); } // Create table $sql="CREATE TABLE Post( id_post int Primary Key, titulo varchar(100) not null, imagem longblob, descricao varchar(1000) not null, hashtag varchar(100) not null )"; // Execute query mysql_query($con,$sql)) ?> ?> but when I check my database table was not created. I'm new in jquery, what I'm doing wrong. can someone help me?
score: 0
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25097418
tagged with: javascript
has comment: http://stackoverflow.com/comment/39053396
has title: How to create a table in database using jquery
answer count: 3
has answer: http://stackoverflow.com/a/25097450
tagged with: jquery
has comment: http://stackoverflow.com/comment/39053376
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25097747
tagged with: php

http://stackoverflow.com/comment/39367674
type: Comment
has text: Thanks Roshan..Itz Working For Me..:)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25199235

http://stackoverflow.com/comment/39299851
type: Comment
type: AnswerComment
score: 2
comment on: http://stackoverflow.com/a/25229682
has text: I do not get it. Is there a downvote-outbreak? This is too a valid answer.

http://stackoverflow.com/comment/39279265
comment on: http://stackoverflow.com/a/25217683
score: 0
type: AnswerComment
has text: @AndrewWalker in this case, you need to decide whether you want to load next/prev pages via Ajax. If Ajax is disabled, `$.mobile.pageContainer.....("change")` isn't what you need, `window.location.href="file.html"` is the function you need. Also, you should add a custom attribute to page div that holds value of next/prev page, e.g. `data-next="foo.html"` and `data-prev="bar.html"`.
type: Comment

http://stackoverflow.com/comment/39135627
has text: Unfortunatly this method will always show and hide the panels on the first user control of the page, never the second.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25140277
type: AnswerComment

http://stackoverflow.com/comment/39035703
score: 0
type: Comment
type: QuestionComment
has text: possible duplicate of [jquery find closest previous sibling that does not have class](http://stackoverflow.com/questions/19723221/jquery-find-closest-previous-sibling-that-does-not-have-class)
comment on: http://stackoverflow.com/q/25087538

http://stackoverflow.com/q/25192309
upvote count: 3
type: Question
type: AnsweredQuestion
score: 3
has body: I'm using ng-strap's modal, alert, and aside. They are all working fine by themselves, but when I try to put an alert or modal inside an aside, it gives me this error: Uncaught TypeError: Cannot read property 'length' of undefined. Here's a plunkr: http://plnkr.co/edit/vLbDAarzpbT3qk0aNw12?p=preview I used the exact same code (copied & pasted) for the modal/alert buttons in and outside of the aside. Modal! Alert! How can I resolve this?
has comment: http://stackoverflow.com/comment/39254924
accepted answer: http://stackoverflow.com/a/25205909
has comment: http://stackoverflow.com/comment/39255977
tagged with: modal-dialog
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25205909
has title: Cannot read property 'length' of undefined in aside
tagged with: angularjs

http://stackoverflow.com/a/25071470
type: AcceptedAnswer
has body: Ractive array modification is explained in detail in the docs here. As part of tracking array modification, the array methods are wrapped and: Ractive adds a (non-enumerable, in modern browsers) _ractive property to arrays, which contains information about which Ractive instances depend on the array, and which keypaths it is assigned to. You can stop array modification by using modifyArrays: false, but you then need to call ractive.update yourself, or you can use the ractive array modification methods like ractive.push(array, item) (an additional advantage being that this call returns a promise called when transitions if any complete, if that is relevant to your use).
upvote count: 3
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25071156
score: 3
answers question: http://stackoverflow.com/q/25071156

http://stackoverflow.com/a/25101531
score: 1
has body: First of all, what you have is an Array of numbers. In order to get all the numbers together, you can join them like this var res = [1, 6, 3, 7, 3]; console.log(res.join("")); # 16373 But the result will be a string. If you want to convert that to a number, you can simply use unary + operator, like this var res = +[1, 6, 3, 7, 3].join(""); console.log(res, typeof res); # 16373 'number'
answers question: http://stackoverflow.com/q/25101518
downvote count: 0
type: Answer
upvote count: 1

http://stackoverflow.com/comment/39217850
comment on: http://stackoverflow.com/q/25185566
has text: I forgot a `#` to mean "by Id" in the search... but try to create a jsfiddle in order to allow us to test it
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25115075
has body: You are not closing &lt;script&gt; tag. That is the problem. &lt;script&gt; function change(){ document.getElementById("test").innerHTML = "text &lt;/br&gt;"; } &lt;/script&gt; &lt;!-- it should be closing tag --&gt; &lt;div id="test"&gt;&lt;/div&gt; &lt;input type="button" onclick="change();" value="Change content"&gt; Better to remove language attribute because now in HTML5 it's deprecated.
upvote count: 2
downvote count: 1
answers question: http://stackoverflow.com/q/25115050
score: 1
type: Answer

http://stackoverflow.com/comment/39187898
has text: you can use a resolve(strPath, obj) function, i've posted them before...
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25169513
score: 0

http://stackoverflow.com/a/25133226
has body: Please provide with more details, like jsFiddle. I can suggest two possible solutions. Try to add $scope.$apply() after you set the array. Possible you modified the value outside angular life circle and angular is not knowing the modification. So just use apply to let angular know it. You are not modifying anything under $scope, any model should be under $scope. In your case you usevar cartItems = [];The right way is to define$scope.cartItems and use it. And they might not work, and you should always post with more details like your entire controller codes or related codes.
score: 0
answers question: http://stackoverflow.com/q/25132657
type: Answer
has comment: http://stackoverflow.com/comment/39120391

http://stackoverflow.com/a/25119623
answers question: http://stackoverflow.com/q/25119337
has body: You can try something like this: $(this).parents(".link-test").next(".link-text").children(".and_text").text('');
type: Answer
score: 0

http://stackoverflow.com/q/25206533
has answer: http://stackoverflow.com/a/25206845
tagged with: javascript
has answer: http://stackoverflow.com/a/25206608
answer count: 3
downvote count: 0
has body: I have a div that needs to be given a width. i.e. A width must be manually set, either via CSS or via an inline style (Google Maps requires a set width and I'm trying to implement a fail safe, so to speak. If a developer messes up and fails to specify the width, I'd like to set a default width). In my JS, I am checking like so: var width = document.getElementById(this.divId).clientWidth; Unfortunately, this is giving me back 1920px, even though a width has not been set (I understand why this is happening). Is there a way to check if the width has been manually specified or not? PS: I would like to do this without the aid of libraries such as JQuery.
linked to: http://stackoverflow.com/q/4105355
has title: Get "set" width of a given element
has comment: http://stackoverflow.com/comment/39257472
favorite count: 0
has comment: http://stackoverflow.com/comment/39257034
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/25206717
score: 2
upvote count: 2
type: Question

http://stackoverflow.com/q/25214650
has title: how to connect data from a drop down list to data from a input text in javascript
has comment: http://stackoverflow.com/comment/39272164
has answer: http://stackoverflow.com/a/25214718
score: 0
tagged with: validation
has comment: http://stackoverflow.com/comment/39272065
answer count: 1
has comment: http://stackoverflow.com/comment/39271977
has comment: http://stackoverflow.com/comment/39271998
type: UnansweredQuestion
tagged with: input
has comment: http://stackoverflow.com/comment/39272141
has body: Say I have this problem using forms Your Card's Number: Type of Credit Card: -- choose one -- Visa Master JCB this is my html code i want to get the value of the credit card number in order to validate it using javascript function validateCard() { var card = document.getElementById("typeCard").value; var cardNum = document.getElementById("card_num").value; document.write(cardNum); if (card === "Visa") { alert("hey"); } else if (card ==="Master") { alert("hoy"); } else if (card ==="JBC") { alert("hoy"); } } this is my javascript code it doesn't work with the var cardNum = document.getElementById("card_num").value; document.write(cardNum); code, can anyone help me I've googled it, but I can't have any solutions.
has comment: http://stackoverflow.com/comment/39272036
tagged with: forms
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39272111

http://stackoverflow.com/q/25093465
has comment: http://stackoverflow.com/comment/39408405
has comment: http://stackoverflow.com/comment/39062245
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39092320
has comment: http://stackoverflow.com/comment/39062284
tagged with: jsfl
has comment: http://stackoverflow.com/comment/39055397
tagged with: flash
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39047073
has comment: http://stackoverflow.com/comment/39088634
has title: JSFL spritesheetexporter BUG
has comment: http://stackoverflow.com/comment/39088557
has comment: http://stackoverflow.com/comment/39124837
has answer: http://stackoverflow.com/a/25291803
has body: I'm using jsfl to create my own customized spritesheet exporter. I'm using the fl.spritesheetexporter class. For some reason, every time I try to insert a name in the addSymbol method: var exporter=new SpriteSheetExporter(); var obj=selection[i].libraryItem; var name = "movieclip"; exporter.addSymbol(item,name); I get an error: "Argument number 1 is invalid"; when i try only addSymbol(item) without parameters, it works fine and exports the spritesheet. What should I do?
has comment: http://stackoverflow.com/comment/39409107
tagged with: actionscript-3
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/39204944
comment on: http://stackoverflow.com/q/25179078
has text: Are there scrollbars which may make the actual viewport resolution smaller than `2300x1914`?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25078511
downvote count: 0
has title: differences between onload, onunload, onbeforeunload
tagged with: javascript
has comment: http://stackoverflow.com/comment/39020507
has comment: http://stackoverflow.com/comment/39021689
has comment: http://stackoverflow.com/comment/39018512
has comment: http://stackoverflow.com/comment/39019723
accepted answer: http://stackoverflow.com/a/25078661
possible better answer: http://stackoverflow.com/a/25078969
tagged with: onbeforeunload
favorite count: 0
has answer: http://stackoverflow.com/a/25078661
upvote count: 1
tagged with: onload
linked to: http://stackoverflow.com/q/1197575
type: AnsweredQuestion
has body: I might be creepy but I am testing something and I kind of don't understand the purpose of there three events... so here is my testcode: it desn't matters I use first way or second way, but anyways I posted both... What I am saying, that output depend on the order of //first way code or //second way code, which listener is added first, that function's message is displayed first... you can try swapping places... but time is all the same (you can increase interval or alert something for better view), that makes me think that all three events behave same... Note: I've tested this only for chrome my extra question is: How can I differ whether user just opened my site or reloaded? if you have some kind of advices about my extra question, I would be grateful...
score: 1
has comment: http://stackoverflow.com/comment/39020018
linked to: http://stackoverflow.com/q/5004978
has answer: http://stackoverflow.com/a/25078969
type: Question
has comment: http://stackoverflow.com/comment/39020823
answer count: 2

http://stackoverflow.com/comment/39030469
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25084897
has text: I am inspecting, however there are no error messages. `li` elements will be rendered after the page load normally, except that turbolinks will let them static and refresh only the yield part, am I wrong about turbolinks?
type: AnswerComment

http://stackoverflow.com/comment/39037439
type: QuestionComment
has text: @pankajparkar: you should post that as an answer.
score: 0
comment on: http://stackoverflow.com/q/25088400
type: Comment

http://stackoverflow.com/a/25113246
type: AcceptedAnswer
has body: You'd have to change the speed mechanism of the fish, By lowering the number you multiply with changing this.speedX= (tx/dist) * 1 into this.speedX=(tx/dist) * 0.1 should reduce the speed by 10 times
type: Answer
accepted answer of: http://stackoverflow.com/q/25113110
score: 0
answers question: http://stackoverflow.com/q/25113110

http://stackoverflow.com/comment/39163886
comment on: http://stackoverflow.com/a/25129787
has text: to be more specific on the error from your code, the chart is only showing numbers in sequential order, i.e: 1, 2, 3, 4, 5, 6
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25124811
upvote count: 1
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/39104854
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25128911
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39104940
type: AnsweredQuestion
downvote count: 0
tagged with: twitter-bootstrap
score: 1
has answer: http://stackoverflow.com/a/25128911
has comment: http://stackoverflow.com/comment/39105705
type: Question
has comment: http://stackoverflow.com/comment/39105133
tagged with: javascript
has body: Bootply Link So the test link works, then when after you click the x, you can not toggle it back on without refreshing the page. What am I doing wrong?! Alert HTML &lt;div class="alert alert-dismiss" id='alert' style="margin-top: 54px; margin-bottom: -54px;"&gt; &lt;a href="#" class="close" data-dismiss="alert"&gt;&amp;times;&lt;/a&gt; &lt;div class='alertMessage'&gt;&lt;/div&gt; &lt;/div&gt; Alert JS: $(function(){ $('#updateAlert').click(function(){ $.ajax({ type: "GET", url: "update_alert.php", dataType: "json", success: function(data) { $("#alert").addClass(data.statusClass); $(".alertMessage").html(data.responseMessage); $(".alert").show(); } }); return false; }); }); $(".close").click(function(){ $(".alert").hide(); }); $(document).ready(function(){ $('.alert').hide(); });
has title: Bootstrap Alert will toggle between .show() after .hide()

http://stackoverflow.com/a/25129215
score: 4
answers question: http://stackoverflow.com/q/25129167
has comment: http://stackoverflow.com/comment/39114769
has comment: http://stackoverflow.com/comment/39113205
has comment: http://stackoverflow.com/comment/39118409
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: It's actually really simple with jQuery Ajax. $.ajax({ url:"data/retrieve", success:function(result){ //call your function Function2(result); }}); Have a look at jQuery Ajax documentation here: http://api.jquery.com/jquery.ajax/ Edit: Since you're using GET as your request type, why not use jQuery.get? Here, you can use this code. Simple and clean. Also, don't forget to mark this as the answer if it works for you. We don't want answer-less questions here at StackOverflow, do we? $(document).ready(function(){ $(".data").blur(function(){ var id = $(this).attr('id'); var value = $(this).html(); var ad = id.split(';'); Update(value, id); }); }); function Update(value, id){ $.get("update.php", {value: value, id: id}, function (data) { //call your function Function2(data); }); } function Function2(ad){ var name_1 = $("#name_1").html(); //This part is updated inside a &lt;span&gt; by the Ajax function $('#'+ad).html(name_1); }
accepted answer of: http://stackoverflow.com/q/25129167

http://stackoverflow.com/comment/39091171
type: Comment
comment on: http://stackoverflow.com/a/25111329
type: AnswerComment
has text: I edited my code. Old way: 7200 elements with `~3380ms` . String way: 7200 elements with `~2670ms`. 1s less. Not big difference like others had, but still better. Thanks for help :)
score: 0

http://stackoverflow.com/comment/39061441
type: Comment
type: QuestionComment
has text: _unobtrusivify_ - is this a word?
comment on: http://stackoverflow.com/q/25101662
score: 0

http://stackoverflow.com/comment/39218562
comment on: http://stackoverflow.com/q/25185876
has text: If someone here has enough votes to undelete @tymeJV's answer, I edited it to fix the quote issue.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25197721
downvote count: 1
has body: You have missed a comma after state: status
accepted answer of: http://stackoverflow.com/q/25197567
upvote count: 1
answers question: http://stackoverflow.com/q/25197567
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/comment/39243908
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25199310
type: Comment
has text: Image loader looks interesting - what if preloading all 10 images takes 20 seconds, is the user waiting 20 seconds to see anything?

http://stackoverflow.com/comment/39088411
has text: Maybe in your ajax request, try adding crossDomain: true.
comment on: http://stackoverflow.com/q/25116176
score: 0
type: Comment
type: QuestionComment

list
type: Tag
tags question: http://stackoverflow.com/q/25170426
tag name: list

http://stackoverflow.com/comment/39147961
score: 0
has text: Sorry I am probably not very accurate.. In fact I need an iframe to "isolate" the content. The main page is running with a private angularjs framework and is supposed to allow people to test the different angularjs directives with different version of the framework, so I absolutely need an iframe to make this possible.. Basically the user choose in a select the version with which he wants to test the html he just typed. Do you understand?
comment on: http://stackoverflow.com/q/25147588
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39191830
type: QuestionComment
has text: The function declaration (`function orderSummary(){`) does not be inside the function, just the call at the end -> `orderSummary()`.
comment on: http://stackoverflow.com/q/25171125
score: 0
type: Comment

http://stackoverflow.com/a/25100824
type: AcceptedAnswer
upvote count: 3
type: Answer
accepted answer of: http://stackoverflow.com/q/25100808
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25100808
has body: Yes, try to avoid libraries while you learn JavaScript well. But one caveat, jQuery will make your life a lot easier for things like browser compatibility. And it can be very useful for semi-complicated stuff like animations. The best tips for learning JavaScript are to check out Doug Crockford's videos on YouTube, and if you want to get right in at the nuts and bolts of the language, then pick up a copy of The Definitive Javascript, which Doug Crockford admits is the best book available on the subject. http://www.amazon.co.uk/JavaScript-Definitive-Guide-David-Flanagan/dp/0596101996 See this vid to get you started: http://www.bing.com/videos/search?q=Doug%20Crockford&amp;qs=n&amp;form=QBVR&amp;pq=doug%20crockford&amp;sc=2-14&amp;sp=-1&amp;sk=#view=detail&amp;mid=2AC2E38A0E1544A05C782AC2E38A0E1544A05C78 And good luck. You'll love JavaScript if you learn it properly.

http://stackoverflow.com/q/25196495
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25196562
type: UnansweredQuestion
upvote count: 0
downvote count: 2
type: Question
has title: mouseover event remain open even after open it in new window in javaScript with Ajax
has comment: http://stackoverflow.com/comment/39238901
has body: May be my question title is unclear but here is detail explanation. I created calender with fusion of Ajax, JavaScript in Classic Event. in such a way, so that if user mouse over on any date of calender then ajax call and a small pop-up open as it show day time table of that date. now when i click it on that date it will open in new window, and that is okay that i wrote. But the problem is when i open it in new window that date schedule, even after it for few second that pop-up of ajax will remain(like mouseover event remain in execution). and i don't want it. If i open that date schedule in new window than it must be stop the execution of that mouseover event. Suggestion are welcome, i don't know it may be my code problem or it may be browser problem or it may be event problem. And yes, my whole web application is written in classic asp.
score: -2
tagged with: javascript
answer count: 1

http://stackoverflow.com/q/25084598
answer count: 0
has comment: http://stackoverflow.com/comment/39029707
tagged with: jquery
has body: I have a select and I want to clone it, then append after it with the same selected option. HTML test0 test1 test2 javascript (function($){ $('select').change(function(){ $clone = $(this).clone(); $(this).after($clone); }); })(jQuery) jsFiddle http://jsfiddle.net/willHsu/3tRR9/ The way I find is to use var value = $(this).children('option:selected').val(); to find the value then choose as a selected option. So I know the way to solve it. but I still wonder why clone() method can't copy the selected option status? can anyone give me a reasonable explanation?
type: Question
tagged with: http://stackoverflow.com/tag/html
has title: Why select option value is not selected after clone it?
score: 0
has comment: http://stackoverflow.com/comment/39030593
linked to: http://stackoverflow.com/q/742810
tagged with: clone
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39030289
duplicate of: http://stackoverflow.com/q/742810

http://stackoverflow.com/q/25193042
upvote count: 4
has comment: http://stackoverflow.com/comment/39231489
has answer: http://stackoverflow.com/a/25193108
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: clearinterval
has answer: http://stackoverflow.com/a/25193142
accepted answer: http://stackoverflow.com/a/25193142
has comment: http://stackoverflow.com/comment/39233451
tagged with: setinterval
has title: Should I call clearInterval() before calling setInterval()
has comment: http://stackoverflow.com/comment/39231488
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25193108
has comment: http://stackoverflow.com/comment/39232321
has comment: http://stackoverflow.com/comment/39236923
type: Question
has body: In several places in our code we do something like this: eventGrabber.poller = setInterval(grabEvents, 50); to call the grabEvents method every 50 ms. However, since we do it in more than one place I am wondering if grabEvents is being called more often then every 50ms. In other words if I did this: eventGrabber.poller = setInterval(grabEvents, 50); //wait 25 ms here eventGrabber.poller = setInterval(grabEvents, 50); Would there now be two timers running calling grabEvents every 25 ms (one of which we could never stop because we lost its handle)? Would changing all of our calls to something like this solve this problem (if it really is a problem): //if there is a timer running clear it out first clearInterval(eventGrabber.poller); //if poller is null does it matter?? //now start the timer eventGrabber.poller = setInterval(grabEvents, 50);
score: 4

http://stackoverflow.com/q/25149767
has answer: http://stackoverflow.com/a/25149856
tagged with: html-lists
has answer: http://stackoverflow.com/a/25150055
possible better answer: http://stackoverflow.com/a/25149856
has title: Scattered unordered list
tagged with: screen-positioning
has comment: http://stackoverflow.com/comment/39151363
has body: I have an unordered list that I'm hoping to add the effect that when something is appended to it, it appears in a random position on the screen every time. However, since it's text in the list, I can't have each random position overlap. The text that gets appended will have a fadeout timer of 5 seconds, so once the message has faded out, that space will become available. Is this possible? If so here is the HTML I'm using: &lt;ul id="messagebox" &gt; &lt;/ul&gt; &lt;div&gt; &lt;input type="text" id="typetextbox" maxlength="120" autocomplete="off" /&gt; &lt;button type="submit" id="submit" onblur="submit"&gt; &lt;/button&gt; &lt;/div&gt; Here's the Javascript/jquery: $(document).ready(function(){ $('#typetextbox').keypress(function (e){ if(e.keyCode == 13 ) $('#submit').click(); }); $('#submit').click(function(){ var message = $('#typetextbox').val(); if (message.replace(/ /g, '')) $('#messagebox').append(message + "&lt;br/&gt;"); $("#typetextbox").val(""); }); }); If not, what can I do to get that effect? Thanks guys!
accepted answer: http://stackoverflow.com/a/25150055
type: Question
type: AnsweredQuestion
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
tagged with: scatter

http://stackoverflow.com/a/31217502
has body: No need of any function definition in controller angular.module('checkboxExample', []) .controller('ExampleController', ['$scope', function($scope) { $scope.checkboxModel = { value1 : true, value2 : 'YES' }; }]); Value1: Value2: value1 = {{checkboxModel.value1}} value2 = {{checkboxModel.value2}}
answers question: http://stackoverflow.com/q/25080212
score: 0
type: Answer

http://stackoverflow.com/comment/39286838
type: QuestionComment
comment on: http://stackoverflow.com/q/25222638
has text: I've tried now and still not working.
score: 0
type: Comment

http://stackoverflow.com/comment/39195305
has text: This seems rather pointless … if you set a cookie, then they will most likely just delete that cookie and try again. If it even gets that far … I’d assume kids are smart enough to pick a fake, “older” birth date from the start.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25173412

http://stackoverflow.com/comment/39300334
type: AnswerComment
has text: ok, i do that, thanks
comment on: http://stackoverflow.com/a/25224779
type: Comment
score: 0

http://stackoverflow.com/comment/39267390
score: 0
comment on: http://stackoverflow.com/q/25212135
type: Comment
type: QuestionComment
has text: No worries. Fresh eyes can make all the difference. :)

http://stackoverflow.com/q/25142107
linked to: http://stackoverflow.com/q/1068280
type: Question
has answer: http://stackoverflow.com/a/25142745
has comment: http://stackoverflow.com/comment/39136517
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25142335
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39136740
has title: what's wrong with my regex expression?
has comment: http://stackoverflow.com/comment/39139500
has comment: http://stackoverflow.com/comment/39136587
tagged with: regex
has body: I have a string trackingObj which stores a collection of information.(HTML codes, but there are many characters like \r\n inside the codes, for example: \r\n I'd like to get following content from that giant string: aaa bbb ccc ddd eee fff ggg I tried to append the whole string to DOM using html() but there are illegal characters inside it, so I couldn't use jQuery to perform DOM manipulation. just thinking about using pure regex to get what I need. I tried following: var Info = new RegExp(" \sid='theTrackInfo'>[\s\S]*?\/td>", "g"); var InfoHtml = theTrackInfo.exec(trackingObj); console.log(InfoHtml); I also tried: var InfoHtml = trackingObj.match(/ \sid='theTrackInfo'>[\s\S]*?<\/td>/gi); console.log(InfoHtml); doesn't work. What I am missing? =================UPDATE========================== Hi everyone, thank you for all of your answers. I tried using DOMParser to make it work finally: var parser = new DOMParser(); var html = parser.parseFromString(ProcessedStrings,"text/html"); var info = $(html).find("#theTrackInfo"); console.log($(info).html()); Some one may say jQuery should do same thing. the problem is that, the trackingObj is retrieved by using ajax call and when I try to use jQuery append method it append to DOM, in console, it said: "Unexpected token ILLEGAL" But I will still choose a regex answer as correct answer for this question. ==================update 2============ Hi, I examined Tom Fenech's approach, it works for me too. probably the error is caused by trying to append the codes to a div. nothing to do with jQuery itself.
has answer: http://stackoverflow.com/a/25142335
has comment: http://stackoverflow.com/comment/39136401
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25142745

http://stackoverflow.com/a/25205634
has comment: http://stackoverflow.com/comment/39380696
downvote count: 0
answers question: http://stackoverflow.com/q/25205208
has body: To change specific element style by screen size you can use media queries. for example: &lt;button class="btn dynamic-button"&gt; css: @media (max-width: @screen-xs-max) { .dynamic-button { height: 20px; } } @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) { .dynamic-button { height: 40px; } }
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/39255258
score: 2

http://stackoverflow.com/comment/39097506
comment on: http://stackoverflow.com/q/25119253
has text: Reason for downvote please? I explained myself well first time, provided code and shared my attempt.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25195813
has comment: http://stackoverflow.com/comment/39236708
has body: I want to know how to select Highlighted text using JQuery selector. For example, to select elements with a class, you use .class, for IDs, you use #id. What do I use for highlighted text so that I can (for example) hide them: $("Highlighted text").hide(); What is the highlighted text selector, and how to hide highlighted text?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39237233
downvote count: 0
linked to: http://stackoverflow.com/q/5379120
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: JQuery selector for highlighted text
has answer: http://stackoverflow.com/a/25195909
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39236608
upvote count: 2
has comment: http://stackoverflow.com/comment/39236686
has answer: http://stackoverflow.com/a/25196002
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39236587
score: 2

http://stackoverflow.com/a/27503260
answers question: http://stackoverflow.com/q/25120749
score: 0
type: AcceptedAnswer
type: Answer
has body: I Have Used jr-crop Plugin With Cordova Camera Plugin in Android &amp; iOS. Pinch To Zoom functionality Available in these plugin.
accepted answer of: http://stackoverflow.com/q/25120749

http://stackoverflow.com/comment/39050069
comment on: http://stackoverflow.com/a/25094826
type: Comment
has text: Ask it as a different question and don't forget to put a link to this question.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25106330
tagged with: web-audio-api
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25124381
has title: Using the WebAudio API, is polling the only way to observe changes to the value of an AudioParam?
type: AnsweredQuestion
has body: Am I correct in thinking that we are reduced to polling AudioParams to observe changes to their value? An AudioParam is created as a property of an AudioNode, eg: var gainNode = audioContext.createGain(); var param = gainNode.gain; The param is an object with a bunch of methods and properties for controlling the gain of the node. To observe changes, we need to observe the param's 'value' property. The problem is Object.observe fails silently: Object.observe(param, function(changes){ console.log(changes); }); Here the callback is never called. You can also reconfigure the 'value' property as a getter/setter and call the observing code whenever value is set – but that also fails silently. The property is configurable, and you can set a value on it, but the audio node does not appear to use the getter to get the value, so it doesn't use the value we set. I think it should be non-configurable for this reason. I can understand why these methods would be undesirable – AudioParam values can get updated at the sample rate, so these observers could potentially be called thousands of times per second. So the question is, are we reduced to polling to observe changes to the value of an AudioParam object (albeit on requestAnimationFrame, but still, polling), or is there a better way? (I asked this question a few days ago on the public-audio mailing list: http://lists.w3.org/Archives/Public/public-audio/2014JulSep/0054.html. No replies so far.)
upvote count: 2
type: Question
tagged with: observers
has comment: http://stackoverflow.com/comment/39073391
has answer: http://stackoverflow.com/a/25124381
score: 2
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/39119401
has text: yeah, this is the workaround, but i want to have a two way solution.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25132695
type: Comment

http://stackoverflow.com/a/25358102
answers question: http://stackoverflow.com/q/25219176
score: 6
upvote count: 7
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25219176
type: AcceptedAnswer
type: Answer
has body: Use following code to include javascript file in your code: $PAGE-&gt;requires-&gt;js() E.g $PAGE-&gt;requires-&gt;js( new moodle_url($CFG-&gt;wwwroot . '/local/my_localplugin/myjavascript.js'));
has comment: http://stackoverflow.com/comment/44029673

http://stackoverflow.com/q/25126532
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25126594
answer count: 1
tagged with: jquery-autocomplete
has body: I am trying get get TypeAhead functionality on a search textbox. I have 2 radio buttons on the form if one of them is selected I need the type-ahead functionality to add the ist of masters to the search box. //html &lt;li&gt; @Html.TextBox("SearchTitle") &lt;/li&gt; //JavaScript if ($('input[name=SearchType]:checked').val() == "m") { var availableMasters = ["ActionScript", "AppleScript", "Asp"]; $.ajax({ cache: false, type: "GET", url: "@(Url.Action("Get", "Masters"))", success: function (data) { availableMasters = data.list; }, error: function () { alert('No Master Available.'); } }); $("#SearchTitle").autocomplete({ source: availableMasters }); } My issue is that the form is binding the availableMasters before the ajax call, so the search textbox always has the static text array that I am adding at the begining with 3 fields. I am getting the correct list of masters in the (data.list) but it never shows up in the textbox. Is there a way to bind the list once the ajax call get the list of masters? Thanks for the concerns...
tagged with: ajax
has title: AutoComplete not working on the Search Box using Jquery
accepted answer: http://stackoverflow.com/a/25126594
type: AnsweredQuestion
type: Question
tagged with: jquery-ui

http://stackoverflow.com/q/25127819
answer count: 1
tagged with: events
has comment: http://stackoverflow.com/comment/39115182
upvote count: 3
has answer: http://stackoverflow.com/a/25130369
has comment: http://stackoverflow.com/comment/39111000
type: AnsweredQuestion
score: 3
has title: How do I prevent accidental altering of properties of an event in my custom event dispatching system?
tagged with: encapsulation
type: Question
has body: I have build a custom event dispatching mechanism. I'm trying to mimic the DOM event implementation as much as possible. It's still a draft, but works reasonably well so far. One thing that bothers me though, is that it's fairly easy for listeners of my events to alter particular properties of that event when they should actually be read-only for outsiders. I only want the actual EventDispatcher that is dispatching the event to be able to alter those properties. Now, I realise that basically any just about any user-space Javascript object is able to be altered, but that's not what I'm worried about. I want to prevent accidental altering of Event properties in listeners, e.g. by: function someListener( event ) { if( event.currentTarget = this ) { // whoops, we've accidentally overwritten event.currentTarget // do something } } The problem is, I have no clear idea (at least not without completely refactoring) on how to implement a reasonably robust solution to this problem. I've tried it (see the parts of the target, currentTarget and eventPhase setters of Event that are commented out in the code I provide beneath), but that failed miserably of course (it was not even viable to begin with). I hope, however, that from inspecting those parts you'll see what I'm aiming for and that perhaps you can offer a workable solution. It doesn't have to be airtight, just reasonably foolproof. I tried to imagine how DOM events implement this trickery (changing the event.currentTarget, etc.) and concluded that it probably is not implemented in (pure) Javascript itself, but under the hood. I'd really like to prevent cloning events, or similar implementation ideas, if possible, since DOM events don't seem to clone either when processing the event phases and visiting different listeners. Here's my current implementation: codifier.event.Event: codifier.event.Event = ( function() { function Event( type, bubbles, cancelable ) { if( !( this instanceof Event ) ) { return new Event( type, bub…
downvote count: 0
accepted answer: http://stackoverflow.com/a/25130369
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25170446
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25170313
has comment: http://stackoverflow.com/comment/39190382
answers question: http://stackoverflow.com/q/25170313
has body: Take a look at this article: http://davidwalsh.name/add-rules-stylesheets the file will need to get built on every page load, however. The problem with adding styles via script is that they get parsed REALLY late in the page build process, it will be a way better user experience for you to build a custom.php (or something) file and give that to every page - which it sounds like you're doing already. That will ensure it processes the styles before the scripts, avoiding a momentary style 'flash' where your script finishes executing and adds the new rules.
upvote count: 1

http://stackoverflow.com/comment/39290595
has text: I do not believe that the get the alert before you submit the form.
score: 0
comment on: http://stackoverflow.com/q/25214115
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25129710
has comment: http://stackoverflow.com/comment/39113965
has comment: http://stackoverflow.com/comment/39114038
type: Answer
score: 1
upvote count: 2
downvote count: 1
answers question: http://stackoverflow.com/q/25129670
has body: Try DEMO $("#sd").on("click",function(){ var myWindow = window.open('','','width=1250,height=1000,resizable=yes,fullscreen=yes').document.write("DDD"); }); use document.write() to add text on your newly created window.

http://stackoverflow.com/a/25156389
answers question: http://stackoverflow.com/q/25138102
type: Answer
has body: code in js $("#options").live("click", function () { debugger; $("#MoreOptionModal").dialog('open'); $.ajax({ url: "/Mail/GetClassListForTeacher", type: "POST", datatype: "json", data: { }, traditional: true, success: function (result) { $("#ForTest").val(result); var d = $("#ForTest").val().split(","); for (var i = 0; i &lt; d.length; i++) { //alert(d[i]) var trToAppend="&lt;tr&gt;&lt;td&gt;&lt;input type='radio' name='type' id='" + d[i] + "'/&gt;&lt;/td&gt;&lt;td&gt;&lt;label&gt;" + d[i] + "&lt;/label&gt;&lt;/td&gt;&lt;/tr&gt;"; $("#MyTest").append(trToAppend); } } }); }); and i add this line in view &lt;input id="ForTest" type="hidden" /&gt; i take the list then i split it then i append the html
score: 0

http://stackoverflow.com/a/25079253
answers question: http://stackoverflow.com/q/25079095
score: 0
has body: If you want to count only the object's own attributes try this: var count = 0 for (var key in obj) { if (obj.hasOwnProperty(key)) { count++; } } alert(count);
type: Answer

http://stackoverflow.com/comment/39157355
has text: The percent number can be parsed using the function parsefloat: `var f = parseFloat('0.5%'); // f becomes 0.5`
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25150500

http://stackoverflow.com/a/25076428
score: 3
has body: Just use split on the string. For example: var textarea = document.getElementById('list'); var arr = []; textarea.addEventListener('input', function () { arr = this.value.split('\n'); console.log(arr); }, false); Demo
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39014309
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25076300
answers question: http://stackoverflow.com/q/25076300

http://stackoverflow.com/comment/39087647
has text: can you change the code to if(err) { throw err; } and give us output of it? That will provide more info on what is wrong
comment on: http://stackoverflow.com/q/25115611
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/25216270
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25216360
has body: HTML: Apple Banana Orange Kiwi JavaScript: jQuery(function() { var opts = jQuery('#list option').map(function() { return jQuery(this).text(); }); jQuery('#findItem').keyup(function() { var rxp = new RegExp(jQuery('#findItem').val(), 'i'); var optlist = jQuery('#list').empty(); opts.each(function() { if(rxp.test(this[0])) { optlist.append(jQuery(' ').text(this[0])); } }); }); }); JSFIDDLE: http://jsfiddle.net/vou3oa58/ The instant search is working just fine, but the titles disappear because empty() just removes all parent and children elements inside the list. I want to keep groups while performing a search and displaying the matches.
type: Question
has title: Multiple select list instant search is working but need to keep tags

http://stackoverflow.com/comment/39041632
score: 1
type: QuestionComment
has text: I really cannot see any reason why adding the $.ajaxSetup would fire a completely unrelated function. You don't even call loading_on() inside or near any ajax. It really doesn't make sense like this - there isn't enough information to help you. $.ajaxSetup can't cause random execution of random code on random unrelated lines. There has to be some other place where these are related, and that's why we need more code to help. My first guess is that you are encoutering errors that prevent the execution of parts of your code. Have you checked the console log in the browser when you run this?
comment on: http://stackoverflow.com/q/25090585
type: Comment

http://stackoverflow.com/comment/39271871
type: Comment
comment on: http://stackoverflow.com/a/25214552
type: AnswerComment
has text: yep, gist is tree event driven between `events --> click` will +1 you as well
score: 0

http://stackoverflow.com/a/41250556
answers question: http://stackoverflow.com/q/25228394
type: Answer
has body: This is a version of this answer, https://stackoverflow.com/a/3903334/689223, with arrow functions. You can use the U or the Y combinator. Y combinator being the simplest to use. U combinator, with this you have to keep passing the function: const U = f =&gt; f(f) U(selfFn =&gt; arg =&gt; selfFn(selfFn)('to infinity and beyond')) Y combinator, with this you don't have to keep passing the function: const Y = gen =&gt; U(f =&gt; gen((...args) =&gt; f(f)(...args))) Y(selfFn =&gt; arg =&gt; selfFn('to infinity and beyond'))
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39212236
type: Comment
comment on: http://stackoverflow.com/a/25182872
type: AnswerComment
score: 2
has text: You really should use CSS for this. Anyway, I revised my answer.

http://stackoverflow.com/comment/39248109
type: AnswerComment
type: Comment
has text: updated my answer.. as per your requirement
comment on: http://stackoverflow.com/a/25201307
score: 0

http://stackoverflow.com/q/25117756
has answer: http://stackoverflow.com/a/25118386
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm very new to jQuery, JSON and APIs, and I'm trying to build a small web app that brings up local hospitals in the area when users type in a a service.type.name and a postcode. For example, "Hernia Repair in N77JN". I've got a small JSON file setup with some hospital objects that list their address and services. { "places":[ { "name": "The Whittington Hospital", "address": { "street": "Magdala Ave", "town": "Islington", "city": "London", "postcode": "N195NF" }, "service": [{ "type": [ { "name": "Hernia Repair" }, { "name": "Hip Replacement" }, { "name": "Crohn's Disease" }, { "name": "Pregnancy" } ] }] } ... ] } I'm trying to work out if I can use this UK Postcodes API to reference the addresses in my JSON file and return results based on if the postcode matches or is within 3 miles of the search query. Apparently, you can do this with this bit of code: http://uk-postcodes.com/postcode/nearest?postcode=n77jn&miles=3&format=json My HTML looks like this: And my JS like this: $(function() { var data; $.getJSON('data.json', function(jsondata) { data = jsondata; }); function performSearch(e){ e.preventDefault(); if (data == undefined) return; // do nothing if json is not yet loaded var search = $('#query').val(); var output=" Search results for " + search + " "; for (var i in data.places) { for (var ind in data.places[i].service[0].type) { if (data.places[i].service[0].type[ind].name == search) { output+=" " + data.places[i].name + " "; } else {} }; }; document.getElementById("main").innerHTML=output; }; $('#fetch').on('submit', performSearch); }); With my basic understanding of JS, I should be able to take a search like "Hernia Repair in N77JN", which is stored in the search variable and .split it at "in" search.split(" in "), which would separate that string into an array, giving me two values ("Hernia Repair", "N77JN"). Am I on the right track? I like to think I can then use those two values to look at the Postcode API and bring up results for hospitals in that area…
score: 0
has title: Search JSON name by Postcode API
type: UnansweredQuestion

http://stackoverflow.com/a/25161547
has comment: http://stackoverflow.com/comment/39172463
accepted answer of: http://stackoverflow.com/q/25161438
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39172499
has body: Just use an object: var arrPoints = {}; zoomToPoint('point_1'); function zoomToPoint(data_id) { // Does array already contain the data? if (!arrPoints[data_id]) { // square brackets to use `data_id` as index // Add data to the array arrPoints[data_id] = {}; arrPoints[data_id].clientX = somevalue; arrPoints[data_id].clientY = somevalue; } }
answers question: http://stackoverflow.com/q/25161438

http://stackoverflow.com/comment/39143057
has text: You're going to have to provide more information. Don't even know where to start trying to help.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25136465
score: 0

http://stackoverflow.com/comment/39060228
score: 1
has text: related [Passing multiple events to trigger same function jQuery](http://stackoverflow.com/questions/2534089/jquery-multiple-events-to-trigger-the-same-function)
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25100910

http://stackoverflow.com/comment/39178926
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25164567
has text: I was able to get it with jQuery. Thanks!

http://stackoverflow.com/comment/39054877
comment on: http://stackoverflow.com/q/25098064
score: 0
has text: To the best of my knowledge, it is not possible.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39030332
type: Comment
has text: Better yet, are you inspecting the element with your browser's inspector tool to see if the class is being added? If it's a CSS issue, inspecting the element will let you know.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25084897

http://stackoverflow.com/q/25076580
tagged with: google-chrome
has answer: http://stackoverflow.com/a/25076688
has body: I have a script which basically appends attributes when a button is clicked. Script is as follows; &lt;script type="text/javascript"&gt; window.generateRow = function() { var d = document.getElementById("add"); var p = document.createElement("p"); var input = document.createElement("input"); input.setAttribute('type', 'text'); input.setAttribute('pattern', '^[a-zA-Z ]+$'); input.setAttribute('name', 'items[]'); input.setAttribute('required'); p.appendChild(input); d.appendChild(p); } &lt;/script&gt; And in my HTML I use a normal onClick function to call back the function &lt;div id="add"&gt;&lt;/div&gt; &lt;p&gt;&lt;input type="button" value="Add" name="" onclick="generateRow()"/&gt;&lt;/p&gt; The problem I am having is in my version of Chrome I am able to add a field each time the button is clicked, but in Firefox and a updated version of Chrome the button does not respond to anything. I am using Firefox version 31.0 and i am using Chrome version 32.0
has title: JScript Button working in chrome but not in Firefox
score: 2
type: AnsweredQuestion
tagged with: firefox
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25076688
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25076760
favorite count: 0
possible better answer: http://stackoverflow.com/a/25076760
upvote count: 2
answer count: 2

http://stackoverflow.com/q/25117464
tagged with: video
has title: Stream part of the video to the client
score: 1
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25117801
has body: Given a windows server backend, is there a way to implement a pure javascript/html5 client that would be able to play only a designated part of the video file (e.g. from 10th second to 15th on a 2 hour video)? From what I know, standard html5 video tag will download an entire file which is not suitable for my situation. Streaming solutions on the server would probably be an answer, but are there any that would work with pure javascript/html client? Thanks.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25133657
type: UnansweredQuestion
tagged with: streaming
upvote count: 1
type: Question

http://stackoverflow.com/a/27596224
has comment: http://stackoverflow.com/comment/58386763
has comment: http://stackoverflow.com/comment/68117750
has comment: http://stackoverflow.com/comment/86548743
answers question: http://stackoverflow.com/q/25187926
upvote count: 36
type: Answer
has body: Html: php asp java JavaScript: $("#lang").select2().select2('val','asp'); jsfiddle
score: 30
downvote count: 6
has comment: http://stackoverflow.com/comment/126449692

http://stackoverflow.com/q/25134999
has comment: http://stackoverflow.com/comment/39124622
favorite count: 0
has body: If you look at this page I'm developing: http://dev.aaronpitts.ch/test/ you will see three green buttons in rows saying 'Find out more'. I'm trying to get them to always be aligned using the following jQuery: var maxHeight = 0; $(".same-height-inner").each(function(){ if ($(this).height() &gt; maxHeight) { maxHeight = $(this).height(); } }); $(".same-height-inner").height(maxHeight); The p block in .same-height-inner has a margin-bottom of 20px bottom but this isn't being included in the height of .same-height-inner. Also, if you look at this on a screen size of 1024 x 768 you will see the left hand column's text gets further miscalculation in height as it's not including the orphaned word which is broken to a new line. I've tried using outerHeight(true) but it makes no difference. How can I achieve the above?
has comment: http://stackoverflow.com/comment/39123959
tagged with: css
has answer: http://stackoverflow.com/a/25137706
score: 2
downvote count: 0
type: UnansweredQuestion
type: Question
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/39124599
upvote count: 2
answer count: 2
has title: jQuery not calculating correct height of text if there is an orphaned word on line break
has comment: http://stackoverflow.com/comment/39123723
tagged with: javascript
has answer: http://stackoverflow.com/a/35751258
tagged with: jquery

http://stackoverflow.com/comment/39170166
type: Comment
type: QuestionComment
score: 0
has text: possible duplicate of [jQuery form not working when part of ajaxed content](http://stackoverflow.com/questions/25085926/jquery-form-not-working-when-part-of-ajaxed-content)
comment on: http://stackoverflow.com/q/25160285

http://stackoverflow.com/comment/39107183
has text: "What lacks in this code is to hide all the other divs." - use classes instead of ids. Each time just hide all divs with this class and show only one that is needed.
score: 2
comment on: http://stackoverflow.com/a/25126063
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39233207
has text: Sounds like you're not using `noConflict` correctly. Please show your code, we can't tell what you're doing wrong without it.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25194015

http://stackoverflow.com/q/25167593
has comment: http://stackoverflow.com/comment/39185138
has answer: http://stackoverflow.com/a/25559902
downvote count: 1
type: Question
has body: I tested the following piece of code against IE, Chrome and Firefox and was wondering what causes the differences in the results. var body = document.getElementsByTagName('body')[0]; body.innerHTML = ' I am a text '; var divElement = document.getElementById('myId'); console.log(divElement.children.length); // All browsers say "1" ! body.innerHTML = ''; // just resetting the DOM console.log(divElement.children.length); // Chrome and FF say "1", IE says "Sorry guys, it's 0" Without surprise, in the three browsers, after the second innerHTML change, the divElement object does not refer to the rendered anymore. I have no trouble with that. What I find more interesting is that IE seem to discard divElement's child. Chrome and FF still allow me to work with the old tag and its children as if they were rendered, but IE turned the tag into an empty shell. What could be the difference in the way the browsers process the innerHTML change that causes this behavior?
tagged with: internet-explorer
score: 7
tagged with: dom
has title: Why does IE discard the innerHTML/children of a DOM element after DOM changes?
accepted answer: http://stackoverflow.com/a/25559902
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 8
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/51060141

http://stackoverflow.com/comment/39199749
has text: That is a work-around to the problem. I want to know why the core-overlay-toggle attribute doesn't do the trick.
type: Comment
comment on: http://stackoverflow.com/a/25167119
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39229851
score: 0
type: Comment
type: QuestionComment
has text: @MikeCheel Wouldn't that mean a lot of code duplication in this circumstance?
comment on: http://stackoverflow.com/q/25191849

http://stackoverflow.com/comment/39110609
has text: I can't really help there, as I manage all of my IT resources manually. However, it's definitely possible, and if it requires separate GIT repos, so be it! It's a good practice, and a little extra overhead at the beginning that could save you endless hours of time in the future.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25127750
type: AnswerComment

http://stackoverflow.com/q/25157552
tagged with: php
answer count: 0
downvote count: 1
type: Question
tagged with: highcharts
tagged with: javascript
tagged with: jquery
has title: update PHP code from within javascript using AJAX and setInterval
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/39179700
has comment: http://stackoverflow.com/comment/39211511
favorite count: 0
has comment: http://stackoverflow.com/comment/39165377
type: UnansweredQuestion
has body: On a webpage I have PHP and javascript code. Based off of the current date and time the PHP code assigns values to variables which are then used as arguments for functions in HighCharts (I'm using this code as a basis). Then using my PHP arguments my HighCharts code creates a plot which I want to update every X seconds. Also I would like to keep my PHP code in the same file as my javascript code. I can't get anything to work. I'm open to using AJAX, PHP, Javascript, jQuery, and Highcharts functions My best attempt thus far is the following: &lt;?php function PHPfunc(){ /* create some variables that are function of the current date and time */ }; ?&gt; &lt;div id="container" style="width:100%; height:800px;"&gt;&lt;/div&gt; &lt;script&gt; var chart = new Highcharts.StockChart({ chart: { renderTo: 'container', zoomType: 'x' events : { load : function() { var X = 5; //reload the PHP every 5 seconds setInterval($.ajax({ url: document.URL, data: {action: 'PHPfunc'}, type: 'post', }), X*1000); } } }, /* PHP variables called */ }); &lt;/script&gt; I feel like wrapping the entire PHP code in a PHP function is the easiest thing to do and then call it with AJAX for X times but I can't get it to work. Any corrections would be very appreciated. Thank you in advance.
upvote count: 1

http://stackoverflow.com/q/25217439
score: 0
type: Question
answer count: 1
tagged with: javascript
has title: d3 trying to use callbacks "i" as index
tagged with: http://stackoverflow.com/tag/svg
has body: For a uni class I have to write a visualisation. Therefor I want to write a single horizontal bar which shows the amout of a dataset on percental base. I figured out the theory on how to do this but now im stucking one specific problem: I have a dataset as a csv id,name,age and everything is working fine exept one thing. in order to get the new x position of a "bar" I have to calcualte the value from the width and the x value of the pre drawed bar. So far so good. to calculate the widht I have the following function: function calcWidth(data,i,scale) { return scale(parseInt(dataset[i].age)); } which gives me the width of a, by i specified rect. The function to calculate the x value looks like the following: function calcX(data,i,scale) { if(i == 0) { // because i=0-1 would not be possible and zero anyhow return 0; } else { var xold = svg.select("rect[id='"+i-1+"']").attr("x"); console.log(xold); return parseFloat(xold) + calcWidth(data,i-1,scale); } } The problem is that if I try to do this I get a mistake, in oder to get an insight whether the whole xold line is working or not I want to console.log(xold); and see there all I get printed is null for every i. I tried the xold line within a normal for loop and there it is working I get a value for every i. Maybe one of you has an idea how to fix this.
tagged with: d3.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25217583

http://stackoverflow.com/q/25185566
tagged with: javascript
has comment: http://stackoverflow.com/comment/39217850
tagged with: jquery
type: Question
tagged with: ruby
has comment: http://stackoverflow.com/comment/39217346
score: 0
has title: Javascript function requiring two clicks
tagged with: ruby-on-rails
answer count: 1
has comment: http://stackoverflow.com/comment/39217609
has answer: http://stackoverflow.com/a/25185777
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39219511
has body: javascript is completely new to me. I am a relatively inexperienced rails developer. I have implemented something in a rails 3 app called joyride, which is a jquery plugin and pops messages up for users giving them a "tour of the page". This is the script that runs the tour nicely when the page is loaded :javascript $(window).load(function() { $('#joyRideTipContent').joyride({ modal:true, expose: true }); }); That works perfectly. My problem is that I need it to run when a button is clicked rather than on loading of the page. So I started with a simple button on the HAML page %button#myBtn Lauch tour That gives me my button. Then I wrote a function (forgive me its my first) to fire the code when the button is pushed. :javascript var myBtn = document.getElementById('myBtn'); myBtn.addEventListener('click', function(event) { $("#joyRideTipContent").joyride({ modal:true, expose: true }); }); This is where it gets strange. The code works - on the SECOND click. Clearly something is being passed in the first time, and then executed the second time, but I am way out of my depth, can anyone help! thanks EDIT: changed the code to this on advice, but same problem exists... $(function() { $("#myBtn").click( function() { $("#joyRideTipContent").joyride({ modal:true, expose: true }); } ); }); EDIT: added a jsfiddle for anyone with time to have a look at http://jsfiddle.net/garethburrows/beonc06z/

http://stackoverflow.com/a/25126866
answers question: http://stackoverflow.com/q/25122425
type: Answer
score: 0
has body: Well with python i assume you could do this with the mechanize module Here's a tutorial

http://stackoverflow.com/comment/39007978
score: 1
has text: title does not match with the problem statement :-|
comment on: http://stackoverflow.com/q/25073102
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39222185
has text: I don't see any references to `nextElementSibling` or `nextSibling` in your code.
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25188262

http://stackoverflow.com/a/25222971
upvote count: 1
has body: There are two direct answers to this. Use event emitters. In ChildA's click handler you emit a "whatever" event. ChildB had registered a listener for the "whatever" event, so its handler for that event is called. Use refs. You pass a function to ChildA as a prop &lt;ChildA onWhatever={fn}&gt;, and put a ref on ChildB &lt;ChildB ref="b"&gt; and in the function you pass to ChildA you do this.refs.b.method(). However, this is an example of the XY problem. The real good solution probably lies in you taking a step back and thinking "when the button is clicked, what observable change should happen?" rather than "what method should be called?".
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/25220378

http://stackoverflow.com/a/25228700
has comment: http://stackoverflow.com/comment/39298331
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39298048
has comment: http://stackoverflow.com/comment/39298022
has comment: http://stackoverflow.com/comment/39298067
type: Answer
score: 2
has body: Check whether your fields are filled. if(!empty($_POST["field1_from_form1"]) &amp;&amp; !empty($_POST["field2_from_form1"]) /* &amp;&amp; ... */) { // Form 1 is filled. } And for the other form... if(!empty($_POST["field1_from_form2"]) &amp;&amp; !empty($_POST["field2_from_form2"]) /* &amp;&amp; ... */) {} You can also set a hidden input into each form... &lt;input type="hidden" name="formID" value="1" /&gt; &lt;!-- Form 1 --&gt; &lt;input type="hidden" name="formID" value="2" /&gt; &lt;!-- Form 2 --&gt; ... and check it: if(isset($_POST["formID"]) &amp;&amp; $_POST["formID"] == 1) // ... if(isset($_POST["formID"]) &amp;&amp; $_POST["formID"] == 2) // ... For your next questions on Stack Overflow, please use the site's search feature to avoid duplicating already-answered questions.
answers question: http://stackoverflow.com/q/25228672
downvote count: 2
accepted answer of: http://stackoverflow.com/q/25228672
upvote count: 4
has comment: http://stackoverflow.com/comment/39298037

http://stackoverflow.com/q/25194397
has title: Social sharing buttons speed up
has comment: http://stackoverflow.com/comment/39234065
tagged with: wordpress
has answer: http://stackoverflow.com/a/25194581
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39233933
answer count: 1
has comment: http://stackoverflow.com/comment/39233967
has body: My aim is to speed up page loading time with social sharing. I am thinking of writing a script that downloads every day the js for facebook twitter ... etc and adds all to a minified single js, that I can include in my page. (background cronjob) This way my page would not have to download from multiple servers, js can be included in one file, and since it is done every day remote script timeout would not be an issue. As a theory it is ok, I just thought I would ask if anybody has done this before, and if there are any drawbacks I have not thought of yet. Alternatively, is there a wp plugin that does this?
has comment: http://stackoverflow.com/comment/39234190
has comment: http://stackoverflow.com/comment/39233970
has comment: http://stackoverflow.com/comment/39233955
has comment: http://stackoverflow.com/comment/39234097
type: UnansweredQuestion
tagged with: facebook

http://stackoverflow.com/a/25269117
answers question: http://stackoverflow.com/q/25139888
type: Answer
has body: You can make "myapp://" as your mobile app URL scheme using these things : Android : In your menifest.xml file, add intent-filter into tag &lt;application ... &gt; &lt;activity ... &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.VIEW" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;category android:name="android.intent.category.BROWSABLE" /&gt; &lt;data android:scheme="myapp"/&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; Use android:scheme="myapp". So, whenever you want to start your app from other app, you need to add this hiperlink. Open myApp iOS : In iOS, open .plist file of your project(which can be found in Resources/) in xCode. You need to add 2 things : Information Property List->URL types->item0->URL identifier = Bundle identifier Information Property List->URL types->item0->URL schemes = myApp If anything is not there, you can right click and select "add row", then you can type elements. Help will help you. ;) So, whenever you want to start your app from other app, you need to add this hiperlink. Open myApp Your app will open if it is pre installed in device
score: 0

http://stackoverflow.com/comment/39155297
comment on: http://stackoverflow.com/q/25151915
has text: Can you share your config.xml? Have you tried building your project locally?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25141483
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/25142454
accepted answer: http://stackoverflow.com/a/25142454
downvote count: 0
type: Question
has title: how to configure chrome developer tool not to debug all extension scripts
type: AnsweredQuestion
has body: I have opened Enable frameworks debugging support flag in chrome experiments. There was a pattern used to skip stepping through scripts. As there were a lot of chrome Extensions, I could hardly type them all with or logic operator in the pattern input. Is there a flag used to skip all extension scripts?
tagged with: google-chrome-devtools
tagged with: javascript
score: 5
answer count: 1

http://stackoverflow.com/a/25098755
has comment: http://stackoverflow.com/comment/39058566
upvote count: 3
has comment: http://stackoverflow.com/comment/39061834
type: AcceptedAnswer
has body: You can do this with a function that copies attributes from one object to another and returns the modified object. This is a feature of most general-purpose JS libraries, and it's usually called "extend". Underscore: var foo = _.extend( function () { return; }, { bar: 'baz' } ); jQuery: var foo = $.extend( function () { return; }, { bar: 'baz' } ); Prototype: var foo = Object.extend( function () { return; }, { bar: 'baz' } ); Angular: var foo = angular.extend( function () { return; }, { bar: 'baz' } ); Ext: var foo = Ext.apply( function () { return; }, { bar: 'baz' } );
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39058583
downvote count: 0
answers question: http://stackoverflow.com/q/25098069
accepted answer of: http://stackoverflow.com/q/25098069

http://stackoverflow.com/comment/39289334
has text: Thanks for your suggestions. Perhaps a more efficient way of updating single elements would be to keep a back-reference to the element in the data object itself? Something like `.enter().call(function(d) { d.elem = this; })`?
type: Comment
comment on: http://stackoverflow.com/a/25223932
score: 0
type: AnswerComment

http://stackoverflow.com/a/25208598
type: Answer
has body: How about wrapping ion-nav-bar inside a div with a controller and using factory. var app = angular.module('starter', ['ionic', 'starter.controllers', 'starter.services']); app.factory('ResetService', function(){ var reset = function(path){ console.log('hello'); }; return reset; }); Now you inject this factory in the controller you created controller. Good luck!
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25205176
downvote count: 0

http://stackoverflow.com/q/25103936
has title: CSS not applied to newly added row on table with jquery
duplicate of: http://stackoverflow.com/q/203198
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25103951
has body: I have a table on which the user can select a row. I've made some CSS to highlight the selected row. The user can add rows to the original table. The probelm is that the added rows are not highlighted when selected. HTML PART : title 1 title 2 old row 1 old row 1 old row 2 old row 1 CSS : .table_to_fill tr:hover, .table_to_fill tr.selected { background-color: #1E90FF; color : #fff; font-weight : bold;} Javascript : $(".table_to_fill tr").click(function(){ $(this).addClass("selected").siblings().removeClass("selected"); }); //to add rows $("#add_row_button").click(function(){ $('#table_id tr:last').after(' new row new row '); }); So what I'm doing wrong ? Thanks for any help.
type: Question
accepted answer: http://stackoverflow.com/a/25103951
linked to: http://stackoverflow.com/q/203198
tagged with: javascript

http://stackoverflow.com/a/25134415
answers question: http://stackoverflow.com/q/25134285
downvote count: 0
has body: Try this if (day &lt; 10) day = "0" + day; if (hour &lt; 10) hour = "0" + hour; if (minute &lt; 10) minute = "0" + minute; if (second &lt; 10) second = "0" + second; DEMO
type: Answer
upvote count: 2
score: 2

http://stackoverflow.com/comment/39206827
type: QuestionComment
comment on: http://stackoverflow.com/q/25180244
score: 6
type: Comment
has text: id should be unique

http://stackoverflow.com/comment/39181555
has text: Thank you very much. The real solution for me was two draw two seperate paths, one for stroke, and one for the fill! Also I learnt something re `beginPath()`. Once again, thank you!
type: AnswerComment
comment on: http://stackoverflow.com/a/25165168
type: Comment
score: 0

http://stackoverflow.com/comment/39197081
type: Comment
type: QuestionComment
has text: True. It doesn't seem to be an issue with the header since I tried removing that and the problem persists, so maybe something to do with the tag? Shouldn't HTML resets theoretically take care of stuff like that though? I'm using both normalize.css and another basic HTML reset...
comment on: http://stackoverflow.com/q/25174377
score: 0

http://stackoverflow.com/comment/39266878
type: QuestionComment
comment on: http://stackoverflow.com/q/25211609
type: Comment
has text: @ajp15243 that didn't work, in fact when I used that, it just deleted all the images off the page lol.
score: 0

http://stackoverflow.com/q/25182520
tagged with: javascript
tagged with: jquery
has body: I've been using jQueryUI for a long time now but have recently made the switch to Bootstrap for aesthetic reasons. I am now struggling with what I would expect to be a simple issue and wondered if it's something that others more familiar with Bootstrap can help me with. I have a generic function for creating dialogs on-the-fly and there are occasions where I show a dialog with no buttons (when processing something), and then swap it to a dialog that does have buttons (process complete - click OK, for example). I'm not trying to define a set process here so I'm basically saying I want to be able to close one dialog and open another whenever needed. This is where the problem comes in. With Bootstrap the dialogs animate in and out, and I like that and want to keep it. I don't want to do it when swapping dialogs though. I can do this by removing the class fade from the first dialog when it shows, and from the second dialog before it shows, and that works great. I then add the class to the second dialog so that it will animate out. However, the animation goes wrong when I do this and there's an ugly flash where the background div should fade out gently. I've put together a jsfiddle to demonstrate the issue. You can click the close button on the first dialog to see what the fade out animation should look like. Any help would be appreciated before I start digging into the Bootstrap source files. http://jsfiddle.net/ArchersFiddle/0302gLav/1/ tl;dr Look at the jsfiddle - click "show dialog 2" - click "ok". I want to get rid of the black flash at the end. CSS @import url("//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"); .modal { display: none; } HTML Modal Dialog 1 This is the first modal dialog Show dialog 2 Close Modal Dialog 2 This is the second modal dialog OK JavaScript function showDialog2() { $("#dialog1").removeClass("fade").modal("hide"); $("#dialog2").modal("show").addClass("fade"); } $("#dialog1").modal("show"); $("#dialog-ok").on("click", functio…
answer count: 6
has title: Bootstrap modal - hide one then show another
has answer: http://stackoverflow.com/a/25182816
tagged with: modal-dialog
has answer: http://stackoverflow.com/a/30384348
has answer: http://stackoverflow.com/a/25183433
favorite count: 0
tagged with: twitter-bootstrap
score: 6
tagged with: css
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25184931
downvote count: 0
possible better answer: http://stackoverflow.com/a/25182816
has answer: http://stackoverflow.com/a/78007591
has answer: http://stackoverflow.com/a/63343089
type: Question
has answer: http://stackoverflow.com/a/25184931
upvote count: 6

http://stackoverflow.com/q/25220172
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25220291
has body: Here is the HTML: colulmn1 column2 column3 column4 1 2 3 4 } I am trying to make a call to the function getTableContents every time a row is clicked in a table. However with the code pasted above I get an error: "Uncaught error: userdefined is not a function." Anyone got any idea why this is happening?
has answer: http://stackoverflow.com/a/25220392
has answer: http://stackoverflow.com/a/25220297
score: 0
has answer: http://stackoverflow.com/a/25220225
tagged with: javascript
answer count: 5
accepted answer: http://stackoverflow.com/a/25220392
tagged with: jquery-events
type: AnsweredQuestion
has title: Cannot call a function from a jQuery on event
tagged with: jquery
type: Question
possible better answer: http://stackoverflow.com/a/25220291
has answer: http://stackoverflow.com/a/25220487

http://stackoverflow.com/q/25227872
has comment: http://stackoverflow.com/comment/39296525
score: 2
linked to: http://stackoverflow.com/q/3545018
has comment: http://stackoverflow.com/comment/39296449
linked to: http://stackoverflow.com/q/401593
type: Question
has comment: http://stackoverflow.com/comment/39296452
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/3731328
favorite count: 0
has title: Is there a highlight text event using Javascript
answer count: 0
has body: How to make the feature like in medium.com where when user highlight the text, it will pop up a modal? So far I have no idea yet how to capture the highlight event with JavaScript. Any thought?
upvote count: 2
type: UnansweredQuestion

socket.io
tags question: http://stackoverflow.com/q/25181197
tags question: http://stackoverflow.com/q/25092516
tags question: http://stackoverflow.com/q/25197222
tags question: http://stackoverflow.com/q/25195195
tags question: http://stackoverflow.com/q/25163689
tags question: http://stackoverflow.com/q/25210190
tags question: http://stackoverflow.com/q/25083564
tags question: http://stackoverflow.com/q/25158911
type: Tag
tags question: http://stackoverflow.com/q/25224386
tags question: http://stackoverflow.com/q/25177340
tags question: http://stackoverflow.com/q/25127615
tags question: http://stackoverflow.com/q/25150070
tag name: socket.io
tags question: http://stackoverflow.com/q/25130463
tags question: http://stackoverflow.com/q/25181848
tags question: http://stackoverflow.com/q/25115074
tags question: http://stackoverflow.com/q/25079075
tags question: http://stackoverflow.com/q/25199016
tags question: http://stackoverflow.com/q/25144698
tags question: http://stackoverflow.com/q/25087729
tags question: http://stackoverflow.com/q/25109888
tags question: http://stackoverflow.com/q/25110750

http://stackoverflow.com/a/25166754
has comment: http://stackoverflow.com/comment/39182768
type: Answer
score: 0
has body: In your php script. Try returning the string value true ("true"), or the number 1 then in your JS session_verified = Boolean(xmlhttp.responseText);
has comment: http://stackoverflow.com/comment/39182800
has comment: http://stackoverflow.com/comment/39182820
answers question: http://stackoverflow.com/q/25166603

http://stackoverflow.com/a/25080108
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: You'd have to bind a controller to your mark up and initialise your Angular app. {{value}} Then you can simply define a scope variable in your controller myApp.controller("valueController", function($scope) { $scope.value = "Hi!"; }); It is considered best to use the ng-app directive in the HTML tag of the page jsFiddle
answers question: http://stackoverflow.com/q/25079934

http://stackoverflow.com/comment/39107878
type: Comment
type: QuestionComment
has text: First of, do you get the data? Did you try seeing what you get with Fiddler
comment on: http://stackoverflow.com/q/25125915
score: 0

http://stackoverflow.com/q/25085704
has answer: http://stackoverflow.com/a/25085787
favorite count: 0
has answer: http://stackoverflow.com/a/57392078
accepted answer: http://stackoverflow.com/a/25085793
answer count: 5
has body: Does somebody know if its possible to select the current script-tag with jQuery without any other selectordefinitions? &lt;script type="text/javascript"&gt; $(document).ready( function(){ // Here i need to select the current tag "&lt;script ..." }) &lt;/script&gt;
possible better answer: http://stackoverflow.com/a/57392078
type: AnsweredQuestion
downvote count: 2
score: 16
has comment: http://stackoverflow.com/comment/50296480
has title: jQuery Select current script tag
type: Question
has answer: http://stackoverflow.com/a/53781415
has answer: http://stackoverflow.com/a/25085793
linked to: http://stackoverflow.com/q/403967
has answer: http://stackoverflow.com/a/25085922
tagged with: javascript
upvote count: 18
tagged with: jquery-selectors
tagged with: jquery

http://stackoverflow.com/comment/39299033
has text: I edited the question and added the jsfiddle example
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25228907

http://stackoverflow.com/a/25175178
type: AcceptedAnswer
downvote count: 0
has body: Html Helper is piece of C# code that will run on server and render html inside the pages. The event that made inside HTML page never able to run the C# code on server. But wait,.... You can make ajax request anytime on your ActionResult. So You can call the function like this in your JS that will load sub menu from server. function Test(){ //call the code here that will fetch html form server. }
type: Answer
accepted answer of: http://stackoverflow.com/q/25174964
answers question: http://stackoverflow.com/q/25174964
upvote count: 2
score: 2

http://stackoverflow.com/comment/40125852
comment on: http://stackoverflow.com/q/25180393
has text: have you tried wait.for? https://github.com/luciotato/waitfor
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25143582
downvote count: 0
has comment: http://stackoverflow.com/comment/39139569
favorite count: 0
has answer: http://stackoverflow.com/a/25144289
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39139875
accepted answer: http://stackoverflow.com/a/25143675
has title: How to apply a responsive CSS height to an element using min/max-height and height?
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39139632
tagged with: responsive-design
has body: I'm trying to expand a Dygraph to the maximum available dimensions of it's parent container. Technically the graph is resizeable, either by using a re-rendering method or by specifying an absolute container like in this example. Problem is, the plugin expects hardcoded values, otherwise it will calculate something arbitrary - see this link for explanation, which says: // For historical reasons, the 'width' and 'height' options trump all CSS // rules _except_ for an explicit 'width' or 'height' on the div. // As an added convenience, if the div has zero height (like &lt;div&gt;&lt;/div&gt; does // without any styles), then we use a default height/width. I have been playing around with the following setup: &lt;div class="graph_wrap"&gt; &lt;div class="graph_container"&gt; &lt;!-- graph will be here --&gt; &lt;/div&gt; &lt;/div&gt; I managed to stretch the graph WIDTH to 100% by setting this CSS: html .ui-graph { width: 100%; min-width: 1px; } but without specifying a height, the plugin overrides my CSS and doing this: html .ui-graph { width: 100%; min-width: 1px; /* height... */ height: auto; max-height: 100%; min-height: 100%; } does not work. Only if I add something like height: 20em, the plugin does not overwrite my set CSS. Question: Is there any CSS way using min/max-height/height (or other) to force the browser to expand to maximum height? Can't think of anything else. does
possible better answer: http://stackoverflow.com/a/25144020
tagged with: javascript
has answer: http://stackoverflow.com/a/25144020
has comment: http://stackoverflow.com/comment/39140544
answer count: 3
has answer: http://stackoverflow.com/a/25143675

http://stackoverflow.com/a/25223954
has comment: http://stackoverflow.com/comment/39312542
has comment: http://stackoverflow.com/comment/39312095
type: AcceptedAnswer
score: 0
accepted answer of: http://stackoverflow.com/q/25223833
type: Answer
answers question: http://stackoverflow.com/q/25223833
has body: You're using invalid selector, try this: var modalPopup = $('#PopupExtender1');

http://stackoverflow.com/a/25176883
answers question: http://stackoverflow.com/q/25176848
upvote count: 4
has body: Just try with: var parts = str.split('_', 2); var p1 = parts.shift(); var p2 = parts.join('_'); or: var index = str.indexOf('_'); var p1 = str.substr(0, index); var p2 = str.substr(index + 1);
type: Answer
downvote count: 1
score: 3

http://stackoverflow.com/q/25121503
has title: Is it possible to make a tooltip stick when clicking on a node in a graph (Flotr2)
type: AnsweredQuestion
type: Question
tagged with: flotr2
has body: I know how to make a customized tooltip using the function trackformatter. Problem is if like in my case, I'm having links in the tooltip, then I would like the tooltip to stick if I click on the graph node and don't dissapear as soon as the mouse cursor have left the node. Is this possible in flotr2 graph library? mouse : { track : true, trackFormatter: function(obj){ return Visit W3Schools Visit W3Schools } },
has answer: http://stackoverflow.com/a/25122845
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25122845

http://stackoverflow.com/a/25120750
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39097101
has body: You can use the Clipboard API. http://caniuse.com/clipboard and then use .getAsFile() as described here: https://stackoverflow.com/a/6338207/1052033
type: Answer
answers question: http://stackoverflow.com/q/25120508
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39097995
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25120508

http://stackoverflow.com/q/25070108
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25070136
accepted answer: http://stackoverflow.com/a/25070136
tagged with: javascript
score: 0
answer count: 1
has body: I have an angularjs app that is getting more complex so I need to break out thing into more than one controller. I need to create a factory to fetch my data using http.get and share that data between a couple of controllers. I have a simple version passing the data into the controllers but I am not sure about the factory that is using the http.get. Also, I want to make sure the http.get only gets called one time, for working example code see this plunker var myApp = angular.module('myApp', []); myApp.factory('Data2', function($http){ var getDataUrlString = "myhappyurl.com"; return $http.get(getDataUrlString); }) myApp.factory('Data', function(){ return {message:"cool data from factory"} }) myApp.controller('firstController', function($scope, Data){ $scope.firstData = Data; }) myApp.controller('secondController', function($scope, Data){ $scope.secondData = Data; }) I think I am very close with the factory that I want to use 'Data2'. The Data factory which just returns the string message works just great as you can see in the example code I provided, I just need help bridging the gap from simple string to the http.get.
tagged with: angularjs
has title: how do I create a factory that uses http.get and passes it to multiple controllers in angular

pdo
tags question: http://stackoverflow.com/q/25096045
tag name: pdo
type: Tag

unit-testing
tags question: http://stackoverflow.com/q/25174897
tags question: http://stackoverflow.com/q/25070999
tags question: http://stackoverflow.com/q/25155268
tags question: http://stackoverflow.com/q/25198256
tags question: http://stackoverflow.com/q/25199900
tags question: http://stackoverflow.com/q/25210951
tags question: http://stackoverflow.com/q/25097738
tags question: http://stackoverflow.com/q/25199606
tags question: http://stackoverflow.com/q/25175762
type: Tag
tags question: http://stackoverflow.com/q/25140671
tag name: unit-testing
tags question: http://stackoverflow.com/q/25094195
tags question: http://stackoverflow.com/q/25218379
tags question: http://stackoverflow.com/q/25225551

http://stackoverflow.com/comment/39281603
type: QuestionComment
type: Comment
has text: CJ gave me the php code that generates the JS code, and they provided me how the JS will look like too (see JS Template), the question is how can I integrate the PHP to generate that JS code, on the sucess.phtml (head) from magento.
comment on: http://stackoverflow.com/q/25219799
score: 0

http://stackoverflow.com/comment/41654819
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25149450
has text: Would the downvoter's care to comment why they are down voting an old question, appropriately asked, with an acceptable answer?
score: 0

http://stackoverflow.com/q/25109609
tagged with: jquery
has answer: http://stackoverflow.com/a/25109719
has comment: http://stackoverflow.com/comment/39076334
has comment: http://stackoverflow.com/comment/39076419
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25110049
has answer: http://stackoverflow.com/a/25109708
type: AnsweredQuestion
has body: I need to stop $.each loop, load image and then continue loop. I have canvas where I load images of objects. Objects are in array in correctly order. Now, when I'm trying to load objects from array, there is a problem: images are loading slower or faster because of different sizes and they're drawing on canvas e.g. in reversed order. I hope you will understand me because my English isn't so good. Good luck anyway :) $.each(content,function(i){ obj_id[i] = $.inArray( content[i], different_objects ) != -1 ? time == "day" ? content[i] + 'd' : content[i] : content[i]; temp[i] = new Image(); temp[i].src = '../data/img/objects/' + obj_id[i] + '.png?' + i; $(temp[i]).on('load', function() { city_cvs.drawImage({ layer: true, source: '../data/img/objects/' + obj_id[i] + '.png?' + i, x: offset + x + content_pause, y: y - temp[i].height, fromCenter: false, opacity: opacity }); offset = offset + temp[i].width + content_pause; }); });
type: Question
has title: Stop $.each, load image and then continue loop
tagged with: canvas
accepted answer: http://stackoverflow.com/a/25110049
possible better answer: http://stackoverflow.com/a/25109708
tagged with: javascript

http://stackoverflow.com/comment/39254230
has text: Change the if condition to be `('disabled', true);`, then add an else condition to be `('disabled', false);`. That way if the user changes their mind or accidentally clicks the "All Specialties" option, they can deselect it to reenable all the other options as well.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25205147

http://stackoverflow.com/comment/39086134
type: AnswerComment
comment on: http://stackoverflow.com/a/25114819
type: Comment
has text: Are you sure this one works I don't think this one works even in the fiddle
score: 0

http://stackoverflow.com/q/25091792
tagged with: fotorama
has answer: http://stackoverflow.com/a/25169376
has comment: http://stackoverflow.com/comment/39043726
has title: Fotorama- how to update from Github
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25101713
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/25101713
accepted answer: http://stackoverflow.com/a/25169376
type: Question
has comment: http://stackoverflow.com/comment/39061470
tagged with: javascript
has answer: http://stackoverflow.com/a/32356938
has body: A fix for a Fotorama bug was in a recent update of the plugin on Github: https://github.com/artpolikarpov/fotorama/commit/1810d59eecc927fbef14cb6f8a1611047a2404fb I have the latest Fotorama version (downloaded from http://fotorama.io/) and am still experiencing the bug- I tried replacing the fotorama.js file with both an unminified and minified version of the updated fotorama.js file from the link above, but then the plugin does not work at all. How can I implement this update?
answer count: 3
downvote count: 0
tagged with: jquery
tagged with: github
favorite count: 0

http://stackoverflow.com/comment/39242722
type: AnswerComment
score: 0
type: Comment
has text: I need to add validate on blur as well as key up and key down ?
comment on: http://stackoverflow.com/a/25199061

http://stackoverflow.com/q/25115233
has comment: http://stackoverflow.com/comment/39087140
type: Question
has answer: http://stackoverflow.com/a/25125688
has comment: http://stackoverflow.com/comment/39086612
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/39087962
downvote count: 1
tagged with: sigma.js
accepted answer: http://stackoverflow.com/a/25125688
has answer: http://stackoverflow.com/a/25115447
upvote count: 3
has comment: http://stackoverflow.com/comment/39121339
has title: Javascript object colon in key
has comment: http://stackoverflow.com/comment/39088053
has comment: http://stackoverflow.com/comment/39086932
has comment: http://stackoverflow.com/comment/39088226
score: 2
possible better answer: http://stackoverflow.com/a/25115284
has answer: http://stackoverflow.com/a/25115284
tagged with: javascript
has answer: http://stackoverflow.com/a/25115324
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39086762
has comment: http://stackoverflow.com/comment/39106242
answer count: 4
favorite count: 0
has body: Enclosed a screenshot of the Javascript console (Chrome Version 36.0.1985.125 m) after executing: console.log(node) console.log(node['read_cam0:x']) console.log(node['label']) Why is node["read_cam0:x"] undefined? added issue at sigma.js: https://github.com/jacomyal/sigma.js/issues/361 UPDATE: Firefox console shows this: see the read_cam0 missing from the object on the left but displayed on the right (after clicking on object on the left side).

http://stackoverflow.com/a/25222208
downvote count: 0
answers question: http://stackoverflow.com/q/25222175
has comment: http://stackoverflow.com/comment/39287442
type: Answer
upvote count: 1
score: 1
has body: You could use data attributes to store params. When the event is fired you the target from event.target and then you could use its data attributes. // based on jQuery $('img').on('click', function (event) { var btn = $(event.target); sendName(btn.data('video-name')); }); You should follow similar pattern.

http://stackoverflow.com/comment/39096714
type: QuestionComment
comment on: http://stackoverflow.com/q/25118894
has text: @sifriday You just saved my day. +10. Why it does like that with the filtering?
score: 0
type: Comment

http://stackoverflow.com/q/25107314
has answer: http://stackoverflow.com/a/25111772
tagged with: javascript
score: 0
answer count: 1
type: UnansweredQuestion
has body: I have a javascript that adds a N:N relationship between two CRM entities via a ribbon function. Everything works fine, the relationship gets added. However I'm having problems refreshing the subgrid that contains the added entity records. Before this function used to work in CRM 2011, but not anymore in 2013. This used to work in CRM 2011 to refresh "MySubGrid" after a record is added. var gridControl = Xrm.Page.ui.controls.get("MySubGrid"); if (gridControl != null) { gridControl.refresh();} I tried below as suggested from a blog and it didn't work either: var propertyStatusControl = document.getElementById("Propertiestatus"); if (propertyStatusControl != null) { propertyStatusControl.refresh();} Any suggestions? Thanks in advance for the help.
has title: CRM 2013 Refresh Subgrid
tagged with: crm
type: Question

http://stackoverflow.com/q/25124147
has title: Ruby on rails - Permission denied @ dir_s_mkdir - /essets
type: Question
has comment: http://stackoverflow.com/comment/39105715
tagged with: http://stackoverflow.com/tag/html
has body: I'm working on a sales site, and added paperclip to add images to these products but however much I try I can not get this error please help me (sorry if I'm writing this wrong from Brazil) Errno::EACCES in AdsController#create Permission denied @ dir_s_mkdir - /essets '(Extracted source (around line #33):)' respond_to do |format| if @ad.save format.html { redirect_to @ad, notice: 'Ad was successfully created.' } format.json { render :show, status: :created, location: @ad } else
has comment: http://stackoverflow.com/comment/39104616
has comment: http://stackoverflow.com/comment/39103729
upvote count: 1
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39107112
tagged with: paperclip
score: 1
favorite count: 0
tagged with: ruby-on-rails-3.2

http://stackoverflow.com/q/25118843
favorite count: 0
upvote count: 2
score: -2
tagged with: php
has title: Ajax & PHP uploading files
accepted answer: http://stackoverflow.com/a/25119240
has body: I'm starting with web programming with javascript and i have a little problem with uploading file. I find this: http://tutorialzine.com/2013/05/mini-ajax-file-upload-form/ but I have no idea how to use upload.php file in mvc project. What to use as an action of form and where should be plasted this php code? Can anyone give mi some hints?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39093408
type: Question
answer count: 1
tagged with: upload
tagged with: javascript
tagged with: ajax
downvote count: 4
has answer: http://stackoverflow.com/a/25119240
has comment: http://stackoverflow.com/comment/39093449

http://stackoverflow.com/q/25079773
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25092606
has comment: http://stackoverflow.com/comment/39020181
score: 3
has answer: http://stackoverflow.com/a/25079820
has comment: http://stackoverflow.com/comment/39047659
favorite count: 0
possible better answer: http://stackoverflow.com/a/25079820
type: AnsweredQuestion
tagged with: internet-explorer
upvote count: 3
has answer: http://stackoverflow.com/a/25092606
has comment: http://stackoverflow.com/comment/39020228
has body: While using getElementById().getElementsByTagName() it's not getting objects in IE8. For example: var devang = getElementById('devang').getElementsByTagName('li'); alert(devang.length); it's return length of objects, while in IE8 it's shows value 0;
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39020133
has title: getElementById().getElementsByTagName() not working in IE8
has comment: http://stackoverflow.com/comment/39022591

http://stackoverflow.com/q/25129377
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25129395
has answer: http://stackoverflow.com/a/25132540
tagged with: javascript
has answer: http://stackoverflow.com/a/25134970
accepted answer: http://stackoverflow.com/a/25132540
answer count: 3
has body: I would like to know if its possible in any way to: .button{ width: somePX; height: somePX; } .button:hover { onmouseup = "func(".button")"; } or something like that. I think it would be kinda cool? instead of writing for each button onmouseup = onmouseup = onmouseup = onmouseup = onmouseup =.....
linked to: http://stackoverflow.com/q/2446598
favorite count: 0
has comment: http://stackoverflow.com/comment/39113366
tagged with: http://stackoverflow.com/tag/html
has title: Call a javascript function from CSS
tagged with: css
type: AnsweredQuestion
score: 2
upvote count: 3
has answer: http://stackoverflow.com/a/25129395

http://stackoverflow.com/q/25152417
has title: How can static data be shared between pages in a site without copying the data?
upvote count: 2
has comment: http://stackoverflow.com/comment/39156048
downvote count: 1
has comment: http://stackoverflow.com/comment/39156406
type: Question
has answer: http://stackoverflow.com/a/25152874
type: AnsweredQuestion
tagged with: asp.net-mvc
has answer: http://stackoverflow.com/a/25153226
has answer: http://stackoverflow.com/a/25152535
has body: I have a list of data, say "Supported colors". Maybe these colors each have a name, a set of aliases, a few specific RGB values that represent this color. In my site I have one page where I want to list the colors in a dropdown. In another page, I want to just have a grid displaying each color. Maybe in another page, something completely different. So my question is: how can I share the data between pages, such that a change in one location where the data is defined will propagate throughout all pages in the site. Environment: This is an MVC app, using Razor (sparingly), bootstrap for presentation, and JQuery for some of the interactive operations. My thoughts on a solution: 1) Store this list in a model that is passed to all pages. Then whenever the data is needed, I could loop over the items in the model, and present them however I want 2) Store the list in javascript, and generate the HTML using javascript instead. 3) Use JQuery to get the list from the server, and iterate over the results to generate the appropriate HTML Note I am very new to web development, so there may be some false assumptions above, and most definitely some poorly thought out ideas - any corrections are greatly appreciated!
possible better answer: http://stackoverflow.com/a/25153226
linked to: http://stackoverflow.com/q/14138872
has comment: http://stackoverflow.com/comment/39156171
tagged with: javascript
score: 1
accepted answer: http://stackoverflow.com/a/25152874
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39156424
favorite count: 0

http://stackoverflow.com/q/25117371
has comment: http://stackoverflow.com/comment/39090791
has body: I used devise to integrate user registration and login. Now I also have forgot password page. What would be the best way to pass user's email from the user_email textfield on the login form to the forgot password form, so the user doesn't need to put in his/her email twice? Link to forgot password page: <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> <%= link_to "Forgot your password?", new_password_path(resource_name) %> <% end -%> Sign in form: <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> <%= f.label :email %> <%= f.email_field :email, autofocus: true, :required => true %> <%= f.label :password %> <%= f.password_field :password, autocomplete: "off", :required => true %> <% if devise_mapping.rememberable? -%> <%= f.check_box :remember_me %> <%= f.label :remember_me %> <% end -%> <%= f.submit "Sign in" %> <% end %> Forgot password form: <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %> <%= devise_error_messages! %> <%= f.label :email %> <%= f.email_field :email, autofocus: true %> <%= f.submit "Send me reset password instructions" %> <% end %>
type: UnansweredQuestion
has title: Rails pass user email to forgot password form
has comment: http://stackoverflow.com/comment/39091145
has comment: http://stackoverflow.com/comment/39091049
tagged with: ruby-on-rails
type: Question
has answer: http://stackoverflow.com/a/25117547
tagged with: devise
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39091001
answer count: 1

http://stackoverflow.com/q/25098864
has answer: http://stackoverflow.com/a/25098884
upvote count: 7
favorite count: 0
has answer: http://stackoverflow.com/a/25098887
answer count: 5
downvote count: 5
has body: I want to design some arrays like [1..25] in JavaScript, but I don't want to do by hand ([1, 2, 3, 4, 5, 6, [...], 25]). How would you do?
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/39056444
has title: Create simple array "[x..y]" with JavaScript
has comment: http://stackoverflow.com/comment/39056252
linked to: http://stackoverflow.com/q/3895478
type: Question
accepted answer: http://stackoverflow.com/a/25098884
has comment: http://stackoverflow.com/comment/39056354
possible better answer: http://stackoverflow.com/a/25098890
has comment: http://stackoverflow.com/comment/39056403
duplicate of: http://stackoverflow.com/q/3895478
tagged with: javascript
has answer: http://stackoverflow.com/a/25098890
has comment: http://stackoverflow.com/comment/39056493
linked to: http://stackoverflow.com/q/18947892
has answer: http://stackoverflow.com/a/25098907
has answer: http://stackoverflow.com/a/25098880

http://stackoverflow.com/a/25152793
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25152047
type: Answer
has body: Image and delete anchor are children of div object. Put click event on each a, then delete the parent. So when user click the x mark, selected image will be deleted. div.children[1].addEventListener("click", function(event){ div.parentNode.removeChild(div); }); see demo at http://jsfiddle.net/L45LW/5/
accepted answer of: http://stackoverflow.com/q/25152047

http://stackoverflow.com/comment/39416245
has text: For example, when you make an ajax $http call, and later it returns, angular will trigger a $digest. Not because anything changed, or got triggered. It will do it anyway. If anything happened to change, it will trigger the $watch listener to update the view. This is quite different than how other frameworks work, whereby some event happens which triggers an event listener directly. In angular, it doesn't care if anything changed, it will trigger the $digest cycle anyway.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25177827
type: AnswerComment

http://stackoverflow.com/q/25163129
type: AnsweredQuestion
tagged with: gruntjs
answer count: 1
tagged with: javascript
has body: I am using the following configuration to uglify all my JS files into one file. This cause some problem with the ordering (I need to follow the order of the js files from index.html instead). I would like to know: How can to get all srcs for my js files from index.html (with order as appear in the html)? How to replace all js file in index.html with a unique reference to 'build.js'? uglify : { yourTask : { src : 'src/**/*.js', dest : 'build.js' } }
score: 0
tagged with: node.js
has answer: http://stackoverflow.com/a/25163493
accepted answer: http://stackoverflow.com/a/25163493
has title: How can to get all srcs for my js file from index.html?
type: Question

http://stackoverflow.com/q/25095105
possible better answer: http://stackoverflow.com/a/25095117
answer count: 5
accepted answer: http://stackoverflow.com/a/25095145
has answer: http://stackoverflow.com/a/25095117
has title: Changing the href of an tag before it fires
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39049424
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25095163
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25095166
tagged with: javascript
has answer: http://stackoverflow.com/a/25095145
has body: My current problem is that I want to change the href of an tag before the page loads what it was previously pointing to. &lt;a href = "#oldLink" onclick = "this.href = #newLink"&gt;&lt;/a&gt; I've tried something like this and it didn't work. I've tried: &lt;a href = "#oldLink" onclick = "changeLink();"&gt;&lt;/a&gt; in another file: changeLink(){ $("a").attr("href", "#newLink"); } and this doesn't work, unless you put an alert before the change occurs, and then it does occur as expected. Any help would be greatly appreciated, it's my first time posting so apologies if the format isn't correct
has comment: http://stackoverflow.com/comment/39050007
has comment: http://stackoverflow.com/comment/39049932
has comment: http://stackoverflow.com/comment/39050049
has answer: http://stackoverflow.com/a/25095651
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39049292

http://stackoverflow.com/a/25127098
has comment: http://stackoverflow.com/comment/39109497
score: 3
has comment: http://stackoverflow.com/comment/39109542
answers question: http://stackoverflow.com/q/25127054
upvote count: 3
has body: You could just use toFixed var parts = (+n).toFixed(2).split("."); var num = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (+parts[1] ? "." + parts[1] : ""); FIDDLE That would also make 1234.0000 to 1234.00, but you can avoid that by converting to a number in the ternary, as zero is falsy
has comment: http://stackoverflow.com/comment/39109349
has comment: http://stackoverflow.com/comment/39109454
downvote count: 0
type: Answer

http://stackoverflow.com/q/25179257
type: Question
tagged with: c#
has body: Is it possible to disable calendar extender from code behind? If yes how? I want to prevent calendar from popping up even if a user clicks withing the textbox when certain conditions are met.
has answer: http://stackoverflow.com/a/25185473
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25182397
tagged with: asp.net
answer count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/46147672
has title: How to disable calendar extender?
score: 0

http://stackoverflow.com/q/25080627
type: Question
has comment: http://stackoverflow.com/comment/39022427
has comment: http://stackoverflow.com/comment/39021882
has answer: http://stackoverflow.com/a/25081177
has comment: http://stackoverflow.com/comment/39022475
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39022373
has body: I have a php page that shows the server logs in a web interface. It is pretty simple. Basically there is an ajax call inside a setinterval() which hits a backend php file, which will read the log and echo it. The relevant code is: setInterval(function() { $.get("log.php",{logId: $('#logId').val()}, function(data) { $("#logDetails").html(data); //scroll to the bottom when updated... $("#logDetails").stop().animate({scrollTop: $("#logDetails")[0].scrollHeight}, 800); }); }, 2000); As you can see, this just update a div with an id called logDetails with content from the log file in the server. The div has a style="overflow:scroll" and the line $("#logDetails").stop().animate.. is to scroll to the bottom of the div when new content is added. All this works very well. If a user has scrolled up the div and is examining the logs, and new content comes in then the div scrolls down. That is also fine. The problem is that the server log can have many hours of inactivity. During that time, when the user scrolls up, since setinterval is still working, he gets scrolled down even though new content is not available. This can become a real nuisance. I wanted to handle this in the minimal way possible and I thought doing this might suffice: $.get("log.php",{logId: $('#logId').val()}, function(data) { //new condition to check id new content has come if($('#logDetails').val() != data) { //update div and scroll to the bottom.. } ... However this is not working. I am aware of other ways like check the log modified time in server side etc, but I cannot modify any of those files due to other reasons. So my question is - why does this not work? And how can I do this inside the interface file itself instead of resorting to other means? The PHP code that pushes out the log is: $contents = ""; $handle = @fopen($logFile, 'r'); if($handle) { while(($line = fgets($handle)) !== false) { //highlight errors $txt = "Execution stopped because of error"; if(strstr($line,$txt)) { $line = "&lt;span sty…
tagged with: ajax
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39022482
has comment: http://stackoverflow.com/comment/39022617
has comment: http://stackoverflow.com/comment/39022122
has comment: http://stackoverflow.com/comment/39022206
has comment: http://stackoverflow.com/comment/39022511
has title: Unable to update div based on current value inside it
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25081184
tagged with: php
has comment: http://stackoverflow.com/comment/39021932
has comment: http://stackoverflow.com/comment/39022252
has answer: http://stackoverflow.com/a/25080810

http://stackoverflow.com/q/25125280
score: 0
has body: I am looking to get feed back on what would be a good way to implement an intuitive way to drag my UL element. I have made a small JSFiddle that shows my current implementation. $.each($('#area ul'), function(){ $(this).mouseenter( function(){ var ul_element = $(this); ul_element.prepend(" Move List "); $('#movebar').mouseenter( function(){ $(ul_element).draggable({ snap: true, containment:"parent", stop: function(event,ui){ } }); }).mouseleave( function(){ $(ul_element).draggable("destroy"); }); ul_element.sortable({ revert:true, containment:"parent", cancel:"#movebar", stop: function(event,ui){ } }); }); $(this).mouseleave( function(){ $('#movebar').remove(); $(this).sortable("destroy"); console.log(false); }); }); http://jsfiddle.net/D9yN4/2/ I also am looking for a better solution in selecting a UL element. Currently my query selects all UL elements in a specific div. Is there a better way to select individual UL elements? I also have a limitation on my project where I may not provide an unique ID to a UL element. Thanks you for any insight.
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25125767
has comment: http://stackoverflow.com/comment/39105949
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/39106773
type: Question
answer count: 1
has title: Intuitive way to drag UL elements
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39106846

http://stackoverflow.com/a/25651651
upvote count: 30
has body: I had a similar issue and resolved it by moving my proxy code above other node middleware. e.g. This: var httpProxy = require('http-proxy'); var apiProxy = httpProxy.createProxyServer(); app.use("/someroute", function(req, res) { apiProxy.web(req, res, { target: 'http://someurl.com'}) }); app.use(someMiddleware); not this: app.use(someMiddleware); var httpProxy = require('http-proxy'); var proxy = httpProxy.createProxyServer(); app.use("/someroute", function(req, res) { proxy.web(req, res, { target: 'http://someurl.com'}) }); My specific issue was having BodyParser middleware above the proxy. I haven't done much digging but it must have modified the request in some way that broke the proxy library when the request finally came to it.
has comment: http://stackoverflow.com/comment/66987975
downvote count: 1
has comment: http://stackoverflow.com/comment/82053190
type: Answer
score: 29
answers question: http://stackoverflow.com/q/25207333

http://stackoverflow.com/q/25087541
downvote count: 1
type: AnsweredQuestion
has title: How can I implement Javascript into a Windows Phone 8.0 HTML5 Application?
has comment: http://stackoverflow.com/comment/39035885
has body: I've been developing a Windows Phone 8.0 application using secure bootstrap HTML (In Visual Studio Professional 2013 Update 2.34 build 32-4) and have begun to try implementing JavaScript. However, here is where I have become stuck. I have set 'IsScriptEnabled' to true and, for testing purposes, have created very basic inline JavaScript with . Yet despite my best efforts, my scripts simply do not run. Can anybody help with the implementation?
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/25093135
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25093135
score: 0
has comment: http://stackoverflow.com/comment/39042079
upvote count: 1
tagged with: windows-phone-8

http://stackoverflow.com/a/25138960
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39131276
upvote count: 1
answers question: http://stackoverflow.com/q/25138425
has comment: http://stackoverflow.com/comment/39130759
has body: You cannot repeat ID in your HTML, Try this; @Html.ActionLink("Add Friend", "AddNewFriend", null, new { @class = "addfriend" }) $(document).ready(function () { $(".addfriend").click(function (event) { event.preventDefault(); $(this).closest("tr").hide(); }); });
downvote count: 0

http://stackoverflow.com/q/25123817
tagged with: javascript
tagged with: extjs
has answer: http://stackoverflow.com/a/25125820
score: 0
has answer: http://stackoverflow.com/a/25172761
has title: Store's listeners fired many times
type: UnansweredQuestion
type: Question
tagged with: asp.net-mvc
answer count: 2
has body: In my MVC 3 application, i want to refresh a partial View each time there is new available data. So to get these data from the server side, i'm using a componentLoader like below: Panel lowerPanel = new Panel { Region = Region.South, Layout = "fit", ID = "WarningsPanel", AutoScroll = true, Loader = Html.X().ComponentLoader() .Url(Url.Action("_warningsView")) .Mode(LoadMode.Script) .MessageBusDirectEvents( new MessageBusDirectEvent() { Name = "Warnings.Update", Action = "_warningsView", Buffer = 1000, ExtraParams = { new { containerId = "WarningsPanel" } } } ) .Params(new { containerId = "WarningsPanel" }) .LoadMask(l =&gt; l.ShowMask = true) }; after getting new data from the server, i want to call some javascript functions. so i setted my partial view like below: @(Html.X().GridPanel() .ID("WarningsGridPanel") .EnableColumnResize(true) .Store(Html.X().Store() .DataSource(Model) .Model(Html.X().Model() .Fields( Html.X().ModelField().Name("id"), ... ) .Listeners(l =&gt; { l.DataChanged.BroadcastOnBus = "Warnings.Register"; l.DataChanged.Buffer = 5000; }) .MessageBusListeners(mbl =&gt; mbl.Add(new MessageBusListener { Name = "Warnings.Register", Fn = "WarningsStore.Register"})) ) .ColumnModel(//Html.X().RowNumbererColumn().Align(Alignment.Center).Width(Unit.Pixel(30)), Html.X().Column().Text("ID").DataIndex("id").Flex(1).Hideable(false), ... ))) When refresh the partial view at the first time, i can see in the console that WarningsStore.Register JS function was called once but at the second time is called twice , third time is called 3 times ... This is how i defined the WarningsStore.Register JS function: WarningsStore = WarningsStore || {}; WarningsStore.Register = function (message, id, eOpts) {...} What can be the problem? is there many stores? am defining JS function in the wrong way?

http://stackoverflow.com/comment/39058854
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25100203
type: AnswerComment
has text: If you only want to know if it is a number you can do (assuming that the var n is a number): `n === +n`. If true n is a number, otherwise is some other kind of variable.

http://stackoverflow.com/a/25102533
answers question: http://stackoverflow.com/q/25102319
score: 0
type: Answer
has body: You should change it to the click event Username: Password:
has comment: http://stackoverflow.com/comment/39063019

http://stackoverflow.com/comment/39002190
has text: These are both in the same .php file
comment on: http://stackoverflow.com/q/25069750
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39151571
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25149825
has text: Can you please create an example of how you're implementing this? jsbin or plnkr would be great.
type: QuestionComment

http://stackoverflow.com/comment/39098195
type: QuestionComment
type: Comment
has text: In Firefox: have you tried stepping through with a debugger like Firebug?
comment on: http://stackoverflow.com/q/25117869
score: 0

http://stackoverflow.com/a/25072332
type: Answer
has body: You are dealing with three types of programming which, it seems, you might not have a clear understanding of their roles. First, you have the creation of the HTML which is sent to the browser. This is what PHP does, and it runs on the web server. The database code is part of this process. This has to be done all in “one shot”, you can’t run some PHP code, then “wait a few seconds” on the browser end, then run some more. Then you have the CSS. This is embedded in to HTML, and instructs the browser how to display things. Making your span display in the middle of the page is accomplished with CSS. This is also a “one shot” action — after the browser receives all the HTML and builds the page structure but before displaying it, it goes through the page and executes the CSS to move stuff around, sets colours and fonts, etc. Finally you have the Javascript, which runs on the browser after the page is loaded. This is the only part of your page that can do stuff “asynchronously”, i.e., not “one shot”, but do a little of this, then wait, then do some more stuff later. Or wait for keyboard or mouse input and react to it. Javascript lets you manipulate the CSS and the HTML, modifying it from what was originally send from the PHP script. I assume you are not using AJAX, so this means that all the data that will be manipulated by Javascript needs to be there from the beginning. You can’t have the Javascript go and tell the web server to run some more PHP and send the HTML (this is what AJAX does). So, your PHP needs to get all your lines of text from the database and include it with the page. Then the CSS needs to hide all but the first line. Finally the Javascript will wait a few seconds, change the CSS to hide the first line and show the next line, and repeat this process.
upvote count: 2
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25072105

http://stackoverflow.com/comment/39175892
type: QuestionComment
comment on: http://stackoverflow.com/q/25157258
score: 0
has text: For canvas width property look: http://stackoverflow.com/questions/2588181/canvas-is-stretched-when-using-css-but-normal-with-width-height-properties.
type: Comment

http://stackoverflow.com/q/25157537
type: UnansweredQuestion
tagged with: symfony
has body: I am trying to set a onsubmit function that will use the google.maps.Geocoder to set the gps positions using the address entered by a user, my code is the following &lt;form onsubmit="getGPSLocation()"&gt; &lt;input type='text' id='search_address' /&gt; &lt;input type='text' id='search_lat' hidden='hidden'/&gt; &lt;input type='text' id='search_lon' hidden='hidden'/&gt; &lt;input type='submit'/&gt; &lt;/form&gt; &lt;script&gt; function getGPSLocation(){ var string = $('#search_address').val(); var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': string }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { var pos = results[0].geometry.location; $('#search_lat').attr('value',pos.lat()); $('#search_lon').attr('value',pos.lng()); } }); } &lt;/script&gt; The problem is that when i click submit, it does properly call the geocoder function, but the problem is that: Before the geocoder can make the request to the google server and return the coordinate data, the Submit function has already redirected the page. So the question is: How to delay the submitting of the information untill the geocoder function has successfully completed its action.
type: Question
has comment: http://stackoverflow.com/comment/39165674
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39165935
has comment: http://stackoverflow.com/comment/39166788
score: 0
has answer: http://stackoverflow.com/a/25159011
answer count: 1
has title: Setting Value of Input OnSubmit using JQuery in Symfony

http://stackoverflow.com/q/25190411
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39255498
linked to: http://stackoverflow.com/q/25123931
has comment: http://stackoverflow.com/comment/39229964
has comment: http://stackoverflow.com/comment/39254968
tagged with: popup
answer count: 0
score: 1
has body: I'm inserting the jQM popup widget via .js like so... // jQM popup settings injection // the variable "g_html_popup_settings" contains the markup for the settings popup(s) // this var is established in application.html.erb // popup injection $(document).on('pagebeforecreate', function () { var popupDOM = $("[data-role=popup]").length; if (popupDOM === 0) { // using enhanceWithin() as it triggers an update in presentation // for injected widgets $.mobile.pageContainer.prepend(g_html_popup_settings).enhanceWithin(); // we use .popup() as of jQM 1.4.3 //$("#iHODPopupSettings").popup("open"); $('a[data-rel="popup"]').on("click", function () { $("#iHODPopupSettings").popup("open", { transition:"pop" }); //console.log("creating popup..."); }); //else { //console.log("There is a popup in the DOM!!"); } }); // /jQM popup settings injection The var "g_html_popup_settings" is ruby/rails processed HTML. I've been able to implement panel and toolbar jQM widgets this way to all areas of my app. This widget is different as the popup has to be bound to a click event to produce the "modal"/popup. When navigating to pages with jQM's default AJAX usage, I lose functionality of the button that opens the popup. The above way of injecting the widget works on all navigation using data-ajax="false" but, I'd like to have a solution where I didn't have to worry about if the page displayed came in via AJAX or not. I don't know if the 'pagebeforecreate' event is keeping me from doing some sort of universal presentation of the widget whether or not the pagecontainer load is AJAX or not. All buttons are created using the following markup... Settings Any help or insight with this issue would be greatly appreciated. Thanks in advance for reviewing this.
has title: jQuery Mobile .popup() injection on AJAX navigation
type: Question
has comment: http://stackoverflow.com/comment/39255493
has comment: http://stackoverflow.com/comment/39254867
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39255648
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39255086
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/57882327
has body: Service workers are definitely the way to go here. You can use Workbox as a library it has best practices and removes most of the boilerplate when implementing service workers in your apps.
type: Answer
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25137757
score: 1

http://stackoverflow.com/comment/39132461
comment on: http://stackoverflow.com/q/25138711
has text: from what ive see in my experience that most of the SelectedIndex_changed event does not fire because you are rebinding something in the Page_load event that has to do with this list, just make sure to debug your page load and see!!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39150512
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25149313
has text: Yeah I noticed that too. seems like he did while I was still writing it LOLz... Anyways it's nice of you to consider upvoting Thanks.
type: Comment

http://stackoverflow.com/q/25208554
has comment: http://stackoverflow.com/comment/39260454
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/39260608
score: 0
has title: How should I add buttons to the right on my rows in HTML?
type: Question
has body: I have the buttons on both rows being added dynamically just as another &lt;td&gt; after each of the table data and it just gets added as something outside of the table. I'm guessing this is pretty hack-ish, and it doesn't even work for the first table. What would be the best way to achieve what I'm trying to do? These tables are just tables with table rows and table data. Thanks!
tagged with: javascript
has comment: http://stackoverflow.com/comment/39260688

http://stackoverflow.com/comment/39129188
score: 0
has text: Concerning bar with negative values, [this](http://stackoverflow.com/questions/10127402/bar-chart-with-negative-values) answer may be useful. It would be good to have your working code at [jsfiddle](http://jsfiddle.net) so somebody can help you.
comment on: http://stackoverflow.com/q/25136735
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25189308
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 0
answer count: 1
tagged with: menuitem
has answer: http://stackoverflow.com/a/25189477
tagged with: javascript
type: AnsweredQuestion
has body: I've added the active state to my menu on scrolling. HTML: CONTENT A Upload Add Add MORE Prepare Present Upload MORE/a> Increase JavaScript: The CSS for active is: .active { background-color: rgba(0, 0, 0, 0.1); } My question is, what if I want to change the font-size and font-color in addition to the background color change? I tried adding font-size and some others but are not working.
tagged with: drop-down-menu
has title: Menu active class on scrolling - How to add font color and font size change on active class?
accepted answer: http://stackoverflow.com/a/25189477
type: Question

http://stackoverflow.com/comment/39189542
comment on: http://stackoverflow.com/q/25168252
score: 0
type: QuestionComment
type: Comment
has text: @Ian - Why did you re-open this?

http://stackoverflow.com/a/25213959
upvote count: 3
has comment: http://stackoverflow.com/comment/39297747
has comment: http://stackoverflow.com/comment/39297978
has comment: http://stackoverflow.com/comment/39276059
downvote count: 0
has comment: http://stackoverflow.com/comment/39296864
has comment: http://stackoverflow.com/comment/39275356
answers question: http://stackoverflow.com/q/25194928
has comment: http://stackoverflow.com/comment/39297703
type: Answer
has body: The article Listening to events on all tabs describes how to set up web progress listeners for tabs. With this listener you can get requests and redirects. const tabsUtils = require("sdk/tabs/utils"); const listener = { QueryInterface: XPCOMUtils.generateQI(["nsIWebProgressListener", "nsISupportsWeakReference"]), onLocationChange: (browser, progress, request, uri) =&gt; { let tab = tabsUtils.getTabForContentWindow(progress.DOMWindow); // ... }, onStateChange: (browser, progress, request, state) =&gt; { let tab = tabsUtils.getTabForContentWindow(progress.DOMWindow); // ... } // ... }; getChromeWindow(sdkWindow).getBrowser().addTabsProgressListener(listener); At some point you may need to convert between low- and high-level tabs or chrome/dom/sdk windows which is implemented really bad and confusing. An sdk window in this case is one you get with windows.browserWindows, the chrome window has a reference to the gBrowser. If you are using the latest sdk maybe this helps: https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_API/tabs#Converting_to_XUL_tabs and https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/windows#Converting_to_DOM_windows. I used this function to get the chrome window from a sdk window: https://bugzilla.mozilla.org/show_bug.cgi?id=695143#c15 const { BrowserWindow } = require('sdk/windows'); const { windows } = require('sdk/window/utils'); function getChromeWindow(sdkWindow) { // to include private window use the as second argument // { includePrivate: true } for (let window of windows('navigator:browser')) if (BrowserWindow({window: window}) === sdkWindow) return window; return null; }
score: 3
has comment: http://stackoverflow.com/comment/39297038

http://stackoverflow.com/q/25070690
linked to: http://stackoverflow.com/q/23803743
tagged with: angular-promise
tagged with: angular-resource
possible better answer: http://stackoverflow.com/a/25070899
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25070899
has answer: http://stackoverflow.com/a/25070789
upvote count: 3
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has body: Could somebody help me figure out how to return hard-coded data in my AngularJS factory if there is an error connecting to my API. My hard-coded data are located in another factory called "dataFactory". Appreciate the assistance. service.factory("ScheduleFactory", ['$http', '$resource', '$q', 'dataFactory', function($http, $resource, $q, dataFactory) { var objFactory = {}; objFactory.getDaysOfWeek = function(includeWeekends) { var days = []; var API = $resource(restURL + '/daysOfWeek/'); API.query() .$promise .then(function(data) { isEmpty = (data.length === 0); if (!isEmpty) { days = data; }; }) .catch(function(error) { console.log("rejected " + JSON.stringify(error)); var data = null; days = dataFactory.daysOfWeek; console.log(days.length); // returns 5 }); console.log("after promise " + days.length); // returns 'after promise 0' return days; }; My dataFactory is defined as follows: dataApp.factory("dataFactory", function() { objDataFactory = {}; objDataFactory.daysOfWeek = [ { dayName: 'Monday' , dayAbbrev: 'Mon' , index: 1 , isSelected: false , isWeekday: true } , { dayName: 'Tuesday' , dayAbbrev: 'Tue' , index: 2 , isSelected: false , isWeekday: true } , { dayName: 'Wednesday' , dayAbbrev: 'Wed' , index: 3 , isSelected: false , isWeekday: true } , { dayName: 'Thursday' , dayAbbrev: 'Thu' , index: 4 , isSelected: false , isWeekday: true } , { dayName: 'Friday' , dayAbbrev: 'Fri' , index: 5 , isSelected: false , isWeekday: true } ]; return objDataFactory; });
favorite count: 0
accepted answer: http://stackoverflow.com/a/25070789
has title: angularjs handling $resource $promise errors
tagged with: angularjs

http://stackoverflow.com/comment/39284874
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25221238
has text: You make a fine point. I tried to keep it simple, but perhaps I should have been more specific. Is it better now?

clock
tags question: http://stackoverflow.com/q/25221893
type: Tag
tag name: clock

http://stackoverflow.com/q/25101093
has body: Fiddle 1: http://jsfiddle.net/LmaYP/ Fiddle 2: http://liveweave.com/adAgUN When I dblclick the header I make it contenteditable, and then I set it to focus. I noticed after I dblclick the element, the text on that element is selected. I still want to select text inside the element both before dblclick and after, but when dblclick is called I don't want to select any text. Is there anyway to fix this? $("header").on('dblclick', function() { $(this).prop('contenteditable', true).focus(); });
has answer: http://stackoverflow.com/a/25101133
type: Question
linked to: http://stackoverflow.com/q/1181700
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25101133
answer count: 1
has title: Remove selection when contenteditable is focused
type: AnsweredQuestion

http://stackoverflow.com/a/43837770
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: In addition to Maertz answer, remember to set zoomLatitude and zoomLongitude to zero so you won't get the "Cannot read property 'scale' of undefined" error.
answers question: http://stackoverflow.com/q/25186774

http://stackoverflow.com/q/25125616
has body: I am using an angularjs directive with a template to append divs to element. CSS automatically styles its width using max width. How do I find this width for further processing? I tried: for(var i=0; i<numchild; i++){ angular.element(element.children()[i]).clientWidth } but this returns undefined. Is there any way to get the dimensions (height and width) of all children? Entire javascript code for directive and template is as below: angular.module('components', []) .directive('mydir', function () { numchild = 5 return { restrict: 'E', replace: true, link: function(scope, element, attr) { for(var i=0; i<numchild; i++){ if(i==0){ element.append(' Random '); } else { element.append( ' Random noise here and there and everywhere around us ' ) } console.log(angular.element(element.children()[i]).clientWidth); } } } }) angular.module('MyApp', ['components']) Updated this with a jsfiddle: http://jsfiddle.net/z55a9/2/
has comment: http://stackoverflow.com/comment/39108241
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39110805
tagged with: css
has comment: http://stackoverflow.com/comment/39109096
has comment: http://stackoverflow.com/comment/39106939
has answer: http://stackoverflow.com/a/43827130
has title: Is there a way get width and height of child element in a directive in Angularjs
type: UnansweredQuestion
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39148663

http://stackoverflow.com/comment/39219251
type: AnswerComment
comment on: http://stackoverflow.com/a/25186128
type: Comment
has text: Using the docs here: [Node](http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) I'd do it the way their example is. var spawn = require('child_process').spawn; var df = spawn('df', ['-h']); df.stdout.on('data', function (data) { console.log('stdout: ' + data); }); df.stderr.on('data', function (data) { console.log('stderr: ' + data); }); df.on('close', function (code) { console.log('child process exited with code ' + code); }); Have you used NodeJS before though, do you know how to set it up?
score: 0

http://stackoverflow.com/q/25107740
favorite count: 0
has comment: http://stackoverflow.com/comment/39072908
tagged with: css
has comment: http://stackoverflow.com/comment/39073146
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39072726
score: 1
has answer: http://stackoverflow.com/a/25108346
tagged with: image
has comment: http://stackoverflow.com/comment/39073517
type: Question
has answer: http://stackoverflow.com/a/25107777
has body: I am making a mile high Italian flag, but I don't have enough disk space to make a mile high image with the right aspect ratio. To solve this issue, I decided to make a super small (2 x 3 px) image and display it in a webpage as a mile high. The only issue is that the browser blurs the image, but I want it to appear pixelated so that it would look like the flag (the flag is just 3 equally sized vertical stripes). Is there a way to fix this? The flag is available here. Relevant code: &lt;img src=2-px-high-flag.png width=6842880 height=4561920&gt; Edit: I at least want to make it compatible with chrome. Other additional browsers would help, too.
has answer: http://stackoverflow.com/a/25108372
accepted answer: http://stackoverflow.com/a/25108372
has comment: http://stackoverflow.com/comment/39073015
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39072702
has title: Remove blur on oversized image
possible better answer: http://stackoverflow.com/a/25107777
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25180783
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25180821
has answer: http://stackoverflow.com/a/25180826
has answer: http://stackoverflow.com/a/25180812
accepted answer: http://stackoverflow.com/a/25180812
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25180828
type: Question
has comment: http://stackoverflow.com/comment/39207729
has comment: http://stackoverflow.com/comment/39207711
tagged with: javascript
has answer: http://stackoverflow.com/a/25180821
has title: How to clear textbox in html
upvote count: 1
has body: I just want to clear textbox my html form. I made it and clear but i write something in again , it seen by my function as empty. How can do it ? I did it like this below; $('#clear').click(function(){ document.getElementById("v1").value=""; document.getElementById("v2").value=""; document.getElementById("v3").value=""; document.getElementById("v4").value=""; });
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25180857
answer count: 5
has comment: http://stackoverflow.com/comment/39207750

http://stackoverflow.com/comment/39036133
score: 0
comment on: http://stackoverflow.com/a/25086877
type: Comment
has text: no you don't have to use it in the if statement, I have edited the code
type: AnswerComment

http://stackoverflow.com/comment/39302016
type: QuestionComment
comment on: http://stackoverflow.com/q/25222525
score: 1
has text: @Pumbaa80: I saw that, it explains why it should not be used. I wonder if you could explain (or add a link) as to when it should, and why it is better in this case?
type: Comment

http://stackoverflow.com/a/25070872
score: 4
accepted answer of: http://stackoverflow.com/q/25070113
type: Answer
answers question: http://stackoverflow.com/q/25070113
has body: Looks like your javascript is only defining the function, but never calling it. Try changing to: NSString *str = @"function SelectAnimal() {\ var sel = document.getElementById('Animals');\ var val = document.getElementById('AnimalToFind').value;\ for(var i = 0, j = sel.options.length; i &lt; j; ++i) {\ if(sel.options[i].innerHTML === val) {\ sel.selectedIndex = i;\ break;\ }\ }\ }\ selectAnimal();";
has comment: http://stackoverflow.com/comment/39004759
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25091840
has comment: http://stackoverflow.com/comment/39043479
has comment: http://stackoverflow.com/comment/39043541
has comment: http://stackoverflow.com/comment/39043527
score: 0
has comment: http://stackoverflow.com/comment/39043565
has comment: http://stackoverflow.com/comment/39043589
has comment: http://stackoverflow.com/comment/39043557
has comment: http://stackoverflow.com/comment/39043691
has comment: http://stackoverflow.com/comment/39043698
has comment: http://stackoverflow.com/comment/39043608
answers question: http://stackoverflow.com/q/25091782
type: Answer
has body: I have found several mistakes in your approach.. Firstly, var password = $('#inputclass').val(); is not the way to retrieve data, you instead should use ng-model Anyways, i have made changes to your plunker and added a fork.. check it out and revert back if it satisfies your requirements.

http://stackoverflow.com/a/25160381
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39176349
answers question: http://stackoverflow.com/q/25160322
type: Answer
accepted answer of: http://stackoverflow.com/q/25160322
score: 2
downvote count: 0
has body: Just do $(".close2 img").click(function() { progress = 0; //console.log(progress); return progress; }); When you use var, you are creating a variable (whith the same name) inside the function. PD: as @adeneo said, it's useless to try to capture the output of a jQuery listener. Your declaration of progress2 will always be an array of DOM elements. Take, for instance this function var true_body=jQuery('body').click(function() { return true; }); It could seem as if true_body would always receive true as its value. Truth is, true_body is [&lt;body&gt;....all body contents here...&lt;/body&gt;]
has comment: http://stackoverflow.com/comment/39175853
upvote count: 2

http://stackoverflow.com/comment/39040181
type: AnswerComment
has text: No, but the horizontal line from the enemy (anywhere on map) crosses along the bottom edge of a square. Won't the result be odd/even based on the number of tiles that are along the bottom edge?
type: Comment
comment on: http://stackoverflow.com/a/25089932
score: 0

http://stackoverflow.com/q/25207188
type: AnsweredQuestion
tagged with: promise
tagged with: angularjs
type: Question
score: 0
has title: Asynchronous Request Appending to String in Angular
answer count: 1
has body: I am attempting to get the actual text from all of the stylesheets associated with the page. I can do this pretty well via something like sheets = document.styleSheets stylesheet_text = "&lt;style type='text/css'&gt;" _.each(sheets, (sheet) -&gt; if $(sheet).attr("href") $http.get($(sheet).attr("href")) .success (data) -&gt; console.log data # Displays the text perfectly stylesheet_text += data # Never gets appended to. .error (data) -&gt; console.log "error" ) stylesheet_text += "&lt;/style&gt;" console.log stylesheet_text The problem is that the final console.log doesn't display the correct data. Instead, I get back &lt;style type='text/css'&gt;&lt;/style&gt; After this, the console.log data fires and starts spitting out the text. Oh, an async issue! A promise should fix this, right? getCSSFile = (href) -&gt; def = $.Deferred() $http.get(href) .success (data) -&gt; def.resolve(data) def.promise() css = -&gt; sheets = document.styleSheets stylesheet_text = "&lt;style type='text/css'&gt;" _.each(sheets, (sheet) -&gt; if $(sheet).attr("href") getCSSFile($(sheet).attr("href")).then( (data) -&gt; stylesheet_text += data ) ) stylesheet_text += "&lt;/style&gt;" console.log stylesheet_text stylesheet_text Well... not quite. That still didn't work. So, I decided to just go with a route that I thought I knew would work. ss = -&gt; sheets = document.styleSheets stylesheet_text = "&lt;style type='text/css'&gt;" _.each(sheets, (sheet) -&gt; if $(sheet).attr("href") $.get($(sheet).attr("href")).then( (data)-&gt; stylesheet_text += data ) ) stylesheet_text += "&lt;/style&gt;" stylesheet_text Just like earlier, the jQuery request doesn't populate the stylesheet_text variable like I would expect. What can I do to ensure that the text is actually appended to the variable before I return at the end of my function?
has comment: http://stackoverflow.com/comment/39257927
tagged with: coffeescript
has answer: http://stackoverflow.com/a/25207394
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39602742
accepted answer: http://stackoverflow.com/a/25207394

http://stackoverflow.com/comment/39258272
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25193927
type: Comment
has text: This issue seems to happen for version 8 and 10 also.

http://stackoverflow.com/comment/39229695
comment on: http://stackoverflow.com/a/25191943
score: 1
type: AnswerComment
has text: Why are you talking about JS across multiple pages? The question makes it clear that isn't the case here. Saving an HTTP request might not make things faster, even if more data is transferred overall, if the files are large enough then parallel downloads might result in faster results.
type: Comment

http://stackoverflow.com/comment/39078541
type: Comment
comment on: http://stackoverflow.com/a/25108961
score: 0
type: AnswerComment
has text: yeah that works!!! thanks!! can you give me an example conde on how can I assign each value to my var usoing getelementbyname??

http://stackoverflow.com/q/25163681
has comment: http://stackoverflow.com/comment/39192529
has comment: http://stackoverflow.com/comment/39176853
answer count: 2
has comment: http://stackoverflow.com/comment/39176881
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: How to reload page in Ember or Jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39176835
upvote count: 8
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25163951
has body: How can i force a reload instead of a transition in Ember.Route For example inside this function: File: play_route.js actions: { willTransition: function(transition, route) { transition.abort(); transition.refresh(); // maybe // window.location.href = route; } } How can i force a reload inside Ember.Controller For example inside this function: File: play_controller.js actions: { reloadPage: function() { // reload baby } }
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js
tagged with: node.js
has answer: http://stackoverflow.com/a/25163726
score: 8
has comment: http://stackoverflow.com/comment/39187517
type: Question
has comment: http://stackoverflow.com/comment/39176921

http://stackoverflow.com/q/25173459
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39195480
has body: trying to get my list from my array to show up when page loads anad when you do add an item to list the item at the bottom of the list. currently my script writes the enitre array all over again when you click the submit button. check out my fiddle to follow what i am talking about. please any help would be great:) http://jsfiddle.net/trav5567/2ebothpb/ function myFruit() { var Fruit = ['apple', 'bannanna', 'rasberry', 'watermelon', 'grape', 'orange']; $('#addFruit').on('click', function(e) { e.preventDefault(); var flag = true; var val = $('#fruitAdd').val(); for (var i = 0; i &lt; Fruit.length; i++) { if (Fruit[i] == val) { flag = false; console.log('already entered this item'); } } if (flag) Fruit.push(val); loopArray(); }); function loopArray() { var fruitList = $('ul.fruit'); var arrayContainer = $('.arrayContainer'); for (var i = 0; i &lt; Fruit.length; i++) { fruitList.append('&lt;li&gt;' + Fruit[i] + '&lt;/li&gt;'); } } } myFruit();
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25173506
tagged with: arrays
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39195500
has title: add one item to an array instead of listing the entire array all over again using javascript
has comment: http://stackoverflow.com/comment/39195393
has comment: http://stackoverflow.com/comment/39195501
possible better answer: http://stackoverflow.com/a/25173571
has comment: http://stackoverflow.com/comment/39195491
has answer: http://stackoverflow.com/a/25173571
has answer: http://stackoverflow.com/a/25173506
has comment: http://stackoverflow.com/comment/39195438

http://stackoverflow.com/a/25191650
has comment: http://stackoverflow.com/comment/39230071
has body: Check if the symbol $ is defined and check if the symbol jQuery is defined. if $ is not defined and jQuery is, try jQuery.cookie instead of $.cookie. If both are undefined, I would check if the jQuery scripts are included in your HTML code. One of the ways to include jQuery is described here. Look for something like &lt;script src="jquery.. in your page's HTML code to see if it is already included. If it is not, you should include it. The scripts should be included before you try to use $ or jQuery symbols
answers question: http://stackoverflow.com/q/25191457
score: 0
has comment: http://stackoverflow.com/comment/39229098
type: Answer
has comment: http://stackoverflow.com/comment/39229986

http://stackoverflow.com/q/25128575
has comment: http://stackoverflow.com/comment/39112083
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39112128
has answer: http://stackoverflow.com/a/25129212
has comment: http://stackoverflow.com/comment/39112000
has answer: http://stackoverflow.com/a/25128585
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Setting margin-left from div
tagged with: css
has comment: http://stackoverflow.com/comment/39112204
linked to: http://stackoverflow.com/q/37103
type: Question
has body: So here's my issue. This is what I want to do Which I did. The issue is the blue text doesn't align up correctly. Since I'm doing margin-left: 130 on the blue text it starts from the gray words. Not the start of the div. So here's what it looks like when I code it So what I basically want to do is start the margin from the div. Not the text. Here's a demo http://jsfiddle.net/R2FVL/. Any help would be great
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25158265
type: Question
has title: window.confirm detection using Javascript
tagged with: javascript
linked to: http://stackoverflow.com/q/4866986
score: 0
has body: I am using confirm() function of Javascript in my application. I need to find out whether confirm box is present or not while clicking other button. How to detect whether confirmBox (window.confirm) is present or not using Javascript? How to remove confirmBox using Javascript?
answer count: 1
has comment: http://stackoverflow.com/comment/39166251
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39166248
duplicate of: http://stackoverflow.com/q/4866986
has answer: http://stackoverflow.com/a/25158346
has comment: http://stackoverflow.com/comment/39166357

http://stackoverflow.com/comment/39301885
has text: Thanks. I did all of this now but the request still stays 'pending' in devtools. I updated the code with the middleware that I am using now.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25229130
score: 0

http://stackoverflow.com/a/25121517
has body: if you have(most probably you do) a file that gets included every refresh, you could just check the time and display a "no access" page incase it falls in the time, where the site should be not accessed Tell me if you need more help
downvote count: 1
score: -1
answers question: http://stackoverflow.com/q/25121464
type: Answer
upvote count: 0

http://stackoverflow.com/q/25206567
tagged with: d3.js
tagged with: http://stackoverflow.com/tag/csv
has body: The problem I am having is specifically with D3.js, but I've had similar problems before and always ended up using a hack to get around it. I have a class which contains an array of objects. There is a function to add new objects from a CSV file. using d3.csv. This function takes a filename and a callback function with one argument (the current parsed line of the csv file). I want to append each parsed line to this.objects, but this is no longer within the scope of the function. function MyClass(){ this.objects = []; this.add_objects = function(filename){ d3.csv(filename, function(data){ //Callback fired for each parsed line in csv file //Now I want to push data to this.objects... } } }
accepted answer: http://stackoverflow.com/a/25206632
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39256752
possible better answer: http://stackoverflow.com/a/25206909
upvote count: 3
has answer: http://stackoverflow.com/a/25206909
type: Question
has title: Javascript - How to pass original object to callback function
score: 3
tagged with: javascript
has answer: http://stackoverflow.com/a/25206632
answer count: 2
tagged with: functional-programming
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/128867774
comment on: http://stackoverflow.com/a/72961096
type: Comment
score: 3
type: AnswerComment
has text: Please phrase this as an explained conditional answer, in order to avoid the impression of asking a clarification question instead of answering (for which a comment should be used instead of an answer, compare https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead ). For example like "If your problem is ... then the solution is to .... because .... ."

http://stackoverflow.com/comment/39138233
type: Comment
comment on: http://stackoverflow.com/a/25142454
has text: Thanks you!And the regex pattern seems to be `^chrome-extension:\/\/`
score: 4
type: AnswerComment

http://stackoverflow.com/comment/39097721
score: 2
has text: of course, you removed the element from the DOM entirely. the data associated with it would naturally get removed. if you want to retain the data, just hide the element instead of outright remove it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25121168

http://stackoverflow.com/comment/39140151
has text: If you combine this solution with interval fired for every... Lets say 1 second, you will have very exact results.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25143853
type: Comment

http://stackoverflow.com/comment/39003651
has text: Got ya - thanks a lot. Despite the downvotes, it was worth it. very handy all of this! One last question... whats the best way to go about debugging PHP? I used to use Visual Studio for C#, so I'm used to it throwing useful errors etc...
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25070494

http://stackoverflow.com/comment/39045375
has text: Instead of a 'data' event hander it's in a _transform function, but I am sure that I receive everything in one call for now. Your solution isn't quite working, it still gives me the same error as I had before :(
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25083780
type: Comment

http://stackoverflow.com/comment/39043253
type: QuestionComment
has text: dont find any... since this javascript tat is not executed is within the php, (which is called via ajax), we do not find it listed in firebug either :( do you hav anyother way in which i could execute a link...
score: 0
comment on: http://stackoverflow.com/q/25091659
type: Comment

http://stackoverflow.com/comment/39112109
comment on: http://stackoverflow.com/a/25086560
type: AnswerComment
type: Comment
has text: I don't think the security thing applies in this case. I'm not sure though.
score: 1

http://stackoverflow.com/q/25088265
type: Question
has comment: http://stackoverflow.com/comment/39037038
has title: fb share button no of shares not working
has comment: http://stackoverflow.com/comment/39099282
accepted answer: http://stackoverflow.com/a/25088442
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25088442
tagged with: facebook-javascript-sdk
tagged with: jquery
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I am trying to get the number of shares options near my fb button... can you guys tell me how to achieve it... i got the f button but i am not able to achieve the number of shares option.. for twitter it shows count but for fb it doesnt show the count... providing my code below... &lt;div id="fb-root"&gt;&lt;/div&gt; &lt;script&gt;(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;appId=243027682401976&amp;version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));&lt;/script&gt;&lt;div class="fb-share-button" data-href="https://developers.facebook.com/docs/plugins/"&gt;&lt;/div&gt;

http://stackoverflow.com/comment/39127918
score: 0
type: Comment
has text: Why *k<u* is false and *k>u* too?
comment on: http://stackoverflow.com/a/25137537
type: AnswerComment

http://stackoverflow.com/comment/39234323
comment on: http://stackoverflow.com/q/25194600
has text: 'allowIllegalResourceCall is false.' it's to protect the api from illegal stuff :)
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25087187
type: Answer
answers question: http://stackoverflow.com/q/25086985
has comment: http://stackoverflow.com/comment/39037630
has body: Add this code to CSS file: html { filter: expression(document.execCommand("BackgroundImageCache", false, true)); }
score: 0

http://stackoverflow.com/q/25085938
upvote count: 1
has answer: http://stackoverflow.com/a/25086000
type: Question
has answer: http://stackoverflow.com/a/25085962
tagged with: javascript
has body: I just started learning AngularJS. I want to implement a page for editing user info by showing the old info in the input field on the page. whenever the user want to update info they can see the old info displayed in the input box and they can change the value which will be stored in ng-model. I used before without ng-model and it works &lt;input type="text" value="{{event_detail.title}}" class="inputbox form-control"&gt; However it doesn't work with data-ng-model &lt;input type="text" value="event_detail.title" required id="title" name="title" class="inputbox form-control" data-ng-model="eve.title" placeholder="Title"&gt; is there anyway to solve this problem?
has title: How to display value in Input box with AngularJS
answer count: 2
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25085962
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
tagged with: frontend
possible better answer: http://stackoverflow.com/a/25086000

http://stackoverflow.com/comment/39252796
score: 0
comment on: http://stackoverflow.com/q/25204621
type: Comment
has text: You just want to send the image-file captured by the input to the server? You can not wrap a form around the input and post it? You want to use ajax?
type: QuestionComment

http://stackoverflow.com/a/25190882
score: 28
upvote count: 28
type: Answer
has comment: http://stackoverflow.com/comment/39228351
answers question: http://stackoverflow.com/q/25190594
has body: 0x100000000000000 == 0xFFFFFFFFFFFFFF gives true while 0x10000000000000 == 0xFFFFFFFFFFFFF gives false. So the former is the "limit", say. Let's analyze the numbers: 52 bits for 0xFFFFFFFFFFFFF and one additional bit for 0x10000000000000 in the internal representation. EDIT: Numbers of such magnitude are not represented by long ints but by double precission floats. This is because they exceed the 32bit representation of an integer value every number in javascript is represented as IEEE754 double precision floating point. When you represent any IEEE754 Double Precission FP Number internally, you get: 0111 1111 1111 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 2222 Where (0) is the sign bit, (1) the exponent bits, and (2) the mantissa bits. If you compare in JavaScript 0.5 == 5 * 0.1 you will get true even when that operation has floating imprecission (i.e. you get some error). So Javascript tolerates a small error in floating point operations so operations like that give true, as the common sense tells. Edit - There's something wrong I wrote about the Mantissa: Yes, every Mantissa starts with 1 (it is said that such mantissa is normalized), BUT that 1 is not stored in a normalized number (each nonzero exponent has only normalized numbers. mantissas for numbers with exponent 000 0000 0000 do not follow this rule). This means that every normalized mantissa has 52 explicit bits, and an implicit 1. Now: what about the 52 bits? Notice that the 0xFF... has 52 bits length. This means that it will be stored as: 0 for the sign (it is positive), 52 for the exponent, and 52 "1" digits in the mantissa (see a final note at the foot of this answer). Since one "1" is implicit, we'll store 51 "1" and one "0". 0100 0011 0010 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1110 (exponent 1075 corresponds to actual exponent 52) AND the other number has 53 bits: one "1" and 52 "0". Since the first "1" is implicit, it will be stored like: 0100 0011 0100 0000 00…
downvote count: 0

http://stackoverflow.com/comment/39309784
score: 0
type: AnswerComment
has text: awesome so I got the jquery to work, and I saw it give an alert message as well. It still however does not run my other code
type: Comment
comment on: http://stackoverflow.com/a/25225242

http://stackoverflow.com/q/25082659
has comment: http://stackoverflow.com/comment/39026180
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I've been bashing my head at this very simple task. I have a nested list for a drop down menu, I need to add a div AROUND the second so it will work with a framework that wants to see this. I can do it a number of ways that seem really dumb. Anyone have a nice clean way to do it? So, I have this: Portfolio Men ... Rates .... I want to make it look like this: Portfolio Men ... Rates ....
favorite count: 0
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25082734
upvote count: 1
has title: Adding a div around a menu with Jquery
downvote count: 1
has comment: http://stackoverflow.com/comment/39025786
has comment: http://stackoverflow.com/comment/39025777
type: Question
has comment: http://stackoverflow.com/comment/39025776

http://stackoverflow.com/q/25079095
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39019004
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39018797
has comment: http://stackoverflow.com/comment/39018826
has answer: http://stackoverflow.com/a/25079253
has comment: http://stackoverflow.com/comment/39018817
accepted answer: http://stackoverflow.com/a/25079161
type: AnsweredQuestion
has title: Trying to calculate the number of attributes/properties an object has. Javascript
upvote count: 1
has answer: http://stackoverflow.com/a/25079161
downvote count: 1
type: Question
tagged with: object
has body: I've looked online and at previous answers on here but I still can't quite grasp how to use: Object.keys(obj).length Although I'm not sure it's exactly what I want. Lets say for example I have an object called man: this.name = "steve" this.age = 80 this.lives = "london" this.children = 5 How can I easily determine that the man object has 4 properties. I don't need the values of the properties, just the number of them. Thanks.
possible better answer: http://stackoverflow.com/a/25079253

http://stackoverflow.com/q/25165317
has answer: http://stackoverflow.com/a/25165428
has comment: http://stackoverflow.com/comment/39180246
type: Question
has comment: http://stackoverflow.com/comment/39180661
has comment: http://stackoverflow.com/comment/39180271
tagged with: javascript
has title: Use jQuery plugin from asynchronously loaded external script
has comment: http://stackoverflow.com/comment/39180054
tagged with: jquery-plugins
score: 0
answer count: 1
tagged with: jquery
tagged with: asynchronous
linked to: http://stackoverflow.com/q/4915201
has comment: http://stackoverflow.com/comment/39181117
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39180891
has comment: http://stackoverflow.com/comment/39179938
has body: I have a very basic jQuery plugin which I load into my webpage like so: (function() { var tk = document.createElement('script'); tk.src = '//www.test.com/scripts/jq_plugin.js'; tk.type = 'text/javascript'; tk.async = 'true'; tk.onload = tk.onreadystatechange = function() { var rs = this.readyState; if (rs &amp;&amp; rs != 'complete' &amp;&amp; rs != 'loaded') return; }; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tk, s); })(); Then, I call the plugin like so: $(function(){ $('#test').jq_plugin(); }); But when the page loads I am getting this error: Uncaught TypeError: undefined is not a function (anonymous function) I understand why - the plugin is being called before the script is loaded. I know a quick and dirty hack is just to use a setTimeout() around the plugin call but I don't want to do that. I've tried inserting the script before and after jQuery but get the same result. How can I do this without a timeout? This is a stripped down version of the plugin: (function ( $ ) { $.fn.jq_plugin = function(options){ return this.each(function() { return $(this).click(onClick); function onClick(e){ console.log('ID: '+$(this).attr('id')); } }); }; }( jQuery ));

http://stackoverflow.com/a/25273411
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25137825
score: 1
answers question: http://stackoverflow.com/q/25137825
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I found a solution that doesn't change ng-grid code and AngularJS code: var ok = 0 ; $scope.$watch('gridOptions.$gridScope.columns', fff, true); function fff(newv, oldv){ if ( oldv !== newv &amp;&amp; oldv.length === newv.length ) { if ( areTheyEqual(oldv, newv) || isReordered(oldv, newv) ) { console.log('\n\n===== ' + (ok++) + ' ====='); } } } function isReordered(oldv, newv) { for ( var i = 0 ; i &lt; oldv.length ; i++ ) { if ( oldv[i].originalIndex !== newv[i].originalIndex ) { return true; } } return false; } function areTheyEqual(oldv, newv) { for ( var i = 0 ; i &lt; oldv.length ; i++ ) { if ( oldv[i].width !== newv[i].width ) { return false; } } return true; } Now console.log is called only once for every operation: resize, hide, show, reorder, sort. If you want to do something like: react to reorder/show/hide: var ok = 0; $scope.$watch('gridOptions.$gridScope.columns', functionForColumnsChange, true); function functionForColumnsChange(newv, oldv){ if ( oldv !== newv &amp;&amp; oldv.length === newv.length ) { if ( isHideOrShowAction(oldv, newv) || isReordered(oldv, newv) ) { console.log('\n\n===== ' + (ok++) + ' ====='); } } } function isReordered(oldv, newv) { for ( var i = 0 ; i &lt; oldv.length ; i++ ) { if ( oldv[i].originalIndex !== newv[i].originalIndex ) { return true; } } return false; } function isHideOrShowAction(oldv, newv) { for ( var i = 0 ; i &lt; oldv.length ; i++ ) { if ( oldv[i].visible !== newv[i].visible ) { return true; } } return false; }

http://stackoverflow.com/a/25090532
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25090509
has comment: http://stackoverflow.com/comment/39045652
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25090509
has body: You're including (and thus executing) the JavaScript before the elements exist on the page. HTML/JavaScript is processed in the order in which is exists in the DOM. So when this runs: $("li") the parser is only at the top of the HTML body and hasn't loaded any li elements into the DOM yet. Thus, that selector doesn't find anything. Either put the JavaScript at the end of the DOM or wrap it in a document ready handler: $(function () { $("li").on('click', function () { // etc. }); }); (or both)

http://stackoverflow.com/comment/39243000
has text: Why do you need the $.each ??
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25199306

http://stackoverflow.com/q/25131143
type: Question
possible better answer: http://stackoverflow.com/a/25131666
has answer: http://stackoverflow.com/a/25131666
score: 10
tagged with: javascript
has body: in javascript, what is the easiest way to convert this string 798205486e954fa880a0b366e6725f71 to GUID format like this 79820548-6e95-4fa8-80a0-b366e6725f71 this is the messy way I do it :) im looking for the cleanest way var employeeId = shift.employee.id.substring(0, 8) + "-" + shift.employee.id.substring(8, 12) + "-" + shift.employee.id.substring(12, 16) + "-" + shift.employee.id.substring(16, 20) + "-" + shift.employee.id.substring(20, 32);
has comment: http://stackoverflow.com/comment/39116436
has answer: http://stackoverflow.com/a/25131749
downvote count: 2
tagged with: string
has answer: http://stackoverflow.com/a/25131281
favorite count: 0
upvote count: 12
accepted answer: http://stackoverflow.com/a/25131281
has title: Javascript string to Guid
answer count: 5
has answer: http://stackoverflow.com/a/25131350
type: AnsweredQuestion
tagged with: guid
tagged with: uuid
has answer: http://stackoverflow.com/a/25131945

http://stackoverflow.com/q/25217469
has answer: http://stackoverflow.com/a/25218099
answer count: 1
linked to: http://stackoverflow.com/q/4276226
downvote count: 0
favorite count: 0
tagged with: ajax
type: UnansweredQuestion
has title: Why this XMLHttpRequest cause http 406
has comment: http://stackoverflow.com/comment/39290529
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39278517
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39279031
type: Question
has comment: http://stackoverflow.com/comment/39277697
has comment: http://stackoverflow.com/comment/39312616
tagged with: javascript
has comment: http://stackoverflow.com/comment/39278679
tagged with: http-status-code-406
has body: It is a XMLHttpRequest to get a json form. I tested it on 3 different host: localhost: http 200 my test VPS host: 200 my shared host godaddy: 406 I have compared the headers again and again. Then I googled and read so many articles the whole day long.. but still can figure out why.. Few suspicious points to me here : Request URL:h.t.t.p://example.com/oxwall/base/ajax-loader/component/?cmpClass=PHOTO_CMP_AjaxUpload&amp;r=0.41719201277010143 -> 'oxwall' is my php app, a real directory while 'base' is no a real direcoty. XMLHttpRequest is not supported by some configuration of Godaddy? json : i see many reported 406 with Json: My full header that failed: Request URL:http://example.com/oxwall/base/ajax-loader/component/?cmpClass=PHOTO_CMP_AjaxUpload&amp;r=0.41719201277010143 Request Method:POST Status Code:406 Not Acceptable Request Headersview source Accept:application/json, text/javascript, */*; q=0.01 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Connection:keep-alive Content-Length:38 Content-Type:application/x-www-form-urlencoded; charset=UTF-8 Cookie:................. Host:example.com Origin:http://example.com Referer:http://example.com/oxwall/ User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36 X-Requested-With:XMLHttpRequest Query String Parametersview sourceview decoded cmpClass:PHOTO_CMP_AjaxUpload r:0.41719201277010143 Form Dataview sourceview decoded params:%5Bnull%2Cnull%2Cnull%2Cnull%5D Response Headersview source Connection:Keep-Alive Content-Length:404 Content-Type:text/html; charset=iso-8859-1 Date:Sat, 09 Aug 2014 09:20:32 GMT Keep-Alive:timeout=5 Server:Apache mod_fcgid/2.3.10-dev Succesful response in Json: {"content":"&lt;div class=\"ow_photo_upload_wrap\" id=\"add-new-photo-container\"&gt;\n &lt;div class=\"ow_hidden\"&gt;\n &lt;iframe name=\"iframe_upload\" id=\"iframe_upload\" src=\"about:blank\"&gt;&lt;\/iframe&gt;\n &lt;form id=\"upload-form\" target=\"iframe_upload…
has comment: http://stackoverflow.com/comment/39277932
tagged with: oxwall

http://stackoverflow.com/a/76527968
has body: I ran into this issue in bootstrap 5 and just added the overflow-y-scroll class to the body.
type: Answer
answers question: http://stackoverflow.com/q/25070144
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/39217758
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25185490
has text: Maybe you just need to stringify your results - JSON.stringify(self.results())

http://stackoverflow.com/comment/39233451
comment on: http://stackoverflow.com/q/25193042
type: Comment
type: QuestionComment
score: 0
has text: @Christophe - of course it would, but that should be trivial to figure out -> **http://jsfiddle.net/adeneo/r38zj6xz/**

http://stackoverflow.com/q/25152695
upvote count: 2
score: 1
accepted answer: http://stackoverflow.com/a/25152712
has answer: http://stackoverflow.com/a/25152709
downvote count: 1
type: Question
has title: What does += mean in javascript?
tagged with: javascript
duplicate of: http://stackoverflow.com/q/21666210
possible better answer: http://stackoverflow.com/a/25152714
has answer: http://stackoverflow.com/a/25152714
has body: I've been looking online for this answer, and it's so simple so I'm embaressed for asking, but what exactly does the "+=" do in javascript. I don't know why but I can't seem to find this on google. Please help.
answer count: 3
has answer: http://stackoverflow.com/a/25152712
has comment: http://stackoverflow.com/comment/39156442
favorite count: 0
type: AnsweredQuestion

google-maps-api-3
tags question: http://stackoverflow.com/q/25221059
tags question: http://stackoverflow.com/q/25209463
tags question: http://stackoverflow.com/q/25081103
tags question: http://stackoverflow.com/q/25135535
tags question: http://stackoverflow.com/q/25147716
tags question: http://stackoverflow.com/q/25095812
tags question: http://stackoverflow.com/q/25117814
tags question: http://stackoverflow.com/q/25136413
tags question: http://stackoverflow.com/q/25123278
tags question: http://stackoverflow.com/q/25147591
tags question: http://stackoverflow.com/q/25176023
tags question: http://stackoverflow.com/q/25072069
tags question: http://stackoverflow.com/q/25074808
tags question: http://stackoverflow.com/q/25154434
tags question: http://stackoverflow.com/q/25150545
tags question: http://stackoverflow.com/q/25152124
tags question: http://stackoverflow.com/q/25126184
tags question: http://stackoverflow.com/q/25167596
tags question: http://stackoverflow.com/q/25091364
tags question: http://stackoverflow.com/q/25197171
tags question: http://stackoverflow.com/q/25169123
tags question: http://stackoverflow.com/q/25108952
tags question: http://stackoverflow.com/q/25117460
tags question: http://stackoverflow.com/q/25196317
tags question: http://stackoverflow.com/q/25173239
tags question: http://stackoverflow.com/q/25131997
tags question: http://stackoverflow.com/q/25155685
tags question: http://stackoverflow.com/q/25202630
tags question: http://stackoverflow.com/q/25192035
tags question: http://stackoverflow.com/q/25095298
tags question: http://stackoverflow.com/q/25173586
tags question: http://stackoverflow.com/q/25186537
tag name: google-maps-api-3
type: Tag
tags question: http://stackoverflow.com/q/25144781
tags question: http://stackoverflow.com/q/25145359
tags question: http://stackoverflow.com/q/25214835
tags question: http://stackoverflow.com/q/25181593
tags question: http://stackoverflow.com/q/25166818
tags question: http://stackoverflow.com/q/25162746
tags question: http://stackoverflow.com/q/25166019
tags question: http://stackoverflow.com/q/25165511
tags question: http://stackoverflow.com/q/25219346
tags question: http://stackoverflow.com/q/25131571
tags question: http://stackoverflow.com/q/25190955
tags question: http://stackoverflow.com/q/25226617
tags question: http://stackoverflow.com/q/25116948
tags question: http://stackoverflow.com/q/25163979
tags question: http://stackoverflow.com/q/25214206
tags question: http://stackoverflow.com/q/25140974
tags question: http://stackoverflow.com/q/25072892
tags question: http://stackoverflow.com/q/25192737
tags question: http://stackoverflow.com/q/25132983
tags question: http://stackoverflow.com/q/25130090
tags question: http://stackoverflow.com/q/25122475

http://stackoverflow.com/q/25164632
tagged with: javascript
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25164777
answer count: 2
upvote count: 1
has body: What I am trying to do is to make two ajax calls and make each result show up in two different divs of the same page. Here is my Javascript code: function firstLoad(){ firstDiv(datedisplay.value);//populating first div secondDiv(datedisplay.value);//populating second div } function loadXMLDoc(url,cfunc){ if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else{// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=cfunc; xmlhttp.open("GET",url,true); xmlhttp.send(); } function firstDiv(changed_date){ var divided_date = changed_date.split("-"); loadXMLDoc("getmonth.php?m="+divided_date[0]+"&amp;y="+divided_date[1],function(){ if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ document.getElementById("timetableview").innerHTML=xmlhttp.responseText; } }); } function secondDiv(changed_date){ var divided_date = changed_date.split("-"); loadXMLDoc("getmonthexp.php?m="+divided_date[0]+"&amp;y="+divided_date[1],function(){ if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200){ document.getElementById("expensesview").innerHTML=xmlhttp.responseText; } }); } The response content is correct, however what happens now is that: The second div is filled correctly. The first div stays in blank, and if I keep refreshing the page, eventually the content of the second div will show up in the first div as well(weird). Hope you guys can help me.
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25164713
accepted answer: http://stackoverflow.com/a/25164713
type: AnsweredQuestion
tagged with: call
has answer: http://stackoverflow.com/a/25164777
downvote count: 0
score: 1
type: Question
has title: Two ajax calls in two different divs

http://stackoverflow.com/a/25149968
has body: If adding no-cache headers to displayData is not working, I would try adding a random parameter to the Ajax call. I'm assuming here that this line is like an Ajax call. mystore=new dojo.data.ItemFileReadStore({url:"&lt;%=request.getContextPath()%&gt;/displayData.htm?r="+Math.random()}); This will cause IE to see the call as unique. It will still cache it, but should never read the cache unless your random number happens to repeat. You don't have to actually do anything with the parameter on the server-side.
answers question: http://stackoverflow.com/q/25145229
type: Answer
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25145229

http://stackoverflow.com/comment/39033226
comment on: http://stackoverflow.com/q/25085505
score: 0
type: Comment
has text: Can you post a fiddle with an example of your code including the html that is being affected? It may have to do with how you are binding the custom calculation script to the change event, so it would be helpful to see that piece of your work
type: QuestionComment

http://stackoverflow.com/a/28348711
type: Answer
answers question: http://stackoverflow.com/q/25145610
upvote count: 1
downvote count: 0
score: 1
has body: Have you included standalone-frameform.js? Hope this will help.

http://stackoverflow.com/q/25195091
type: Question
has title: Image Uploader for user in KineticJs Canvas
tagged with: javascript
tagged with: image
score: 0
has answer: http://stackoverflow.com/a/25195736
answer count: 1
has body: I'm trying to add an image uploader for users so that they can upload images from their computer onto the canvas and move it/resize like these other images. I don't have an online storage to use php, so is it possible to do this without one. These images they use won't need stored anywhere, will just be used in the canvas that one time and then they'll be able to save the canvas to their computer(so storing the image online shouldn't be needed). Anyways I could really use help with this I'm new to javascript, here is the page I have so far... Remove
tagged with: kineticjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/47654091
has body: According to the docs Angular-ui, you should be defining the popover as uib-popover instead of just popover, and if you would like to bind html to the popover you would either use uib-popover-html="&lt;div&gt; hello &lt;/div&gt;" or template binding uib-popover-template="&lt;&lt;teamplateNameHere&gt;&gt;"
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25215295
type: Answer

http://stackoverflow.com/a/25192336
has body: var formData = {}; $('.form_one_inputs').each(function(){ var $this = $(this); formData[$this.attr('name')] = $this.val(); }); Keep in my this won't work for all input types (ie those that don't use val());
type: Answer
answers question: http://stackoverflow.com/q/25192274
score: 0

http://stackoverflow.com/comment/39231915
score: 0
type: Comment
has text: Have you included jquery on your page?
type: AnswerComment
comment on: http://stackoverflow.com/a/25193311

http://stackoverflow.com/comment/39101072
type: QuestionComment
has text: Just want to say, being a new user +1 for not just writing another 'how do I code' question and actually posting your source.
comment on: http://stackoverflow.com/q/25122453
score: 2
type: Comment

http://stackoverflow.com/comment/39148288
type: AnswerComment
type: Comment
has text: @rlemon - I'm not trolling, this solves the issue just fine, now even without jQuery !
comment on: http://stackoverflow.com/a/25148048
score: 0

http://stackoverflow.com/q/25126342
has answer: http://stackoverflow.com/a/25126606
has comment: http://stackoverflow.com/comment/39107836
downvote count: 3
type: Question
has comment: http://stackoverflow.com/comment/39108212
has comment: http://stackoverflow.com/comment/39107735
tagged with: javascript
score: -3
answer count: 2
upvote count: 0
tagged with: jquery
has title: Restrict jQuery event handler to only one container
favorite count: 0
has body: I have the following code for clicking on a container: And here is the code. $('#toggleSubscribe').click(function() { $('#subscribe &gt; .toggleSubscribe').toggle(); $(this).text(function(i,txt) { return txt === "Subscribe" ? "Unsubscribe" : "Subscribe"; }).toggleClass('myClass'); }); But after I add more containers with the same ID, it breaks. Is there a way to alter the code and keep the toggle just on my div so the whole script can be used in multiple places? Here is a link to the fiddle http://jsfiddle.net/Zmsnd/238/
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25126666

http://stackoverflow.com/comment/39122805
score: 1
type: QuestionComment
has text: @EvanKnowles: Since when do parameter names have _anything_ to do with the names of the passed variables (/functions)?
comment on: http://stackoverflow.com/q/25134598
type: Comment

http://stackoverflow.com/q/25170749
has comment: http://stackoverflow.com/comment/39190716
type: Question
has answer: http://stackoverflow.com/a/25171016
accepted answer: http://stackoverflow.com/a/25171016
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25170941
answer count: 2
tagged with: validation
has body: I am trying to display one piece of form data, the username, on the right side of the same page the form is present in (without page refresh). I want this to happen as soon as I hit submit. For this miniapp, there is no backend (not even local storage). The following is the markup for the right-side of the page: The userArray is defined on the scope and has the usernames pushed into it. {{ user }} This is my main module and controller: var app = angular.module('myApp', ['ngRoute', 'ui.validate']); app.controller('MainCtrl', function($scope){ $scope.userArray = []; console.log($scope.userArray); $scope.submitForm = function(isValid){ if(isValid){ $scope.userArray.push($scope.formData.username); } console.log($scope.userArray); }; }); Currently, the usernames aren't showing up on the front page. Although, they are being pushed into the userArray (I am consoling out the array on the browser). Any help on how to proceed would be greatly appreciated. I am adding the whole index.html here: Registration Registration Page Username Username is required Username is too short. Username is too long. Email Please Enter a valid email. Password Password needs to be at least 8 characters long. Password is too long. Password needs at least one integer, one lowercase letter and one uppercase letter. Password (confirmation) Passwords don't match. Submit {{ user }}
has comment: http://stackoverflow.com/comment/39190636
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39190537
has comment: http://stackoverflow.com/comment/39190610
has title: Displaying form data immediately on the side after submit - Angularjs
has comment: http://stackoverflow.com/comment/39190494
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25170941
tagged with: forms

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/25144819
tags question: http://stackoverflow.com/q/25180398
tags question: http://stackoverflow.com/q/25109936
tags question: http://stackoverflow.com/q/25083383
tags question: http://stackoverflow.com/q/25209533
tags question: http://stackoverflow.com/q/25094275
tags question: http://stackoverflow.com/q/25117562
tags question: http://stackoverflow.com/q/25204782
tags question: http://stackoverflow.com/q/25126737
tags question: http://stackoverflow.com/q/25193911
tags question: http://stackoverflow.com/q/25077548
tags question: http://stackoverflow.com/q/25187515
type: Tag
tags question: http://stackoverflow.com/q/25209971
tags question: http://stackoverflow.com/q/25083467
tags question: http://stackoverflow.com/q/25170570
tags question: http://stackoverflow.com/q/25202162
tags question: http://stackoverflow.com/q/25124277
tags question: http://stackoverflow.com/q/25208348

http://stackoverflow.com/comment/39055175
type: Comment
score: 0
has text: thanks, it's works with your suggestion. I didn't know this function of the brackets...
type: AnswerComment
comment on: http://stackoverflow.com/a/25094089

http://stackoverflow.com/comment/39048682
type: Comment
score: 2
type: AnswerComment
comment on: http://stackoverflow.com/a/25094754
has text: `document.referrer` is the JS equivalent of PHP's `$_SERVER['HTTP_REFERER']`.

http://stackoverflow.com/comment/39148019
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25147910
score: 1
has text: possible duplicate of [Get decimal portion of a number with JavaScript](http://stackoverflow.com/questions/4512306/get-decimal-portion-of-a-number-with-javascript)

http://stackoverflow.com/comment/39165330
score: 1
has text: check your browser console to see whether there are any errors
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25157681

http://stackoverflow.com/comment/39142729
has text: You told it the function was validateVSOE, but the function name is vsoeValidate
comment on: http://stackoverflow.com/a/25128404
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39213822
score: 0
type: AnswerComment
has text: That fixed it :)! Thanks. But can you please explain how can I make cursor work properly after `.replaceWith()` does its work?
type: Comment
comment on: http://stackoverflow.com/a/25127307

http://stackoverflow.com/a/25131666
has body: Cleanest way? Shortest: var txt = shift.employee.id; txt.replace(/([0-z]{8})([0-z]{4})([0-z]{4})([0-z]{4})([0-z]{12})/,"$1-$2-$3-$4-$5"); //"79820548-6e95-4fa8-80a0-b366e6725f71" or if you don't care about the acceptable characters, it can be be even shorter (and cleaner): txt.replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"); //boom! Some don't like using regex for everything, but I liked it.
type: Answer
score: 12
upvote count: 12
downvote count: 0
answers question: http://stackoverflow.com/q/25131143

http://stackoverflow.com/comment/39204273
type: AnswerComment
comment on: http://stackoverflow.com/a/25177307
has text: thank you,my jquery code in too long and with your way i had to write long jquery code on cs file also i test your code but not work!!
type: Comment
score: 0

cordova
tags question: http://stackoverflow.com/q/25195477
tags question: http://stackoverflow.com/q/25173928
tags question: http://stackoverflow.com/q/25131839
tags question: http://stackoverflow.com/q/25228928
tags question: http://stackoverflow.com/q/25165615
tags question: http://stackoverflow.com/q/25153461
tags question: http://stackoverflow.com/q/25089045
tags question: http://stackoverflow.com/q/25153416
tags question: http://stackoverflow.com/q/25213200
tags question: http://stackoverflow.com/q/25181593
tags question: http://stackoverflow.com/q/25194610
tags question: http://stackoverflow.com/q/25118331
tags question: http://stackoverflow.com/q/25160978
tags question: http://stackoverflow.com/q/25179873
tags question: http://stackoverflow.com/q/25109411
tags question: http://stackoverflow.com/q/25152829
tags question: http://stackoverflow.com/q/25082868
tags question: http://stackoverflow.com/q/25142974
tags question: http://stackoverflow.com/q/25188684
tags question: http://stackoverflow.com/q/25219472
tags question: http://stackoverflow.com/q/25138582
tags question: http://stackoverflow.com/q/25159504
tags question: http://stackoverflow.com/q/25179387
tags question: http://stackoverflow.com/q/25164927
tags question: http://stackoverflow.com/q/25205456
tags question: http://stackoverflow.com/q/25135354
tags question: http://stackoverflow.com/q/25071202
tags question: http://stackoverflow.com/q/25161389
tags question: http://stackoverflow.com/q/25164173
tags question: http://stackoverflow.com/q/25139888
tag name: cordova
tags question: http://stackoverflow.com/q/25204340
tags question: http://stackoverflow.com/q/25229469
tags question: http://stackoverflow.com/q/25098575
tags question: http://stackoverflow.com/q/25228599
tags question: http://stackoverflow.com/q/25070444
tags question: http://stackoverflow.com/q/25182943
tags question: http://stackoverflow.com/q/25151915
tags question: http://stackoverflow.com/q/25168402
tags question: http://stackoverflow.com/q/25163497
tags question: http://stackoverflow.com/q/25177609
tags question: http://stackoverflow.com/q/25109255
tags question: http://stackoverflow.com/q/25181830
tags question: http://stackoverflow.com/q/25126673
tags question: http://stackoverflow.com/q/25111242
tags question: http://stackoverflow.com/q/25081375
tags question: http://stackoverflow.com/q/25154332
tags question: http://stackoverflow.com/q/25103975
tags question: http://stackoverflow.com/q/25163334
tags question: http://stackoverflow.com/q/25228194
tags question: http://stackoverflow.com/q/25120749
tags question: http://stackoverflow.com/q/25169285
tags question: http://stackoverflow.com/q/25098915
tags question: http://stackoverflow.com/q/25176878
tags question: http://stackoverflow.com/q/25119637
type: Tag
tags question: http://stackoverflow.com/q/25145610
tags question: http://stackoverflow.com/q/25207087
tags question: http://stackoverflow.com/q/25071105
tags question: http://stackoverflow.com/q/25105727
tags question: http://stackoverflow.com/q/25122713
tags question: http://stackoverflow.com/q/25092516

http://stackoverflow.com/q/25107086
upvote count: 4
has title: How to map HTML markup with plain text equivalent
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39071593
downvote count: 1
has comment: http://stackoverflow.com/comment/39071856
has comment: http://stackoverflow.com/comment/39071582
type: Question
score: 3
has comment: http://stackoverflow.com/comment/39071617
has body: I have some HTML markup that I am displaying with TinyMCE. As an example, the following markup: This is a market. renders as "This is a market." I need to highlight certain specific words whose position etc. is given to me based on the plain text version of the markup. Since the highlighting has to be done in HTML (TinyMCE), I need to find a way to map the plain text back to the HTML markup. In the above sample, the first "T" in the sentence would be at position 3 in HTML markup and at position 0 in plain text. My question(s): 1. How do I go about doing this? I already tried a brute-force approach, i.e., running through the HTML text and wherever the tag ends, start mapping the html markup position to the plain text. The presence of newlines etc. does seem to trip it up. Any help is welcome.
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25165620
has comment: http://stackoverflow.com/comment/89708998
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 13
accepted answer of: http://stackoverflow.com/q/25165511
score: 13
has body: Try: marker.set('labelContent', 'sdda'); Reading through the marker label source code, the MarkerLabel object extends from google.maps.Marker. Whenever you call the .set() method on the MarkerLabel object, an event is raised which refreshes the marker. So calling marker.set('labelContent', 'sdda'); will raise a 'labelcontent_changed' event, which in turn makes the marker set it's inner content this.setContent() Here is an excerpt from the source code: @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor. The properties available are the same as for google.maps.Marker with the addition of the properties listed below. To change any of these additional properties after the labeled marker has been created, call google.maps.Marker.set(propertyName, propertyValue).
answers question: http://stackoverflow.com/q/25165511

http://stackoverflow.com/a/25191348
has comment: http://stackoverflow.com/comment/39229624
has body: You can use ajax to post to your server, and respond accordingly. $.ajax({ type: "POST", url: "register.php", data: data, // your form data goes here success: function(result_of_query) { // show alert that "this email address is already in use" based on result_of_query. }, dataType: dataType });
answers question: http://stackoverflow.com/q/25191251
downvote count: 0
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39229680

http://stackoverflow.com/comment/39147521
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25147346
type: Comment
has text: @Dalorzo Can you please explain a bit what we are doing wrong & how should we correct it?

http://stackoverflow.com/comment/39478219
comment on: http://stackoverflow.com/q/25167759
score: 0
type: Comment
has text: The implementation varies depending on the scope of the problem and how the actual feature is a part of a bigger span. I also usually cache my data(as a promose) in the service which means that I have to check the cache before making the request. But if I were to solve your problem I would probably handle the request in then service and return a $q promise. Then unwrap the promise in the controller only containing either data och error-message. Hope this helps.
type: QuestionComment

http://stackoverflow.com/comment/39276048
score: 0
type: AnswerComment
has text: @AyazShah: I see you've already got your fiddle, this might be useful as well.
type: Comment
comment on: http://stackoverflow.com/a/25216170

http://stackoverflow.com/comment/39108691
has text: @Joshua Correct: both SPARQL queries work as intended. Apologize for flattening the SPARQL structure. Correct: query 1 binds ?person ?date ?caption. Query 2 binds ?food ?caption. In the examples, JSON is extracted & returned in $.ajax function. I am considering doing this in 3 separate steps to debug: (1) SPARQL; (2) format JSON; (3) function handle_json(json). IMHO, my error is local to this statement: $('#raw_output').text(JSON.stringify(data, null, 3));. I don't grok the JSON.stringify and believe the error is there. The URL at top works; am trying to repurpose it in ex. #2.
comment on: http://stackoverflow.com/q/25094765
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39176052
comment on: http://stackoverflow.com/a/25162876
type: AnswerComment
has text: Of course it can be done with promises, but do you want to use native promises, which are only supported in newer browsers, do you want to use a library that implements promises, like Bluebird, or are you already using jQuery, which has it's own version of promises etc.
score: 0
type: Comment

http://stackoverflow.com/a/25145379
type: Answer
has body: I can use a div tag inside my a tag and put whatever content I want in there. <img src="<%=context%>/images/defaultAvatar.png"/> Computer
score: 0
answers question: http://stackoverflow.com/q/25144264

http://stackoverflow.com/a/25173657
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25173564
downvote count: 0
type: Answer
has body: If your strings are always in this format, match the digits at the end of the string. var r = '*#13**67*124##'.match(/\d+(?=#+$)/); if (r) console.log(r[0]); // =&gt; "124" Multi-line matching: var s = '*#13**67*2##\n*#13**67*124##\n*#13**67*1##', r = s.match(/\d+(?=#+$)/gm) console.log(r); // =&gt; [ '2', '124', '1' ] Perhaps splitting the string? var r = '*#13**67*124##'.split(/[*#]+/).filter(Boolean).pop() console.log(r); // =&gt; "124"
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25173564

http://stackoverflow.com/a/25144303
score: 1
accepted answer of: http://stackoverflow.com/q/25144050
answers question: http://stackoverflow.com/q/25144050
has comment: http://stackoverflow.com/comment/39140744
type: AcceptedAnswer
downvote count: 0
has body: Use .toolbar() method to change theme of header and/or footer. $(".selector").toolbar({ theme: "b" /* swatch */ }); .selector = [data-role=header], [data-role=footer], #id or .class. Demo
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39140915

http://stackoverflow.com/comment/39197604
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25174266
type: AnswerComment
has text: yes, I have searched some materials, but it seems that there can only be a focus on elements at the same time.

http://stackoverflow.com/q/25103127
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25103230
has answer: http://stackoverflow.com/a/25103230
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25103286
favorite count: 0
accepted answer: http://stackoverflow.com/a/25103201
has answer: http://stackoverflow.com/a/25103317
upvote count: 1
has body: I have this JSFiddle where I am trying to make it so that the items in an unordered list are visible only if the option selected in a drop down matches their class. List items may have multiple classes, but so long as at least one class matches, the item should be made visible. The Javascript looks like this: function showListCategories() { var selection = document.getElementById("listDisplayer").selectedIndex; var unHidden = document.getElementsByClassName(selection); for (var i = 0; i &lt; unHidden.length; i++) { unHidden[i].style.display = 'visible'; } }; The idea is that it gets the current selection from the drop down, creates an array based on the matching classes, then cycles through each item and sets the CSS to be hidden on each one. However, it's not working. Can anyone tell me where I'm going wroing? Note that I haven't yet coded the "show all" option. I think I'll probably be able to figure that out once I have this first problem solved.
answer count: 4
type: AnsweredQuestion
has title: How do I filter an unorderded list to display only selected items using Javascript?
score: 1
has comment: http://stackoverflow.com/comment/39063931
type: Question
has answer: http://stackoverflow.com/a/25103201

http://stackoverflow.com/comment/39254716
comment on: http://stackoverflow.com/q/25205534
score: 2
type: Comment
type: QuestionComment
has text: The dialog is just another `div`. if you want to insert info into it, select the appropriate child element in the dialog div and append to that. You need to show the other code, e.g. `showKeyIngredients`, to get better answers.

http://stackoverflow.com/a/25236317
type: Answer
upvote count: 1
has body: I'll put the code that fixed the issue for me here in hopes it helps somebody else someday that may search and find it. By putting the below code in the head of the page, under the... ...library (which is the random characters/numbers .js that SublimeVideo gives you in your account area), I was able to finally get the above detailed problem to work (YAY!!!). So, using the same example as above, this URL now works as I needed (by not only taking you to the resources page, but also by launching the particular video in its lightbox). http://example.com/resources.php#video=interview2 ...and by putting: RewriteRule ^resources$ resources.php [L] ...in the .htaccess file in the same dir, I was able to make it even easier for the user: http://example.com/resources#video=interview2 As I understand it, the below JavaScript addition finds the hash, then looks for the "video=", then takes whatever is after that, and if it finds a matching "id" in an "a" tag, then it tells it to do it's SublimeVideo thing by launching that video in the lightbox. Brilliant! Here's the HTML part (for reference): video2 text link on page that i left as reference for the user in case they close the video that was launched from the publication Also note: I found out through trial and error that the name of the video in the URL, after the "#video=" must be the same as the "ID" in the "A" tag, not the "video" tag! So, you'll notice that the "id=" is (and needs to be) different between the two. The "id=" in the "video" tag is instead the same as the "href=".
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25213030
answers question: http://stackoverflow.com/q/25213030

http://stackoverflow.com/comment/39090555
comment on: http://stackoverflow.com/q/25117363
type: Comment
type: QuestionComment
has text: can you put this into fiddle?
score: 0

http://stackoverflow.com/a/25132776
has body: in the each loop, mention itemController="ListsController" and write the sortBy function in the ListsController. Bascially with this you are indicating which controller the action should bubble up.
type: Answer
answers question: http://stackoverflow.com/q/25132629
score: 0

http://stackoverflow.com/q/25121384
linked to: http://stackoverflow.com/q/18394871
has comment: http://stackoverflow.com/comment/39098206
has answer: http://stackoverflow.com/a/25253060
has answer: http://stackoverflow.com/a/58201210
has comment: http://stackoverflow.com/comment/39098250
has answer: http://stackoverflow.com/a/25280856
type: Question
has answer: http://stackoverflow.com/a/35014876
tagged with: internet-explorer
tagged with: javascript
upvote count: 13
answer count: 6
tagged with: jquery
has comment: http://stackoverflow.com/comment/39359144
has title: IE download file
has body: Using the following lines of code I am able to download a file in the response of a Ajax call in Firefox, Chrome, Opera. However in IE the href attribute download is not supported. Therefore the below does not work in IE. HTML: &lt;div class="fRight" style="margin-left:5px; margin-rigth:5px" &gt; &lt;input type="button" value="Request File" id = "chReqFileBtn" onclick = "handleClick"/&gt; &lt;a href="#" id="challengeReqFileAnchor" style="visibility: hidden"&gt;&lt;/a&gt; &lt;/div&gt; JavaScript: function handleClick() { var code = $('#code').val(); var quantity = $('#quantity').val(); var req = $.ajax( { 'type': 'POST', 'url' : $apiBasePath+'config/challenge-file', contentType : 'application/json', 'data': JSON.stringify({'code':code, 'quantity':quantity}), 'success':function(response, status, xhr) { var code = xhr.getResponseHeader('Operation-Code'); var anch = $('#challengeReqFileAnchor'); anch.attr( { "download" : 'request.bin', "href" : "data:text/plain," + response }); anch.get(0).click(); }, 'error': function(request,status,errorThrown) { ...... } }); $pendingReqs.push(req); } What options would I have to accomplish the same behavior in IE as well?
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has comment: http://stackoverflow.com/comment/39098806
favorite count: 0
has comment: http://stackoverflow.com/comment/39311404
has comment: http://stackoverflow.com/comment/39098235
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25179390
has answer: http://stackoverflow.com/a/52991347
score: 13

http://stackoverflow.com/comment/39094577
type: Comment
comment on: http://stackoverflow.com/q/25116261
score: 0
type: QuestionComment
has text: That's exactly it, I know it's because I have the first variables inside the click event... but when I move them outside of the event it doesn't load them (they return as null).

http://stackoverflow.com/comment/39050344
comment on: http://stackoverflow.com/q/25095777
score: 2
has text: You're calling the DOM ready function uneccessary two extra times, it won't be noticeable, but why would you when you don't have to.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25196931
has comment: http://stackoverflow.com/comment/39239520
has body: The problem is that there is already a $digest cycle running (obviously watch one) when you try to trigger an event. So you should simply wait until its done and raise the event during the next one. You can $timeout service for that: app.directive("autoSubmit", function($timeout) { return { link: function(scope, element, attrs) { scope.$watch("valid", function() { if (scope.valid == 1) { console.log("send form"); $timeout(function() { element.triggerHandler('submit'); }) } }); } } }); Demo: http://plnkr.co/edit/bRXfi9kFVFICgFUFvtZz?p=preview Another way around is to invoke ngSubmit function manually yourself using $parse service: app.directive("autoSubmit", function($parse) { return { link: function(scope, element, attrs) { scope.$watch("valid", function() { if (scope.valid == 1) { console.log("send form"); var submitHandler = $parse(attrs.ngSubmit)(scope); if (submitHandler) { submitHandler(); } } }); } } }); Demo: http://plnkr.co/edit/vNI8OwfnxSQJ6tQLpFqZ?p=preview
has comment: http://stackoverflow.com/comment/79807063
has comment: http://stackoverflow.com/comment/55878109
has comment: http://stackoverflow.com/comment/39255070
type: AcceptedAnswer
upvote count: 16
has comment: http://stackoverflow.com/comment/39238627
type: Answer
has comment: http://stackoverflow.com/comment/55878642
accepted answer of: http://stackoverflow.com/q/25196722
downvote count: 0
answers question: http://stackoverflow.com/q/25196722
score: 16

http://stackoverflow.com/a/25180478
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39207559
downvote count: 0
answers question: http://stackoverflow.com/q/25180310
type: Answer
has comment: http://stackoverflow.com/comment/39207740
has comment: http://stackoverflow.com/comment/39207918
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39207468
has body: I think the whole page is wrapped in a div which have a 100% height and 100% width. So you have a control over everything inside that element. You can achieve that by using css3 transform: scale(value); and of course jQuery see samples here
accepted answer of: http://stackoverflow.com/q/25180310

http://stackoverflow.com/comment/40174103
score: 0
type: Comment
has text: Personally, I just stick with console.log(). It's easier to type and gets me the results I need.
type: AnswerComment
comment on: http://stackoverflow.com/a/25202191

http://stackoverflow.com/q/25111231
possible better answer: http://stackoverflow.com/a/25112538
tagged with: javascript
type: Question
tagged with: harp
score: 1
favorite count: 0
has body: Is there a way to check which page are you in Jade and include something (a partial page or a specific CSS Style) based in that page? For example: If I am in homepage, then include just the HOMEPAGE-head.jade Else - include the NORMAL-head.jade Here is an in context example: doctype html html body if HOMEPAGE include ./includes/HOMEPAGE-head.jade else include ./includes/NORMAL-head.jade h1 My Site p Welcome to my super lame site. include ./includes/foot.jade Thank you!
upvote count: 2
has answer: http://stackoverflow.com/a/25111339
downvote count: 1
tagged with: node.js
has title: Jade Includes conditionals to check the actual page
has answer: http://stackoverflow.com/a/48839316
accepted answer: http://stackoverflow.com/a/25111339
answer count: 3
has answer: http://stackoverflow.com/a/25112538
tagged with: pug
type: AnsweredQuestion

http://stackoverflow.com/comment/39158246
type: QuestionComment
has text: That clears the local array 'a' thats sent to function but not actual array. You can do it like below, function clearArray(a){ storeArray = a; } function undoClearArray(a){ a = storeArray; }
score: 0
comment on: http://stackoverflow.com/q/25153618
type: Comment

http://stackoverflow.com/a/25182632
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39295804
type: Answer
has comment: http://stackoverflow.com/comment/39295288
accepted answer of: http://stackoverflow.com/q/25179548
has body: When you write EL(Expression Language) in your .jsp file, that .jsp file is parse by its JSP container and EL are processed. Consider the following code : anyfile.jsp &lt;script type="text/javascript"&gt; function testJs() { alert("${testString}"); // JSP Container will replace '${testString}' with its value } &lt;/script&gt; JSP container did not processed any of the above code Except EL, and therefore only ${testingString} is replaced. I mean, container do not know about &lt;script&gt; or function testJs(). JSP container will only process the files with .jsp (or .jspx, or some other files) extension. In the above code your javascript was inside .jsp file. But on the other hand, when you replaced above code with this - &lt;script src="resource/js/test.js" &gt;&lt;/script&gt; Now the previous code is inside test.js file. But how container can know about that! You are expecting JSP container to understand this code i.e. to understand that test.js is added as javascript in the .jsp file by using &lt;script&gt; element and src attribute. But it didn't. Container actually not have to do anything with this code. And your code will be sent to client without any changes. But if you stills want to use your javascript code to work from other file, you can use following code : anyfile.jsp &lt;script type="text/javascript"&gt; &lt;jsp:include page="test.jsp" /&gt; &lt;/script&gt; And test.jsp &lt;%@page contentType="text/javascript" pageEncoding="UTF-8"%&gt; function go() { alert("${testString}"); }
has comment: http://stackoverflow.com/comment/39295490
answers question: http://stackoverflow.com/q/25179548
has comment: http://stackoverflow.com/comment/39295334
has comment: http://stackoverflow.com/comment/39295617
has comment: http://stackoverflow.com/comment/39295852
score: 0

http://stackoverflow.com/comment/39191331
comment on: http://stackoverflow.com/q/25171258
has text: Because prototyping inherits the properties.
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25197244
score: 1
upvote count: 1
type: AcceptedAnswer
has body: I doubt that temp = temp - 0 // temp is number , 111 yields the result you mentioned there. See http://jsbin.com/faquvobo/1/edit?js,output You have an observation error (maybe you actually used temp = 0 + temp;). General explanation: The + operator is overloaded and the - operator isn't. If you use the + operator and one operand is a string, the operand is converted to a string and string concatenation is performed (instead of addition). The - operator is only defined for numbers, so both operands are converted to numbers first and subtraction is performed.
type: Answer
answers question: http://stackoverflow.com/q/25197207
has comment: http://stackoverflow.com/comment/39245661
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25197207

http://stackoverflow.com/comment/39135869
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25141599
has text: That seems to do the job, thanks, why not answer?, you think it could not work?

http://stackoverflow.com/comment/39148091
type: Comment
score: 0
type: AnswerComment
has text: This is kind of a shameless plug, but I created [Beacon](https://github.com/gburghardt/beacon) as a way to do application level events decoupled from the DOM. Searching [GitHub](https://github.com) or [Bower](http://bower.io/search/) could also turn up alternatives.
comment on: http://stackoverflow.com/a/25145225

http://stackoverflow.com/comment/55016581
type: Comment
comment on: http://stackoverflow.com/a/25240262
score: 1
has text: Yes, I had the same problem. Not sure exactly what's going on but I can see that without setting font-size to 0 that BC's JS recalculates the font-size on #outerImageContainer every time a thumbnail is clicked and gets itself into all sorts of trouble - the font-size gets bigger and bigger every time, resulting in insane heights on the lightbox container.
type: AnswerComment

http://stackoverflow.com/q/25076396
has answer: http://stackoverflow.com/a/25076579
has comment: http://stackoverflow.com/comment/39014222
type: Question
has comment: http://stackoverflow.com/comment/39013925
answer count: 2
has comment: http://stackoverflow.com/comment/39014337
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/4544648
has body: How do I echo php inside javascript correctly? var timeDiff = 60-20; if ( timeDiff &lt;= 60 ) { var stamp = timeDiff &lt;?php echo $this-&gt;__('second ago') . '.'; ?&gt;; } Console error: Uncaught SyntaxError: Unexpected identifier It does echo out 'second ago' in chromes Sources, followed by the error though.
possible better answer: http://stackoverflow.com/a/25076579
has comment: http://stackoverflow.com/comment/39013926
has answer: http://stackoverflow.com/a/25076564
accepted answer: http://stackoverflow.com/a/25076564
favorite count: 0
score: -3
tagged with: php
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39013996
has title: Javascript - how to echo php in javascript
downvote count: 3

http://stackoverflow.com/comment/39177624
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25164156
has text: No need to pollute the global namespace, but otherwise, yes.
type: AnswerComment

http://stackoverflow.com/a/28475755
has body: The problem is validate.js only validates the first element with name eg: myName[] We need to edit a function checkform in validate.js in order to fix it. checkForm: function() { this.prepareForm(); for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) { if (this.findByName( elements[i].name ).length != undefined &amp;&amp; this.findByName( elements[i].name ).length &gt; 1) { for (var cnt = 0; cnt &lt; this.findByName( elements[i].name ).length; cnt++) { this.check( this.findByName( elements[i].name )[cnt] ); } } else { this.check( elements[i] ); } } return this.valid(); } Demo fiddle: https://jsfiddle.net/abhiklpm/6fmk3d0v/ Reference : http://www.codeboss.in/web-funda/2009/05/27/jquery-validation-for-array-of-input-elements/
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25202104
upvote count: 1
type: Answer

http://stackoverflow.com/comment/138405425
type: Comment
has text: $("#mySelect2").select2("val", "0"); This answer working for me. Thank you so much.
comment on: http://stackoverflow.com/a/27964808
score: 0
type: AnswerComment

http://stackoverflow.com/q/25220485
tagged with: javascript
tagged with: regex
has answer: http://stackoverflow.com/a/25221182
has answer: http://stackoverflow.com/a/42585537
type: UnansweredQuestion
type: Question
tagged with: jquery-ui
has body: I am using the JQuery UI Autocomplete javascript program. I am trying to find all the words in the search box in any order. That means if I search for "Three One Two" I want it to be selected if in the database there is a entry called "One Two Three". It sounds complicated but it really shouldn't be. Here is my code: $( "#autocomplete" ).autocomplete({ max:10, minLength:2, source: function (request, response) { var term = request.term; var list = term.split(" "); var arr = [ ]; for (var i = 0; i &lt; list.length; i++) { var buf = "/"+list[i]+"/"; arr.push(buf); } var rez = []; for (var n = 0; n &lt; availableTags.length; n++) { for (var i = 0; i &lt; arr.length; i++) { if(arr[i].test(availableTags[n]){ rez.push(abailableTags[n]); } } } response(rez); return; } }); It doesn't work yet. If someone could offer me any pointers in this code and perhaps tell me where i have gone wrong it would be awesome! I can get JQuery Autocomplete to work, but can't get it to match the RegEx search terms. Thanks!
has title: JQuery UI Autocomplete, Find all words in any order
score: 0
answer count: 2
tagged with: jquery-ui-autocomplete

http://stackoverflow.com/comment/39219518
has text: The OP is already using a closure. The solution is to call a function to create a new scope.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25185959
type: Comment

http://stackoverflow.com/comment/39195962
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25160029
has text: @Akhlesh - the link shows `NOT FOUND`, link is expired or misspelled.
score: 0

http://stackoverflow.com/comment/39121381
type: AnswerComment
has text: What do you think `$('image[itemprop = image]').each(...)` does?
type: Comment
comment on: http://stackoverflow.com/a/25118702
score: 0

http://stackoverflow.com/q/25085306
has title: JavaScript space-separated string to camelCase
tagged with: javascript
downvote count: 6
has comment: http://stackoverflow.com/comment/39030980
has comment: http://stackoverflow.com/comment/39034343
upvote count: 3
tagged with: camelcasing
answer count: 1
has comment: http://stackoverflow.com/comment/39035351
has comment: http://stackoverflow.com/comment/39030975
favorite count: 0
has answer: http://stackoverflow.com/a/25085468
accepted answer: http://stackoverflow.com/a/25085468
has body: I've seen plenty of easy ways to convert camelCaseNames to camel Case Names, etc. but none on how to convert Sentence case names to sentenceCaseNames. Is there any easy way to do this in JS?
duplicate of: http://stackoverflow.com/q/2970525
score: -3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39034543
linked to: http://stackoverflow.com/q/2970525
type: Question
has comment: http://stackoverflow.com/comment/39034208
has comment: http://stackoverflow.com/comment/39035418
tagged with: sentencecase
has comment: http://stackoverflow.com/comment/39030952

http://stackoverflow.com/a/25075160
upvote count: 6
score: 6
has body: There doesn't appear anything wrong with your code. I'm sure the prototype properties are only listed as a convenience when there are only a few instance properties. Expanding the logged object reveals that all properties are where they are supposed to be.
has comment: http://stackoverflow.com/comment/39011727
downvote count: 0
has comment: http://stackoverflow.com/comment/39011754
type: Answer
answers question: http://stackoverflow.com/q/25074816

http://stackoverflow.com/q/25224265
score: 0
answer count: 1
tagged with: asynchronous
type: AnsweredQuestion
has body: I'm stuck with two external libraries and using them together. One only has an async interface and the other requires me to return a value from the callback. // this function is called as a callback from an external library // it is required that the function returns a certain value function onevent() { // the callback for the "thirdparty.foo" function // with the result that must be returned from onevent function ondone(result) { // ??? } // this is a call to a third party library that only has this asynchronous interface thirdparty.foo(ondone); // ??? return result; } JavaScript is pretty new for me and I was unable to find any solution for this problem. I'm looking to something to be able to wait for the completion of ondone before returning from onevent. Comparable from C++ would be .wait or .get from a std::future.
accepted answer: http://stackoverflow.com/a/25224283
type: Question
has comment: http://stackoverflow.com/comment/39289606
tagged with: javascript
has title: Callbacks and returning values
has answer: http://stackoverflow.com/a/25224283

http://stackoverflow.com/q/25132170
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25153143
score: 1
has answer: http://stackoverflow.com/a/25133485
type: Question
accepted answer: http://stackoverflow.com/a/25133485
tagged with: javascript
answer count: 2
tagged with: firefox-addon
downvote count: 0
favorite count: 0
has body: I need to notify tabs whenever someone does store on handlerInfo of mailto protocol. So I can notify my tabs that it was updated and it should refersh to show latest information. This is what I need to watch: var handlerInfo = Cc['@mozilla.org/uriloader/external-protocol-service;1'].getService(Ci.nsIExternalProtocolService).getProtocolHandlerInfo('mailto'); Cc['@mozilla.org/uriloader/handler-service;1'].getService(Ci.nsIHandlerService)store(handlerInfo) I checked MXR and found this: http://mxr.mozilla.org/mozilla-release/source/uriloader/exthandler/nsIHandlerService.idl#78 68 /** 69 * Save the preferred action, preferred handler, possible handlers, and 70 * always ask properties of the given handler info object to the datastore. 71 * Updates an existing record or creates a new one if necessary. 72 * 73 * Note: if preferred action is undefined or invalid, then we assume 74 * the default value nsIHandlerInfo::useHelperApp. 75 * 76 * @param aHandlerInfo the handler info object 77 */ 78 void store(in nsIHandlerInfo aHandlerInfo); It says it updates the datastore and there's no code in the store function. I was wondering how can I watch update to this datastore?
has title: How to watch nsIHandlerService.store(handlerInfo)
upvote count: 1
possible better answer: http://stackoverflow.com/a/25153143

http://stackoverflow.com/a/25089836
has comment: http://stackoverflow.com/comment/39106527
has comment: http://stackoverflow.com/comment/39107225
accepted answer of: http://stackoverflow.com/q/25089601
has body: I'm not sure if I really understood well your needs. I'll post this answer to check if it helps you but I can delete it if it doesn't. So, is this what you want using this regex: "\w+?" Working demo By the way, if you just want to get the content within "..." you can use this regex: "(\w+?)" Working demo
upvote count: 2
answers question: http://stackoverflow.com/q/25089601
type: AcceptedAnswer
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/39106814
score: 1

http://stackoverflow.com/a/25116450
has comment: http://stackoverflow.com/comment/39124384
has comment: http://stackoverflow.com/comment/39157651
has comment: http://stackoverflow.com/comment/39124213
downvote count: 0
has body: You can use ko.computed for filtering the data. //filter html binding &lt;input type="text" required id="filterD" class="form-control" data-bind="value:filter,valueUpdate: 'keyup'" /&gt;// use valueUpdate binding //bind filter to filter text self.filter = ko.observable(); //Use filteredList in html binding instead of controlFields self.filteredList = ko.computed(function () { var filter = self.filter(), arr = []; if (filter) { ko.utils.arrayForEach(self.controlFields(), function (item) { if (item.code() == filter || item.title() == filter) { arr.push(item); } }); } else { arr = self.controlFields(); } return arr; }); Fiddle Demo //sorry for ui part(Html alignment) in demo.
score: 1
has comment: http://stackoverflow.com/comment/39124326
has comment: http://stackoverflow.com/comment/39088957
has comment: http://stackoverflow.com/comment/39124247
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25115942
has comment: http://stackoverflow.com/comment/39123979
has comment: http://stackoverflow.com/comment/39157218
has comment: http://stackoverflow.com/comment/39169463
accepted answer of: http://stackoverflow.com/q/25115942
type: Answer

http://stackoverflow.com/comment/39080201
score: 0
type: Comment
type: QuestionComment
has text: No, DOM events are fired. You're doing something else or Opera does not behave in the standard way in regards to userscripts and (i)frames (Doubtful, but there may be a setting you need to set).
comment on: http://stackoverflow.com/q/25111175

http://stackoverflow.com/comment/39220556
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25187239
has text: I was using jquery .load() function with no selectors specified.
score: 0

http://stackoverflow.com/comment/39044706
has text: JavaScript can be contained within HTML ` ` elements, if that what is meant .. but there is no such similar concept in CSS.
comment on: http://stackoverflow.com/q/25092594
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39118551
type: Comment
type: QuestionComment
has text: You can use: `var valid = /^\/MonkeyText\/mserver\d+\/$/.test(input);`
comment on: http://stackoverflow.com/q/25132308
score: 0

http://stackoverflow.com/q/25143413
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39139007
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25143515
accepted answer: http://stackoverflow.com/a/25143515
has title: dynamic radio buttons not appearing in IE
has body: When I click in one of the table cells, radio buttons appear. when i select radio button the table cell text and background color will modify. This scenario is working fine in chrome and FF but not in IE . In IE, i could not able to see the radio buttons once clicked on the table cell.I can see the javascript error "Object Expected" in the browser console. Please suggest do i need to modify the code in order to make it work in IE. IE8 is the version I'm using. Below is the sample code: function showData(index, id, name){ var rOptions = document.getElementById("options"); if (rOptions == null){ //logic } $('.one').live('click', function() { if($(this).hasClass("one")) { deselect(index, name); } }); } Thanks.
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/25168187
type: Answer
answers question: http://stackoverflow.com/q/25168112
has body: Without being able to see any more of your code it sounds like you need to set the rows to unique id's. Try passing $(this).attr('id');
score: 0

http://stackoverflow.com/q/25161463
has comment: http://stackoverflow.com/comment/39173712
type: Question
answer count: 1
has body: I need to restrict user to input minus symbol. How to do it useing following jQuery I have got? $("#Age").keydown(function (e) { // Allow: backspace, delete, tab, escape, enter if ($(this).val().length &lt;= 2 || $.inArray(e.keyCode, [46, 8, 9, 27, 13, 110]) !== -1 || (e.keyCode &gt;= 35 &amp;&amp; e.keyCode &lt;= 39)) { // let it happen, don't do anything return; } else { event.preventDefault(); } // Ensure that it is a number and stop the keypress if ($(this).val().length &lt;= 2 || (e.shiftKey || (e.keyCode &lt; 48 || e.keyCode &gt; 57)) &amp;&amp; (e.keyCode &lt; 96 || e.keyCode &gt; 105)) { e.preventDefault(); } else { event.preventDefault(); } }); }); // end of $
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39172194
has answer: http://stackoverflow.com/a/25161631
score: 0
has title: Restrict to input minus symbol
has comment: http://stackoverflow.com/comment/39172780
accepted answer: http://stackoverflow.com/a/25161631
linked to: http://stackoverflow.com/q/1898129
type: AnsweredQuestion

http://stackoverflow.com/comment/39277322
type: QuestionComment
score: 1
has text: You mean that `theme.js` is not enqueued? Does `bootstrap.js` get enqueued?
comment on: http://stackoverflow.com/q/25217128
type: Comment

http://stackoverflow.com/comment/39083737
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25113558
type: Comment
has text: Also hunted [this](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) down, it explains with different examples some of what I posted, and a few more that I didn't.

http://stackoverflow.com/comment/39164020
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25156094
type: Comment
has text: Thank you guys for your help. If I want to change the bgcolor of row only after hovering(meaning...i have a tooltip on each row. I want to change the color only after viewing a tooltip) for 1 or 2 seconds. How to achieve this? With my current code, the color changes for all rows whereever my mouse-cursor touches after 1 second delay. My objective is to distinguish what all rows have been viewed(meaning viewing the tooltip). To put it simple. I want to change the color of row only after having my cursor for atleast 1 or 2 sec. Sorry for lengthy explanation. thanks in advance!

http://stackoverflow.com/comment/39104462
comment on: http://stackoverflow.com/a/25124258
score: 0
type: AnswerComment
type: Comment
has text: What output are you expecting? Are you getting any output at all?

http://stackoverflow.com/a/25120613
has body: I'd do something like this: if (some condition) { //Standard HTML-element/tag manipulation $("#obj1").append('&lt;a class="trigger"&gt;Click Me &lt;/trigger&gt;'); $(".SomeClass").remove(); ...... Part2(); } else { //HTML-element/tag manipulation after $.ajax-call $.ajax({ //perform ajax-call }) .done(function (data) { $("#obj1").append('&lt;a class="trigger"&gt;' data.someProp '&lt;/trigger&gt;'); Part2(); }) } function Part2() { $(".trigger").Click(function() { Somefunction() }); }
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25120451
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39099186
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25118473
has text: id this your second solution if (Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) wv.getSettings().setAllowUniversalAccessFromFileURLs(true);?
type: AnswerComment

http://stackoverflow.com/q/25204277
has comment: http://stackoverflow.com/comment/39253472
has comment: http://stackoverflow.com/comment/39252361
has comment: http://stackoverflow.com/comment/39253664
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39255035
has title: AngularJS: add filter to type="number" input element before angular parse anything
score: 1
has comment: http://stackoverflow.com/comment/39253259
accepted answer: http://stackoverflow.com/a/25205047
linked to: http://stackoverflow.com/q/14302267
type: Question
tagged with: angularjs-directive
downvote count: 0
has comment: http://stackoverflow.com/comment/39253578
has answer: http://stackoverflow.com/a/25205047
tagged with: javascript
linked to: http://stackoverflow.com/q/11616636
has comment: http://stackoverflow.com/comment/39252987
has comment: http://stackoverflow.com/comment/39253158
has comment: http://stackoverflow.com/comment/39253279
has comment: http://stackoverflow.com/comment/39253672
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39252816
has comment: http://stackoverflow.com/comment/39252275
tagged with: angularjs
has body: My web application is for persian users and they may enter numbers in persian digits. I want to add a directive to my &lt;input&gt; elements with type="number" which converts persian digits to english digits. I should do this because I want to calculate sum of values of models binded to inputs. this is minified html code: &lt;input type="number" ng-model="item.count1"&gt; &lt;input type="number" ng-model="item.count2"&gt; total count: {{item.count1 + item.count2}} after reading best answer to this question I write this directive: module.directive('input', function() { return { restrict: 'E', require: 'ngModel', link: function (scope, element, attr, ngModel) { if (attr.type !== 'number') return; function toEnglishNumber(value) { if (!value) { return; } var englishNumbers = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"], persianNumbers = ["۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹", "۰"]; for (var i = 0, numbersLen = persianNumbers.length; i &lt; numbersLen; i++) { value = value.replace(new RegExp(persianNumbers[i], "g"), englishNumbers[i]); } console.log(value); return value; } function fromUser(text) { return toEnglishNumber(text); } ngModel.$parsers.push(fromUser); } }; }); When I enter persian digits in input element, toEnglishNumber function is not called (console.log(value) is not invoked). but when I enter english digits this function id called. I think angular is ignoring value because it is not a number. how can I tell angular let me parse the value before ignoring it? or is there a better solution? thanks!
has comment: http://stackoverflow.com/comment/39253018
upvote count: 1

http://stackoverflow.com/q/25095869
has answer: http://stackoverflow.com/a/25095957
score: 0
has body: I have current hour and I want to count how many hours have passed since the start of the night. For example night started at 19:00 and current hour is 4:00, how can I calculate this (especially it must work in both cases e.g. 23:00 and 4:00)? I only have this: now = new Date(), now = now.getHours(); night_start = 19;
linked to: http://stackoverflow.com/q/4944750
accepted answer: http://stackoverflow.com/a/25095957
has comment: http://stackoverflow.com/comment/39050687
type: Question
type: AnsweredQuestion
has title: How to calculate number of hours after night start
tagged with: math
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39050555

http://stackoverflow.com/q/25133908
linked to: http://stackoverflow.com/q/8817423
type: Question
has title: Force npm test to make fresh\new copy of input
downvote count: 0
tagged with: javascript
tagged with: mocha.js
answer count: 1
tagged with: jasmine
favorite count: 0
has answer: http://stackoverflow.com/a/25134012
upvote count: 2
type: UnansweredQuestion
tagged with: node.js
has body: test/ ├── TestOne.js └── TestTwo.js Say, TestOne.js is : This test case reads from file InputOne.json and add one record to the object which already has 3 records. describe('Add Items', function () { it('Should add items', function () { var input = require('./data/InputOne'); var obj = new Department(); var result = obj.AddDept(input); result.should.have.length(4); }); }); Say, TestTwo.js is : This test case reads from file InputOne.json and count the no of elements describe('Count Items', function () { it('Should count items length', function () { var input = require('./data/InputOne'); var obj = new Department(); var result = obj.CountDept(input); result.should.have.length(3); }); }); Problem: Both the test cases uses same file as input. If I run test cases using mocha both the test cases passes mocha TestOne // Passes mocha TestTwo // Passes if I say npm test (which runs all the test cases) I get error as test case in TestOne file has modified the input file. How I can make test case not to cache input file (or force test case to create its own copy of input file)
score: 2

http://stackoverflow.com/comment/39060023
score: 0
has text: Ok thanks. Actually it looks like the prototype puts the javascript inside the iframe. Is that something that is workable? Or will I have to figure out an alternate route?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25100668

inheritance
tags question: http://stackoverflow.com/q/25149713
tag name: inheritance
type: Tag
tags question: http://stackoverflow.com/q/25188811

http://stackoverflow.com/comment/42008101
has text: Jaap, could you please share the code how your dropzone code working/calling asp.net page's webmethod. i am trying to call webmethod from dropzone (eg: url: 'abcpage.aspx/helloworld');. but not got any success so far. thanks
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25070353
score: 0

http://stackoverflow.com/q/25194496
has title: How do I access files in /WEB-INF using HTML in a Tomcat server?
accepted answer: http://stackoverflow.com/a/25210843
tagged with: tomcat
has comment: http://stackoverflow.com/comment/39235069
has comment: http://stackoverflow.com/comment/39253293
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Currently I have a website running which allows the user to enter a password into a . The form calls a doPost() to a Java HttpServlet file, which then checks if the field entered was correct or not. Depending on the condition, it either redirect to TryAgain or Menu page using the following request.getRequestDispatcher("/WEB-INF/FOLDERNAME/Menu.jsp").forward( request, response); This part works okay, but once I am on the Menu page I have two hyperlinks which should redirect to either /WEB-INF/FOLDERNAME/Multi.jsp or /WEB-INF/FOLDERNAME/Single.jsp I need to keep these pages only accessible by users who signed in successfully on the initial password form page, so I put these inside of my /WEB-INF/ folder. The problem I am having is how do I redirect to the appropriate page (Multi.jsp/Single.jsp) using HTML? I think it is a bit of an overkill to wire these two hyperlinks to two individual forms and call the request.getRequestDispatcher().forward(); from doPost(){} just to redirect a user. Is there a different way to go about doing this?
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39235163
has comment: http://stackoverflow.com/comment/39234205
has answer: http://stackoverflow.com/a/25210843
type: AnsweredQuestion
score: 1
tagged with: java
has comment: http://stackoverflow.com/comment/39261580
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39244531
tagged with: jsp
tagged with: javascript

http://stackoverflow.com/comment/39004816
has text: @MBielski-Thanks for your feedback. Tried your solution but it's not returning anything either plus no errors except the 404 from API. I assigned varPromise = ScheduleFactory.getDaysOfWeek() in controller. Then did: varPromise.then(function(data) { $scope.days = data }); No success. Am I doing it wrong?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25070789

http://stackoverflow.com/a/25222431
score: 0
type: Answer
has body: The package appears to be incompatible with recent Meteor versions (which is weird, as it seems to receive updates). I recommend adding jspdf.js manually to your /client/lib/compatibility folder. If you don't want to use compatibility folder, you need to ensure the jsPDF object is created in global scope, instead as a local variable in a file. Fortunately, it's easy – just remove var keyword from its declaration. In other words, line 39 should be: jsPDF = (function () { instead of var jsPDF = (function () {
answers question: http://stackoverflow.com/q/25222063
has comment: http://stackoverflow.com/comment/39286647
has comment: http://stackoverflow.com/comment/39286912
has comment: http://stackoverflow.com/comment/39286570

http://stackoverflow.com/comment/125029118
has text: Replacing `board = " " + board;` with `board += " ";` will point you to the right direction. When you write `board = " " + board;` you add a leading space to the entire string, and this is happening in a loop, hence the multiple whitespaces.
comment on: http://stackoverflow.com/q/25188319
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39196584
has text: check out [`json_last_error()`](http://php.net/manual/en/function.json-last-error.php), may shed some light too
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25174122
score: 0

http://stackoverflow.com/q/25213530
type: AnsweredQuestion
tagged with: reflection
type: Question
has comment: http://stackoverflow.com/comment/39270150
has comment: http://stackoverflow.com/comment/39269890
score: 0
answer count: 2
tagged with: function
has comment: http://stackoverflow.com/comment/39270152
has body: Let's say I have an object that looks like this: { 'apple': 'nice', 'banana': 'decent', 'cherry': 'yuck', } and I have these two methods: function eatItems(cherry, apple) { } function throwItem(banana) { } My two questions: Is it possible for me to invoke eatItem and send the arguments in the correct order? Maybe something like: eatItems.call(this, {'cherry': cherry, 'apple': apple}); What if I don't know what arguments eatItems receives, can I dynamically look up the names of the arguments for a function so I can know the order that I need to throw them in?
tagged with: javascript
has answer: http://stackoverflow.com/a/25213643
possible better answer: http://stackoverflow.com/a/25213601
has answer: http://stackoverflow.com/a/25213601
has title: Invoke a Function with the Correct Parameters from an Object in JavaScript
accepted answer: http://stackoverflow.com/a/25213643
tagged with: node.js
has comment: http://stackoverflow.com/comment/39269985

http://stackoverflow.com/comment/39213181
comment on: http://stackoverflow.com/q/25182617
score: 0
type: Comment
has text: Why can you not share your code or just make a simple example?
type: QuestionComment

http://stackoverflow.com/q/25132864
score: 0
has answer: http://stackoverflow.com/a/25133509
tagged with: angularjs-scope
accepted answer: http://stackoverflow.com/a/25133509
has body: This is a dumb scoping issue and I'm bad at Javascript. Pretty sure I don't know how to return the value of a variable up to parent scope (e.g. look for the **** in AppCtrl) I have 2 controllers. AppCtrl (parent) and MainCtrl (child) I am fetching some random JSON data in the MainCtrl. .controller('MainCtrl', function ($scope, $http) { $scope.datas = []; $http.jsonp('http://filltext.com/?rows=10&delay=1&fname={firstName}&callback=JSON_CALLBACK'). success(function(data){ $scope.datas[0] = data; console.log($scope.datas); $scope.$emit('load::1'); }); $http.jsonp('http://filltext.com/?rows=10&delay=2&fname={firstName}&callback=JSON_CALLBACK'). success(function(data){ $scope.datas[1] = data; console.log($scope.datas); $scope.$emit('load::2'); }); $http.jsonp('http://filltext.com/?rows=10&delay=4&fname={firstName}&callback=JSON_CALLBACK'). success(function(data){ $scope.datas[2] = data; console.log($scope.datas); $scope.$emit('load::3'); }); }); When that data is successful I will emit a message to AppCtrl. On the AppCtrl I am listening for the emitted messages and setting the array var load = true. .controller('AppCtrl', function ($scope, $http) { //***** var load = []; $scope.$on('load::1', function(){ //how do i return this value to the var above? load[0] = true; }); $scope.$on('load::2', function(){ load[1] = true; }); $scope.$on('load::3', function(){ load[2] = true; }); if(load[0]=== true && load[1] === true && load[2] == true) { console.log('loaded'); } }); when all three are set to true I would like the console.log to log out 'loaded'.
tagged with: javascript
tagged with: dom-events
tagged with: scope
type: AnsweredQuestion
has title: $on event, set a variable to true
possible better answer: http://stackoverflow.com/a/25133109
has answer: http://stackoverflow.com/a/25133109
tagged with: angularjs
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39119631

http://stackoverflow.com/q/25076736
possible better answer: http://stackoverflow.com/a/25076948
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25094073
has title: Dynamically populated select menu on html page to be displayed on android webview without using jquery mobile
favorite count: 0
tagged with: android
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: google-caja
type: Question
tagged with: google-apps-script
has answer: http://stackoverflow.com/a/25076948
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25094073
tagged with: jquery
has body: I made a web app using google apps script and deployed it on the web. The application works well on PC, but when I load it to a webview on android, the dynamically populated menus are not displayed (they are empty). I know that google caja has an issue with jquery mobile from here, so I cannot use jquery mobile. The question is if there is a way to make that menus work using only jquery or javascript? Or maybe I can do some trick in android? Here is an example of how I populate the menu using jquery: function addClients(clients){ //array of options from google spreadsheets. $('#client').empty(); for (var i in clients) { $('#client').append(' '+clients[i]+' '); $('#client').trigger("chosen:updated"); } } HTML part: ---- Choose a client ---- Android part: WebView myWebView = (WebView) findViewById(R.id.webView1); myWebView.loadUrl("--- my web app's URL here ---"); myWebView.setWebChromeClient(new WebChromeClient()); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); Thank you in advance. EDIT: It looks kile the menu is not refreshing. At the beginning I have a built-in option: ---- Choose a client ---- This option is deleted in jquery part, but then the menu is not updated, it stays empty. I've already tried with no positive result: $('#client').trigger("chosen:updated"); $('select').selectmenu('refresh'); $('#client').hide(); $('#client').show(); $('select#client').selectmenu('refresh');

http://stackoverflow.com/q/25138322
accepted answer: http://stackoverflow.com/a/25148764
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
score: 2
has title: JS: How to find an element's position on the screen without it being different on different computers?
upvote count: 2
has answer: http://stackoverflow.com/a/25148764
tagged with: google-chrome
type: Question
tagged with: internet-explorer
possible better answer: http://stackoverflow.com/a/25147150
has answer: http://stackoverflow.com/a/25147150
has body: I have a 13 x 20 matrix, each cell holding a number ranging between 0 to 300. Each number represent a different tile, so a map can be built from this matrix. Apart from that I have a "hero" character - A movable picture. When pressing an arrow, it moves in that direction. Some tiles are such that the hero can walk on, while some aren't. For knowing where my hero can walk and where not, I wanted that on every movement he'll make I'll know on which cell in the matrix he's in. If he's between some, I'll choose the one he's mostly in (for example - if a third of the hero is on cell [2,5] and the rest on cell [2,6] I'd still say that he's on cell [2,6]). So I checked with document.getElementById("man").style.top (where "man" is the id of my "hero"). If it's between 98 and 48, I take it the line is 0, if it's between 99 and 151, it's line 1, and so on, and I did the same thing with document.getElementById("man").style.right. Everything worked perfectly! Until...I copied my files and went on to keep working on them on another computer. Four things happened: so far I worked with IE, and when opening my .html file with Chrome, some of the tile pics didn't show up. I checked why - and it seems like on Chrome it was looking for pictures with a different name. For example, I have a tile pic called ‏yellow_grass_round_top_right.bmp. On Chrome, when pressing inspect elements, it seems that it was looking for a pic called þþ‏yellow_grass_round_top_right.bmp, I have no idea where the "þþ‏" came from, and on some other tiles it adds several "þ" (not just two). I have no idea why it adds these "þ"s before the picture's name, and I double-checked to make sure I'm not imagining things. Opening it with IE, 20 tiles - that should take a single line - take a line and a half. I have to CTRL+- seven times(!) before it's all on the same line. And on chrome it's on the same line without any zooms (in or out). Opening it with IE showed all the tiles, but had a problem with the right and top pr…
answer count: 2

ruby-on-rails
tags question: http://stackoverflow.com/q/25129825
tags question: http://stackoverflow.com/q/25189349
type: Tag
tags question: http://stackoverflow.com/q/25141526
tags question: http://stackoverflow.com/q/25220277
tags question: http://stackoverflow.com/q/25102135
tags question: http://stackoverflow.com/q/25095220
tags question: http://stackoverflow.com/q/25227622
tags question: http://stackoverflow.com/q/25151354
tags question: http://stackoverflow.com/q/25183094
tags question: http://stackoverflow.com/q/25109656
tags question: http://stackoverflow.com/q/25098980
tags question: http://stackoverflow.com/q/25094707
tags question: http://stackoverflow.com/q/25150922
tags question: http://stackoverflow.com/q/25089173
tags question: http://stackoverflow.com/q/25106035
tags question: http://stackoverflow.com/q/25073066
tags question: http://stackoverflow.com/q/25125613
tags question: http://stackoverflow.com/q/25213885
tags question: http://stackoverflow.com/q/25092243
tags question: http://stackoverflow.com/q/25113648
tags question: http://stackoverflow.com/q/25161536
tags question: http://stackoverflow.com/q/25147507
tags question: http://stackoverflow.com/q/25228559
tags question: http://stackoverflow.com/q/25146893
tags question: http://stackoverflow.com/q/25129977
tags question: http://stackoverflow.com/q/25117371
tags question: http://stackoverflow.com/q/25226850
tags question: http://stackoverflow.com/q/25093456
tags question: http://stackoverflow.com/q/25073788
tags question: http://stackoverflow.com/q/25163551
tags question: http://stackoverflow.com/q/25202496
tags question: http://stackoverflow.com/q/25106621
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/25120599
tags question: http://stackoverflow.com/q/25162002
tags question: http://stackoverflow.com/q/25125730
tags question: http://stackoverflow.com/q/25134620
tags question: http://stackoverflow.com/q/25211623
tags question: http://stackoverflow.com/q/25081608
tags question: http://stackoverflow.com/q/25089220
tags question: http://stackoverflow.com/q/25099140
tags question: http://stackoverflow.com/q/25119461
tags question: http://stackoverflow.com/q/25185566
tags question: http://stackoverflow.com/q/25118911
tags question: http://stackoverflow.com/q/25096233
tags question: http://stackoverflow.com/q/25189115
tags question: http://stackoverflow.com/q/25110041
tags question: http://stackoverflow.com/q/25126935
tags question: http://stackoverflow.com/q/25101076
tags question: http://stackoverflow.com/q/25133443
tags question: http://stackoverflow.com/q/25195755
tags question: http://stackoverflow.com/q/25110040
tags question: http://stackoverflow.com/q/25107442

http://stackoverflow.com/a/25155987
score: 0
type: Answer
has body: It some type of workaround but it will give you additionally referrer parameter correct. var href = 'http//example.com'; var link = document.createElement('a'); link.setAttribute('href', href); document.body.appendChild(link); // Dispatch Click Event on the link var evt = document.createEvent('MouseEvents'); evt.initMouseEvent('click', true, true, window, 1, 1, 1, 1, 1, false, false, false, false, 0, link); link.dispatchEvent(evt);
answers question: http://stackoverflow.com/q/25155841

http://stackoverflow.com/comment/39023301
score: 0
comment on: http://stackoverflow.com/a/25080787
has text: Check out the Plunker again, I added a directive that does formatting and parsing with the ngModelController. http://plnkr.co/edit/NZjgZ6zQTxITtvdyQLfv?p=preview
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/39007487
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25072701
has text: Also http://stackoverflow.com/questions/12396518/how-to-reference-a-key-from-the-same-object-when-creating-it?lq=1 , http://stackoverflow.com/questions/2787245/how-can-a-javascript-object-refer-to-values-in-itself?lq=1
type: Comment

http://stackoverflow.com/q/25088345
answer count: 2
has title: JavaScript code execution sequence for callback and contradictions to normal execution sequence
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39037089
tagged with: callback
favorite count: 0
has answer: http://stackoverflow.com/a/25088522
type: UnansweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/25088777
tagged with: javascript
has body: I can't seem to reconcile the technical flow of javascript execution sequence and the concept of callbacks. I have been using callbacks, but I am not happy with the execution flow because it appears that there are contradictions between idea of callback and the sequential JavaScript execution. This link http://cwbuecheler.com/web/tutorials/2013/javascript-callbacks/ explains callback and give examples, but I as I follow the code, I see a contradiction. getData('http://fakedomain1234.com/userlist', writeData); document.getElementById('output').innerHTML += "show this before data ..."; function getData(dataURI, callback) { var myData = getSomeData(); // fake function callback(myData); } function writeData(myData) { document.getElementById('output').innerHTML += myData; } My question/observation is that inside the function getData, the callback(myData) statement does not get executed until after the function getSomeData() is finished and returned a value to the variable myData, but then the contradiction occurs when the document.getElementById... statement is allowed to execute before the getData function call is finished executing. Am I missing something?

http://stackoverflow.com/comment/39253807
has text: @tomgranerod Also, it's preferrable to explain what you did, instead of just posting code. Makes it a lot easier for others to learn
comment on: http://stackoverflow.com/a/25202392
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39134140
type: Comment
comment on: http://stackoverflow.com/a/25122056
type: AnswerComment
has text: @Patriotec: Added a simple example. You can basically do anything in `panel.loaded` event (with or without passing the loaded panel as a parameter).
score: 0

http://stackoverflow.com/a/25227241
has comment: http://stackoverflow.com/comment/39296511
accepted answer of: http://stackoverflow.com/q/25226727
type: Answer
has comment: http://stackoverflow.com/comment/39296172
answers question: http://stackoverflow.com/q/25226727
has comment: http://stackoverflow.com/comment/39295988
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39296191
has body: Both this and arguments are not (re)bound in arrow functions, but instead lexically scoped. That is, you get whatever they are bound to in the surrounding scope. In ES6, using arguments is deprecated anyway. The preferred solution is to use rest parameters: Function.prototype.compose = function (bar) { return (...args) =&gt; this(bar.apply(null, args)); }; or, in fact: Function.prototype.compose = function (bar) { return (...args) =&gt; this(bar(...args)); };
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25148970
has body: Try using next(): $('.team-items p').fadeOut(10); $('.team-member-name').click(function(){ $(this).next('p').toggle(700); }); Fiddle.
answers question: http://stackoverflow.com/q/25148939
score: 0
type: Answer

http://stackoverflow.com/a/25148390
has comment: http://stackoverflow.com/comment/39148786
type: Answer
upvote count: 1
has body: Change the function to: function Client() { this.username = "username", this.password = "Password", }; Client.printUsername = function() { this.username=$("#Username").val() console.log(this.username); }; That is the equivalent to a static function. --EDIT-- Re-read the question and the code, this won't work as expected since this won't be available. Static functions don't have access to an instance which is why they are static.
downvote count: 3
answers question: http://stackoverflow.com/q/25148354
has comment: http://stackoverflow.com/comment/39148823
score: -2

http://stackoverflow.com/a/25080016
has body: Try to use .insertBefore() at this context, $('.child2').insertBefore('.parent .childToBeKeptLast'); So the above code would insert the new children before of the element which is having the class childToBeKeptLast and which is the descendant of the element with the class parent
accepted answer of: http://stackoverflow.com/q/25079972
answers question: http://stackoverflow.com/q/25079972
score: 5
type: AcceptedAnswer
upvote count: 5
downvote count: 0
type: Answer

http://stackoverflow.com/q/25084781
tagged with: javascript
has body: I'm trying to have a dropdown element visual or not depending on which radio button is clicked. If the "ad-hoc" radio button is clicked, the dropdown element should be hidden. If the "predefined" radio button is clicked, the dropdown element should not be hidden. The problem is the control seems to take two clicks to do the expected action above and should only require one click. Any recommendations would be appreciated. Please let me know if you need more information. HTML: Placeholder A Placeholder B Placeholder C Placeholder D Placeholder E Placeholder F Placeholder G Placeholder H Placeholder I Dart: InputElement predefinedCheckBox = shroot.querySelector("#predefined"); InputElement adhoc = shroot.querySelector("#adhoc"); var dropDownValue = shroot.querySelector("#asset"); predefinedCheckBox.checked = true; predefinedCheckBox.onClick.listen((e){ if (predefinedCheckBox.checked == true) { print("predefined checked"); dropDownValue.hidden = false; } else { print("predefined not checked"); dropDownValue.hidden = true; } }); adhoc.onClick.listen((e){ if (adhoc.checked == true) { print("adhoc checked"); dropDownValue.hidden = true; } else { print("adhoc not checked"); dropDownValue.hidden = false; } });
tagged with: dart
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39093473
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39031482
has answer: http://stackoverflow.com/a/25085249
accepted answer: http://stackoverflow.com/a/25085249
tagged with: dart-polymer
type: Question
has title: Google Dart Drop-down Visibility Logic

http://stackoverflow.com/a/25210110
score: 0
type: Answer
has body: You've tagged this as javascript but The code you are using to grab your values and bind your functions is jQuery. The error you are getting is telling you that there is no mapping of "$" to jQuery. If you want to make sure you have the reference set, you can replace the $ with the string "jQuery" so $('someselector') becomes jQuery('someselector'). BUT, this may just be the console you are using. You have another error which is probably the issue. You have this: $('#getTextBoxValue').on("click", function(){ var value = $("#textbox1").val(); }); In this your value is locally scoped in the callback. Unless you do something with it before the function exits, you lose it completely. If you intend to do something with it later, you have to globally scope it by bringing it out of any function definition. var value; ... function someFunction(){ ... $('#getTextBoxValue').on("click", function(){ value = $("#textbox1").val(); }); }
answers question: http://stackoverflow.com/q/25209861

http://stackoverflow.com/comment/39080797
score: 0
type: QuestionComment
has text: javascript is clientside. Never trust javascript. Which type of variable we are talking about? consider ajax.
type: Comment
comment on: http://stackoverflow.com/q/25112013

http://stackoverflow.com/comment/39218768
score: 0
comment on: http://stackoverflow.com/q/25185540
type: Comment
type: QuestionComment
has text: I read a tutorial (http://www.seerinteractive.com/blog/best-ways-to-exclude-internal-traffic-in-google-analytics) that suggested this as a method to exclude internal traffic. Please explain to me why this is incorrect.

http://stackoverflow.com/comment/39238664
type: AnswerComment
has text: It was my bad..actually I am saving the boolean values in mongo but I am having yes/no (String) declared values for radio...just changed them to true/false and all working fine...resolved...thx for the help :) and have a g8 day :)
type: Comment
comment on: http://stackoverflow.com/a/25196930
score: 0

combobox
tags question: http://stackoverflow.com/q/25204839
type: Tag
tags question: http://stackoverflow.com/q/25139218
tags question: http://stackoverflow.com/q/25148381
tags question: http://stackoverflow.com/q/25093897
tag name: combobox
tags question: http://stackoverflow.com/q/25086933

http://stackoverflow.com/q/25099364
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has body: I've been struggling with a problem for a while. I have one element with the following default state: There's a live event hooked which populates the above element with options: Gemini Piazza Pickup Afterwards there's a SerializeObject function which converts the form key-val pairs to json and sends it to the PHP controller. Afterwards the results are displayed on the page with ajax. When the user clicks on a result, he is sent to the detailed page which has a "BACK" button at the top. Here's the back button: Back When the user clicks it, he gets to the previous results page. Every select element but the "model" one is properly populated with the expected data. I am assuming the reason lies in the fact that its contents were generated with an ajax request and a .html() overwrite. I did a cross browser check: doesn't work on Chrome 36, doesn't work on IE 9 and works perfectly on Firefox 30. Forgot to mention: I have header("Cache-control: private"); activated. I hope somebody comes with a solution. Thanks in advance!
has answer: http://stackoverflow.com/a/25099480
has title: Populating live element after hitting javascript:history.go(-1) button
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39057265

http://stackoverflow.com/comment/39192790
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25171883
has text: Actually it's different form OP, if you see the two console log are wrapped in different functions, since their execution can be concurrent you don't know how will the values be printed, when you move the print inside the getJson callback though you are sure that the code is executed sequentially and that's what the OP wants, he wants to be able to decide the sequence of actions to be executed without incurring in non deterministic situations, specifically he wants to get back the json before doing anything else.
type: AnswerComment

http://stackoverflow.com/comment/39134564
score: 1
has text: But the x/y coordinates of the clicked element are likely to be different across different users' devices (mobile phones, tablets, laptops, desktops and the various monitor sizes); rather than recording *where* the user clicked, why not check *what* they clicked on (using `e.target`, for example)?
comment on: http://stackoverflow.com/q/25140892
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39370292
score: 0
has text: Of course you “have” a server-side, otherwise you would have no website … If there’s no other options available, then you can still manually create individual HTML documents carrying the OG meta data for each pseudo “page” of your SPA … and redirect human visitors that come there via a link shared on FB back to the appropriate section of the SPA using JavaScript …
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25175405

http://stackoverflow.com/q/25213824
answer count: 1
downvote count: 0
favorite count: 0
has title: ace editor non capturing group issue (?:)
tagged with: regex
has answer: http://stackoverflow.com/a/25222842
tagged with: editor
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25222842
tagged with: ace-editor
upvote count: 2
has body: All, I'm trying to create my own mode with the ACE editor . I'm trying to define a really simple syntax highlighting rule: this.$rules = { "start": [ { token : "string", regex : /(?:CONSUME)(MATCH)/, } ] }; According to an online Javascript regular expression tester, the regex /(?:CONSUME)(MATCH)/ should see CONSUMEMATCH and return only MATCH. However, ACE highlights all of CONSUMEMATCH with this rule. Plug the following code into the Ace Mode Creator (http://ace.c9.io/tool/mode_creator.html) to see for yourself. (In the dropdown menus, I have the Javascript mode and the XCode theme selected. CONSUMEMATCH is my test text, and the following code is the contents of the mode panel.) define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var myHighlightRules = function() { this.$rules = { "start": [ { token : "string", regex : /(?:CONSUME)(MATCH)/, } ] }; }; oop.inherits(myHighlightRules, TextHighlightRules); exports.myHighlightRules = myHighlightRules; });
type: Question
tagged with: javascript
tagged with: regex-lookarounds

http://stackoverflow.com/q/25098915
tagged with: javascript
tagged with: jquery
score: 0
has body: I am dealing with this problem from quite a while, please suggest me a solution: For android app development, I am using phonegap framework. I have a async function readFromFile() which reads the json file (which is updated using a user data everytime) stored in SD card, and stores the text result into the global variable, Next I have a function populatePageContents() which reads the global variable, and populates the page's html from the json data. I want the populatePageContents() function to be called after readFromFile() function has finished reading the file data into global variable. I tried using someting like this: &lt;script type="text/javascript"&gt; globalVariable = ''; readFromFile(); // Uses phonegap's file API to read file and puts result into global variable setTimeout(function() { populatePageContents(JSON.parse(globalVariable)); } , 500); &lt;/script&gt; The above method works sometimes, but not always. Please suggest some better use of callback functions. Thanks!
has title: call back function after file read in Phonegap
tagged with: cordova
has answer: http://stackoverflow.com/a/25886685
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25886685
type: Question
tagged with: jquery-mobile
answer count: 1

http://stackoverflow.com/q/25226850
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25226901
favorite count: 0
has title: Jquery not firing click() to fire with a div id
has answer: http://stackoverflow.com/a/25226901
has comment: http://stackoverflow.com/comment/39294388
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39294612
upvote count: 2
accepted answer: http://stackoverflow.com/a/25228036
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/39294409
has comment: http://stackoverflow.com/comment/39294402
has body: In my erb file, I have a script like this: function checkJquery() { if(window.jQuery) { jQuery(document).ready(function() { alert('onready'); $('div#habla_topbar_div').click(function() { alert('onclick'); }); }); } else { window.setTimeout(checkJquery, 1000); } } I get the 'onready' alert, but the 'onclick' alert does not work. Any idea what I might doing wrong? Edit: The div is part of the Olark chat integration and the erb file has nothing except the configuration for that and the above script. The div 'habla_topbar_div' is defined. Image:
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25228036
tagged with: javascript

http://stackoverflow.com/a/25098956
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25098766
has body: You can define width and height in %, that will solve the scrollbar issue. Then use a main parent panel like in this code : function doGet() { var app = UiApp.createApplication(); var main = app.createVerticalPanel().setStyleAttributes({'background':'beige'}).setWidth('100%').setHeight('100%').setHorizontalAlignment(UiApp.HorizontalAlignment.CENTER); var panel = app.createVerticalPanel().setStyleAttributes({'background':'red'}).setWidth('400').setHeight('800'); var label = app.createLabel('test label'); app.add(main); main.add(panel); panel.add(label) return app; } test here
has comment: http://stackoverflow.com/comment/39056815
answers question: http://stackoverflow.com/q/25098766
has comment: http://stackoverflow.com/comment/39056701
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39056717
type: Answer

http://stackoverflow.com/q/25206804
favorite count: 0
accepted answer: http://stackoverflow.com/a/25206835
has comment: http://stackoverflow.com/comment/39257492
has comment: http://stackoverflow.com/comment/39257173
has comment: http://stackoverflow.com/comment/39257160
tagged with: increment
possible better answer: http://stackoverflow.com/a/25206892
has answer: http://stackoverflow.com/a/25206892
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/39257109
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/39257856
has comment: http://stackoverflow.com/comment/39257292
has body: Consider this code: var i = 0; &gt;&gt; undefined i += i + i++; &gt;&gt; 0 i &gt;&gt; 0 // why not 1? I would expect i to be 1 because of the increment (++) operator. What I think should happen is something like: i = 0 + 0 + (i = i + 1) i = 0 + 1 i = 1 Why it's returning zero instead? Could someone explain what happens under the scene?
has comment: http://stackoverflow.com/comment/39257100
tagged with: javascript
has comment: http://stackoverflow.com/comment/39258422
has comment: http://stackoverflow.com/comment/39257773
has comment: http://stackoverflow.com/comment/39257159
answer count: 2
has comment: http://stackoverflow.com/comment/39257285
score: 2
has answer: http://stackoverflow.com/a/25206835
has comment: http://stackoverflow.com/comment/39257092
has title: Why i += i + i++ equals 0?

http://stackoverflow.com/comment/39181506
score: 0
type: AnswerComment
has text: You misunderstood me :) Try putting it right before your `var promise`.
type: Comment
comment on: http://stackoverflow.com/a/25165373

http://stackoverflow.com/a/25172778
type: Answer
answers question: http://stackoverflow.com/q/25172501
has comment: http://stackoverflow.com/comment/39194004
has body: Here's one way: Use textAlign & textBaseline to draw the text at it's horizontal and vertical center: translate to the x,y where you want the text centered. rotate by the desired angle And finally fillText Example code and a Demo: http://jsfiddle.net/m1erickson/uL62et9y/
score: 10
upvote count: 10
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25172501

http://stackoverflow.com/q/25145220
tagged with: javascript
has comment: http://stackoverflow.com/comment/39142585
has title: window.location.assign not working
score: 0
has body: I have the following code: function verifyUser(userEmail){ $.getJSON('verifyUser.php', {data : userEmail}, function(result){ console.log(result); alert(result.location); console.log(window.location.href); window.location.href = "http://localhost/hub.php"; console.log(window.location.href); console.log(result); alert(result.location); }); }; Where I get a JSON returned with the name of the user, the email, the location: while($row = $resultQuery-&gt;fetch_assoc()){ $_SESSION['userName'] = $row['USERID']; $_SESSION['userRole'] = $row['USERROLE']; $returnDataLogin['success'] = true; $returnDataLogin['email'] = $email; $returnDataLogin['role'] = $row['USERROLE']; $returnDataLogin['location'] = 'http://localhost/hub.php'; $returnDataLogin['message'] = 'Bienvenido '.$returnDataLogin['email'].'!'; $json_data = json_encode($returnDataLogin, JSON_UNESCAPED_SLASHES); echo $json_data; } then I assign on the javascript function the location of the window. It works flawlessly on WAMP server, however, it does not redirect once I move the files to apache server. Any ideas what might be wrong? EDIT: I found that the request does not follow, it throws a 302 (Found):
has comment: http://stackoverflow.com/comment/39142624
answer count: 0
type: UnansweredQuestion
tagged with: http-redirect
tagged with: php
has comment: http://stackoverflow.com/comment/39144228
type: Question
has comment: http://stackoverflow.com/comment/39142623

http://stackoverflow.com/comment/39102867
comment on: http://stackoverflow.com/q/25123698
type: QuestionComment
type: Comment
score: 1
has text: You could use the `window.getComputedStyle` but it's not that easy to extract rotation from it (because the browser converts the rotation into a matrix). See http://css-tricks.com/get-value-of-css-rotation-through-javascript/ for an implementation. As soon as you got the rotation you may calculate all the other bounds /edges of your object using simple math. The boundingClientRect does not help at all as it's not rotated.

http://stackoverflow.com/comment/39105426
type: Comment
has text: It is! But go to inspect element, find the nav and disable display:none, that extra space is exacly the nav's space. Any idea on how I can fix what mansory is doing?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25124335

http://stackoverflow.com/a/25092683
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25092594
answers question: http://stackoverflow.com/q/25092594
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39044901
type: Answer
has body: HTML5 doesn't have any javascript within as such. Some new elements when implemented by the browser may however have some of the HTML5 features rendered using JS or at least provide a JS API as per specification. Like any other HTML version prior that, otherwise we wouldn't be able to bind events or control HTML elements via Javascript. And for CSS no, of course not there is no JS dependencies. How would CSS work when JS is disabled? And remember browsers have access to the all computer power. It wouldn't make a lot of sense to ignore that and do everything in Javascript.

http://stackoverflow.com/q/25073918
has comment: http://stackoverflow.com/comment/39603887
has title: Field shown as autofilled by browser, is blank when accessed with js
type: UnansweredQuestion
has body: I have a login form which gets auto-filled with username and password by the browser. On chrome I am seeing this issue where - the password field is shown as autofilled in the browser, but when I access its value through javascript, it is blank. Has anyone hit this issue?
downvote count: 0
score: 1
tagged with: google-chrome
type: Question
tagged with: javascript
upvote count: 1
tagged with: autofill
has answer: http://stackoverflow.com/a/25074430
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/39225198
type: AnswerComment
comment on: http://stackoverflow.com/a/25184229
type: Comment
has text: also went on to add "... ('.images-scroll li:nth-child(2)') ..." and " ... ('.images-scroll li:nth-child(2)') ..." to target the 2nd li tag, although likely a better way, maybe with .eq(1) -- taking a hint from a stackoverflow answer in 2010 http://stackoverflow.com/questions/4077339/how-to-apply-active-class-for-first-list-item-using-jquery
score: 0

http://stackoverflow.com/a/25294684
accepted answer of: http://stackoverflow.com/q/25229130
answers question: http://stackoverflow.com/q/25229130
score: 0
type: AcceptedAnswer
has body: I found the solution to this problem here: https://github.com/strongloop/express/issues/2069 It appears to be a bug caused by Sophos Anti-Virus. To avoid it you can disable "web protection" for the website in question in the preferences of Sophos.
type: Answer

http://stackoverflow.com/a/66118317
score: 0
answers question: http://stackoverflow.com/q/25168748
has body: As @ivan.sim says, it's not so easy to get the full table data, although I finally found a solution which you can use to get values (including hidden inputs etc) from the full table including pages that are not displayed: table.rows().every(function (rowIdx, tableLoop, rowLoop) { var data = this.node(); console.log($(data).find('input').prop('checked')); console.log($(data).find('input[name=someField]').val()); });
type: Answer

sudo
tags question: http://stackoverflow.com/q/25089023
type: Tag
tag name: sudo

http://stackoverflow.com/q/25214348
tagged with: ajax
has title: MVC open jquery dialog when the controller has issue with data from view
accepted answer: http://stackoverflow.com/a/25215381
has body: This should be easy. I'm probably making it much, much more difficult than necessary. When a user completes information in my view and clicks the submit button, my controller checks the data entered against what is already in the database. If the information already exists, I want the controller to invoke a popup in the view letting them know that they cannot continue because the data already exists. All of the example code seems to insist I click something before a dialog opens, but I want the controller (using AJAX?)(somehow?) to tell the view to display the dialog. Any examples, sans the ones that want me to click on something to open the dialog, would be greatly appreciated. Thank you in advance.
downvote count: 1
type: AnsweredQuestion
tagged with: asp.net-mvc
score: -1
type: Question
has answer: http://stackoverflow.com/a/25215381
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25168215
has body: In my template I have an input field: A button: Exec. And a script: I need to return the value of the input field to my view when the user click the button but I don't know how. The value must be assigned to the WCodigoChaveP to be passed as an argument to my view. I added a: element to my form and then added: document.getElementById("resultado").innerHTML = x; on the script just to test. Its working. Whatever I type in the input filed I see on the p element. As you can see I'm new in all this. Thanks for your help.
tagged with: flask-wtforms
score: 0
answer count: 1
tagged with: javascript
type: UnansweredQuestion
has title: How can I return the value of an Input Field when I click on a button?
type: Question
has answer: http://stackoverflow.com/a/25168365
tagged with: http://stackoverflow.com/tag/html

node-webkit
tags question: http://stackoverflow.com/q/25090479
tags question: http://stackoverflow.com/q/25224031
tag name: node-webkit
type: Tag

http://stackoverflow.com/comment/39081882
comment on: http://stackoverflow.com/q/25112497
score: 0
has text: i want to call submit button event if the user click on submit button. if user's focus on email textbox and now click on submit button then i want to call first focus out event of the textbox and suddenly click event of the submit button
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/52606035
type: Comment
comment on: http://stackoverflow.com/a/25106345
type: AnswerComment
score: 2
has text: Unfortunately there appears to be no way to *globally* say "disable this warning only for local variables in 'pseudo-scopes'" (or maybe it is merely jshint failing to consider the initialization section of a for-loop as part of the pseudo-scope body). ie. one might prefer to run as `shadow:outer` otherwise..

specifications
type: Tag
tags question: http://stackoverflow.com/q/25185512
tag name: specifications
tags question: http://stackoverflow.com/q/25185059

http://stackoverflow.com/q/25195580
has comment: http://stackoverflow.com/comment/39239368
downvote count: 3
upvote count: 1
has title: declaring variable in jscript
type: Question
tagged with: c#
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/39236092
answer count: 1
has body: string testid = "#imgThumbnail" + (counter + 1); string stringURL = list[counter]; // return string //this is the problem string jsscript = "$('"+testid+"').attr('src','"+stringURL+"'); $('"+testid+"').show();"; Page.ClientScript.RegisterStartupScript(this.GetType(), "sc", jsscript, true) hi, i having problem to make the jsscript work. Everything should be fine (Tested the clientscript with an alert, it works!) but somehow the jsscript which contain variables and actions cannot work. i don't understand why, and could only assume i write the code wrongly (syntax) the js is used to assign url into image source (i using asp:Image) and then show the image. also i calling this from C# backend. EDIT : there is no error message. When i run the cod, it just go through (break point at the page.clientscript.RegisterStartupScript there, but it just goes through and didn't show any error message). And then no image is display in the end. My vs doesnt allow me to break point at frontend aspx page.
favorite count: 0
has answer: http://stackoverflow.com/a/25196100
type: UnansweredQuestion

http://stackoverflow.com/comment/39281524
type: QuestionComment
has text: That doesn't change the fact the function still has a `console.log()` which should be executed irrespective. I return undefined because I don't care about the array that map returns. Let's just say that for now, I am using `map` as if it was `forEach` instead.
score: 0
comment on: http://stackoverflow.com/q/25219781
type: Comment

http://stackoverflow.com/comment/39203776
type: QuestionComment
score: 0
has text: If you are using `HTML 5` then don't need extra validation, just add `required` in `input tag` where you want such a validation.
comment on: http://stackoverflow.com/q/25178372
type: Comment

http://stackoverflow.com/comment/39295508
comment on: http://stackoverflow.com/q/25227032
has text: http://jsfiddle.net/Palestinian/dwxmjkb3/9/
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39068489
type: AnswerComment
has text: @Guffa But `function Foo() {}; Foo.prototype` returns `Foo {}`, indicating that an instance of `Foo` is acting as the prototype of the constructor function, no?
comment on: http://stackoverflow.com/a/25104275
score: 0
type: Comment

http://stackoverflow.com/q/25125455
score: -1
has comment: http://stackoverflow.com/comment/39106013
has title: AngularJS share model between controllers
has answer: http://stackoverflow.com/a/25125877
has comment: http://stackoverflow.com/comment/39106965
has body: I'm developing an application to show some charts and some controls to filter the data presented. The structure of the HTML page is the same, so I though I could make an HTML template and use it with different controllers, one for each chart type and one for each set of controls to filter a specific chart data. My idea was to have a default HTML that I fill with a chart controller and a filter controller accordingly to the type requested. To achieve this idea, I'm currently using, and abusing of, prototypical inheritance. I have a ChartController that defines two scope models that will hold the chart and the filter controls configuration. Then I have two child controllers, for exemple, LineChartController and LineChartFiltersController, that populate those two variables with the configuration specific for the chart type. Everything works fine, but I don't like this approach because my child controllers stay very dependent on the parent, and it's difficult to test and even to understand from where the $scope models come for someone that is not aware of how the controllers were designed. As requested, here are some snippets: app.controller('ChartController', ['$scope', function($scope) { $scope.chart = {}; $scope.filters = {}; }]); app.controller('LineChartController', ['$scope', function($scope) { $scope.chart.tooltip = {...}; $scope.chart.commonSeriesSettings = {...}; }]); app.controller('LineChartFiltersController', ['$scope', function($scope) { $scope.filters.beginDate = ...; $scope.filters.endDate = ...; $scope.filters.granularity = ...; }]); Then I have a route that redirects to the HTML template common to all charts and uses the ChartController. Inside of it I include the LineChartController and the LineChartFiltersController creating the relation parent/children: ... line_chart.html line_chart_filters.html I know that (perhaps) the best approach to share data between controllers is injecting a service. But I want to share model data, the charts configuration a…
favorite count: 0
has comment: http://stackoverflow.com/comment/39107881
tagged with: angularjs
type: UnansweredQuestion
downvote count: 1
type: Question
upvote count: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25207938
upvote count: 1
has body: The service recipe is invoked like a constructor function, so there is no point doing a return. The service should be written as logViewApp.service('ErrorConsole', function () { this.errorMsg = 'no error'; this.setError: function(data){ this.errorMsg = data; } } });
answers question: http://stackoverflow.com/q/25207872
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/39324363
has comment: http://stackoverflow.com/comment/39259718

http://stackoverflow.com/a/25177765
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25177620
type: Answer
has body: try putting it inside a $(document).ready like this : $(document).ready(function() { $("#left").children(".thumb").on({ mouseenter: function () { $("#preview").attr("src", $(this).attr("src")).show(); }, mouseleave: function () { $("#preview").hide(); } }); });
score: 3

http://stackoverflow.com/a/25222232
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/25222193
score: -1
upvote count: 0
has body: Try this: $('#resultTable').on("click", ".editForm2", function(){ var checked_ele = $('input[type="radio"][name="g1"]:checked'); $(checked_ele).each(function(){ // do stuff here }); });

http://stackoverflow.com/comment/39299814
type: Comment
comment on: http://stackoverflow.com/q/25229310
score: 0
type: QuestionComment
has text: this means that the browser WAS indeed able to issue a request, hence your client is online.

http://stackoverflow.com/q/25099904
has answer: http://stackoverflow.com/a/25125602
has body: This is maybe a complicated idea. I'm working with Java and Spring, and I'm trying to fill an pre-defined array in the DOM through jQuery. I have the following: var clients = []; &lt;c:forEach var="client" items="${clients}"&gt; clients.push("${client.id} - ${client.name}"); &lt;/c:forEach&gt; This array is filled by the controller in that way: mv.addObject("clients", clients); The problem is that in the actual scenario the clientes array is only defined and haven't any values inside them. Is there a way to get it from the "DOM" (i don't know if is correct to say DOM here) and fill it with values obtained by an ajax call to other controller method? In the returned page (or controller response - fragment) the array looks like these: var clients = []; clients.push("0 - Cli1"); clients.push("1 - Cli2"); clients.push("2 - Cli3"); The method that i'm actually try to perform to fill the array has to be something like that: $.ajax({ url: "/prestamos/clients/loadClients?idCliente="+idCliente, type: "GET", cache:false, beforeSend: function(xhr) { xhr.setRequestHeader("Accept", "application/json"); xhr.setRequestHeader("Content-Type", "application/json"); }, success:function(response){ //var content = response.find("#content"); html = $.parseHTML(response); // here i should get the array from the $(html) returned object // and after that i should store the returned array as the new ${clients} object in my page }, error:function(jqXhr, textStatus, errorThrown){ //alert(textStatus); } }); Any help is appreciated.
score: 0
type: UnansweredQuestion
tagged with: spring
tagged with: spring-mvc
has comment: http://stackoverflow.com/comment/39058254
type: Question
has title: Get an set array values through jQuery
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39058573

http://stackoverflow.com/comment/39035341
comment on: http://stackoverflow.com/q/25087450
score: 0
type: QuestionComment
type: Comment
has text: Look at `e.target` and compare it to `this`, if `e.target !== this`, the event is coming from a child node

http://stackoverflow.com/comment/39284334
comment on: http://stackoverflow.com/q/25220952
has text: Everything appears to be correct (except it won't work in some versions of IE), have you console logged argsForCommand to make sure they contain valid data?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39269811
type: QuestionComment
comment on: http://stackoverflow.com/q/25213374
score: 1
has text: I think this is a good question but a bit opinion based. I think more help could be found in programmers.stackexchange.com. there you can find good advises/oppinions on various topics
type: Comment

http://stackoverflow.com/q/25119346
tagged with: javascript
tagged with: jquery
tagged with: jquery-select2
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25119533
score: 0
tagged with: php
answer count: 1
has body: I am using select2 for a tagging system. I have come across the issue wherein whenever I submit my form, no data from the select2 field is posted, however if I do not include the select2 js such that the input is "normal" then the field submits properly. I confirmed this by printing the post data after submit. Is there something I'm missing to handle select2 posts? Excerpt of HTML: Project tags
accepted answer: http://stackoverflow.com/a/25119533
has title: Select2 issue with posting data

http://stackoverflow.com/comment/39237233
has text: +1 for good question and added `and how to hide highlighted text?` as op needs this.
comment on: http://stackoverflow.com/q/25195813
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25147955
tagged with: javascript
score: 2
has answer: http://stackoverflow.com/a/25148048
tagged with: firefox
answer count: 1
downvote count: 0
tagged with: setinterval
favorite count: 0
accepted answer: http://stackoverflow.com/a/25148048
has comment: http://stackoverflow.com/comment/39148054
has body: I have a Javascript setInterval function that works in Chrome, but not in Firefox. It is supposed to keep writing a string every so often on the screen. I know document.write is not a prefer method. Here is the code: function doSomething(){ document.write("1st string "); } setInterval(doSomething, 2000); Thank you (JS newb).
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39148879
upvote count: 2
has title: setInterval Chrome vs Firefox
tagged with: google-chrome
type: Question

http://stackoverflow.com/a/25183121
type: Answer
has body: .outerHTML is not a property of a jQuery selection. Here is a way to move a selection from one place to another : var $div = $('&lt;div class="content"&gt;&lt;/div&gt;'); var $selection = $("#"+id_name+i).nextUntil("#"+id_name+j); $div.append($selection).insertAfter("#"+id_name+i);
answers question: http://stackoverflow.com/q/25182889
has comment: http://stackoverflow.com/comment/39212925
score: 0

http://stackoverflow.com/a/25147020
answers question: http://stackoverflow.com/q/25146942
upvote count: 12
has comment: http://stackoverflow.com/comment/39146872
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39146489
downvote count: 0
has comment: http://stackoverflow.com/comment/39146648
has comment: http://stackoverflow.com/comment/39146636
has comment: http://stackoverflow.com/comment/39146764
type: Answer
has body: First Solution: You can pass any variable from codebehind to client-side using properties. Define a Public propery in codebehind: C#: public int prtPropertyName { get { return ViewState("PropertyName"); } set { ViewState("PropertyName") = value; } } VB: Public Property prtPropertyName As Integer Get Return ViewState("PropertyName") End Get Set(value As Integer) ViewState("PropertyName") = value End Set End Property assign a value to the property and then get the value in javascript using this: &lt;% = prtPropertyName %&gt; Second Solution: Put the ViewState's value in a hidden field and read the hidden field value in client-side: ViewState("viewStateName") = "This is ViewState value" Page.ClientScript.RegisterHiddenField("hfHiddenFieldID", ViewState("viewStateName")) Javascript: var strValue = document.getElementById("hfHiddenFieldID"); Third Solution: This one is not so clear but all ViewStates is saved in a hidden field that created by ASP.NET automatically, you can find the field and read data. You can find this fields in source code of page with this name and id: name="__VIEWSTATE" id="__VIEWSTATE".
score: 12
accepted answer of: http://stackoverflow.com/q/25146942

http://stackoverflow.com/q/25099501
tagged with: carousel
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25103677
has body: I'm working with the fullPage.js plugin for a simple site I am doing. tl;dr What is the best way to allow a user to scroll past the slideshow while it is still cycling through the slides, so they can continue viewing the other sections of the site? Where my code stands now... I have created the functionality to automatically start cycling through the different slides of the slideshow in one of my sections, based on this GitHub issue that was answered. You can see my jsFiddle linked below to see it in action. My Issue The issue I am having is using this setTimeout to cycle through the slides automatically, if I try to then scroll (or navigate in any way) to another section of my page, the setTimeout keeps going and therefore I am taken back up to the slideshow as it continues to cycle. My code using the setTimeout looks like this: afterRender: function () { //on page load, start the slideshow setTimeout(function () { $.fn.fullpage.moveTo(1, 0); }, 1000); }, afterSlideLoad: function (anchorLink, index, slideAnchor, slideIndex) { if (anchorLink == 'home') { //make the slideshow automatically go! setTimeout(function () { $.fn.fullpage.moveTo(1, slideIndex + 1); }, 1000); //if you are at the last slide //then cycle back to the first if (slideIndex == 2) { setTimeout(function () { $.fn.fullpage.moveTo(1, 0); }, 1000); } } } What I tried I looked into the issue and saw a possible solution was to clearInterval. I figured the best time to do this would be in the onLeave callback. onLeave: function (index, direction) { //after leaving section 1 (home) and going anywhere else, stop the slideshow if (index == '1') { clearInterval(slideTimeout); } } I set a global slideTimeout variable at the top of my page and then set my setTimeout above equal to this variable, but it does not actually seem to be doing a clearInterval and instead the slideshow just keeps cycling through its slides. I verified (through console.log) that when I scroll down to the next section from the slideshow,…
accepted answer: http://stackoverflow.com/a/25103677
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/31330684
has answer: http://stackoverflow.com/a/31330684
answer count: 2
downvote count: 0
tagged with: fullpage.js
tagged with: jquery
favorite count: 0
upvote count: 2
has title: fullPage.js auto cycle through slideshow unable to advance to next section
tagged with: slider

http://stackoverflow.com/q/25176082
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25177222
type: Question
tagged with: javascript
tagged with: jquery
has title: How to access plugin method inside .each() jQuery
score: 0
answer count: 1
has body: I'm using bxSlider on my site. Here's my script : handleBxSlider = function(){ var initSliders, destroySliders; initSliders = function(){ jQuery('.bxslider').each(function(){ jQuery(this).bxSlider({ slideWidth: 5000, minSlides: jQuery(this).attr("min-slides") || 4, maxSlides: jQuery(this).attr("min-slides") || 5, slideMargin: jQuery(this).attr("slide-margin") || 20 }); }); }; destroySliders = function(){ initSliders.destroySlider(); }; initSliders(); destroySliders(); }; bxSlider has method destroySlider();. I need to make all public methods in bxSlider's plugin to be accessible just by calling handleBxSlider. It's like, handleBxSlider.destroySlider(); to destroy sliders, or handleBxSlider.initSliders();, to re-init sliders. But the destroySliders(); didn't works. How to access public methods of bxSlider inside initSliders function() ? Or is there any best solutions? Anyway, here's the fiddle
accepted answer: http://stackoverflow.com/a/25177222

http://stackoverflow.com/comment/39139432
comment on: http://stackoverflow.com/a/25142562
score: 0
type: Comment
type: AnswerComment
has text: `console.log(json[userID].name);` still can't read property of 'name'. :( And why did you comment out the HttpWebRequest? This is a cross-domain call.

http://stackoverflow.com/comment/39083279
comment on: http://stackoverflow.com/q/25113414
score: 1
has text: While this is possible, I would strongly suggest instead assigning the object to a variable with a short name and then doing `o.fname` instead of `fname`.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39012239
comment on: http://stackoverflow.com/a/25075459
score: 0
type: AnswerComment
type: Comment
has text: @SergeyMetlov It is `O(n*m)` where `m` is the number of groups. But generally you are right. Yours is actually `O(n)`.

http://stackoverflow.com/comment/39179126
has text: the error that comes up is ... 'GET file://connect.facebook.net/en_US/sdk.js net::ERR_FILE_NOT_FOUND ' the same error is there with that script. it says the error is on the line.. ' fjs.parentNode.insertBefore(js, fjs);'
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25164787

http://stackoverflow.com/q/25097219
has answer: http://stackoverflow.com/a/25097338
type: AnsweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/39053270
type: Question
has comment: http://stackoverflow.com/comment/39053424
has title: How to load a file and parse tags using jQuery
accepted answer: http://stackoverflow.com/a/25097338
has body: I have a file which contains lots of tags like follows: I want to load the file and than load all the content inside the script tags in memory. I am trying the below code but it's not working: tpl = { // Hash of preloaded templates for the app templates : {}, loadTemplates : function(name) { var that = this; $.get(name, function(data) { $(data).find('script').each(function (_, entry) { that.templates[$(this).attr('id')] = $(this).text(); }); }); }, // Get template by name from hash of preloaded templates get : function(name) { return this.templates[name]; } }; Call is made like this: tpl.loadTemplates('/templates/templates-home.html'); What can I try next?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39053200
has comment: http://stackoverflow.com/comment/39053232
tagged with: javascript

backbone.js
tags question: http://stackoverflow.com/q/25192676
tags question: http://stackoverflow.com/q/25176201
tags question: http://stackoverflow.com/q/25083474
tags question: http://stackoverflow.com/q/25182912
tags question: http://stackoverflow.com/q/25227865
tags question: http://stackoverflow.com/q/25134693
tags question: http://stackoverflow.com/q/25218550
tags question: http://stackoverflow.com/q/25115170
tags question: http://stackoverflow.com/q/25199084
tags question: http://stackoverflow.com/q/25152506
tags question: http://stackoverflow.com/q/25204501
tags question: http://stackoverflow.com/q/25222311
tags question: http://stackoverflow.com/q/25070123
tags question: http://stackoverflow.com/q/25165404
tags question: http://stackoverflow.com/q/25099887
tags question: http://stackoverflow.com/q/25100913
tags question: http://stackoverflow.com/q/25100455
tags question: http://stackoverflow.com/q/25149450
tags question: http://stackoverflow.com/q/25199055
tags question: http://stackoverflow.com/q/25083106
tags question: http://stackoverflow.com/q/25129529
tags question: http://stackoverflow.com/q/25151338
tags question: http://stackoverflow.com/q/25086516
tags question: http://stackoverflow.com/q/25093419
tags question: http://stackoverflow.com/q/25133512
tags question: http://stackoverflow.com/q/25120607
tags question: http://stackoverflow.com/q/25214713
tags question: http://stackoverflow.com/q/25195468
tags question: http://stackoverflow.com/q/25149186
tags question: http://stackoverflow.com/q/25226467
tags question: http://stackoverflow.com/q/25223145
tags question: http://stackoverflow.com/q/25212172
tags question: http://stackoverflow.com/q/25178074
tags question: http://stackoverflow.com/q/25190977
tags question: http://stackoverflow.com/q/25162002
tags question: http://stackoverflow.com/q/25174720
tags question: http://stackoverflow.com/q/25137138
tags question: http://stackoverflow.com/q/25155663
tags question: http://stackoverflow.com/q/25080174
tags question: http://stackoverflow.com/q/25109687
tags question: http://stackoverflow.com/q/25167271
tags question: http://stackoverflow.com/q/25161524
tags question: http://stackoverflow.com/q/25129704
tags question: http://stackoverflow.com/q/25096042
tags question: http://stackoverflow.com/q/25085051
type: Tag
tags question: http://stackoverflow.com/q/25079207
tags question: http://stackoverflow.com/q/25076851
tags question: http://stackoverflow.com/q/25125098
tags question: http://stackoverflow.com/q/25173195
tags question: http://stackoverflow.com/q/25125667
tags question: http://stackoverflow.com/q/25070398
tag name: backbone.js
tags question: http://stackoverflow.com/q/25197987
tags question: http://stackoverflow.com/q/25078182

http://stackoverflow.com/comment/39240076
comment on: http://stackoverflow.com/q/25195662
type: Comment
has text: Removed the tag. I was using Backbone in this application but I dont think the issue is related to it.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25143978
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25144048
has answer: http://stackoverflow.com/a/25144080
has body: I'm trying to "hide" an element when an ajax to a file returns true. When I click on the id of #delete, an ajax request is sent to a file that handles data which will return passed or failed. If the file returns 'passed', I then want to hide the parent to show it was 'deleted'. It's a list of items that are displayed dynamically. Each item has an 'x' that when clicked, the user is prompted to hit confirm or cancel to remove that item from the list. When the user hits confirmed, an ajax request is called to a file that will send the string 'passed' or 'failed'. This is what happens on the javascript side: $('#delete').on('click', function() { var $that = $('#delete'); bootbox.confirm("Are you sure you want to delete this event?", function(r) { // r is the result, true or false if(r) { $.post('panel', {"id": $that.data('id')}, function(data) { if(data.status === 'passed') { $that.parent().fadeOut(); } }); } }) }); All this works, but only for the first list item. If I click #delete on the second or third item, nothing happens. If I click on the first item and it successfully removes the parent, I cannot do the same for the other items. Staff Meeting This is a staff meeting 1 day from now Staff Meeting This is another staff meeting 16 hours ago The data sent to the file is data-id which represents the id of the item. On the PHP side, that's where the item with the id specified is deleted from the database. If it is deleted successfully, I return a json response of {"status": "passed"} and hide the list item on the client side showing it was successfully deleted. EDIT Now that the id has been changed to class, on success all items are deleted. I only need the current clicked element's parent deleted.
has comment: http://stackoverflow.com/comment/39140227
has comment: http://stackoverflow.com/comment/39140267
has answer: http://stackoverflow.com/a/25144048
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/39140143
has comment: http://stackoverflow.com/comment/39140120
type: Question
score: 0
answer count: 2
has title: Delete parent of clicked element
has comment: http://stackoverflow.com/comment/39140231
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25144080
tagged with: ajax
has comment: http://stackoverflow.com/comment/39140095
has comment: http://stackoverflow.com/comment/39140075

http://stackoverflow.com/comment/39205705
comment on: http://stackoverflow.com/a/25178817
type: AnswerComment
score: 0
has text: do you know why "slow" animation is not applying to last ul? Thanks, this really helped
type: Comment

http://stackoverflow.com/a/25210094
score: 10
has comment: http://stackoverflow.com/comment/39263281
has comment: http://stackoverflow.com/comment/39263318
upvote count: 10
answers question: http://stackoverflow.com/q/25209979
has body: To really test whether the exact character sequence "apple" is an item in your comma separated list (and not just a substring of the whole string), you can do (considering optional spaces before and after the value): If Array#indexOf is available: var items = str.split(/\s*,\s*/); var isContained = items.indexOf('apple') &gt; -1; If Array#some is available: var items = str.split(/\s*,\s*/); var isContained = items.some(function(v) { return v === 'apple'; }); With a regular expression: var isContained = /(^|,)\s*apple\s*($|,)/.test(str);
type: Answer
has comment: http://stackoverflow.com/comment/39263503
downvote count: 0

http://stackoverflow.com/a/25102809
upvote count: 1
answers question: http://stackoverflow.com/q/25102637
has comment: http://stackoverflow.com/comment/39063398
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You shouldn't use jquery.param method. It is intended for use with HTTP (AJAX) requests so that's not your case. You have to use JSON.stringify on writing cookie and JSON.parse on reading: // write (save): $.cookie('listresult', JSON.stringify(obj), { expires: 10 }); // read (restore): var obj = JSON.parse($.cookie('listresult'));
accepted answer of: http://stackoverflow.com/q/25102637

http://stackoverflow.com/comment/39284186
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25220814
has text: http://jsfiddle.net/Sara8/qjnyrqxw/

http://stackoverflow.com/a/25223909
upvote count: 0
has comment: http://stackoverflow.com/comment/39289181
has comment: http://stackoverflow.com/comment/39288991
has comment: http://stackoverflow.com/comment/39289016
downvote count: 1
has comment: http://stackoverflow.com/comment/39288955
has comment: http://stackoverflow.com/comment/39289077
has comment: http://stackoverflow.com/comment/39289024
has comment: http://stackoverflow.com/comment/39289044
score: -1
has comment: http://stackoverflow.com/comment/39288931
has comment: http://stackoverflow.com/comment/39289021
has comment: http://stackoverflow.com/comment/39289075
has comment: http://stackoverflow.com/comment/39289040
answers question: http://stackoverflow.com/q/25223733
has comment: http://stackoverflow.com/comment/39289118
has body: If I am getting you right, you just want substitutions: displayDetail => title displayName => label inputType => type. I came up with the follwoing: function changeData(data){ return JSON.parse(JSON.stringify(data).replace(/displayDetail/g, "title").replace(/displayName/g, "label").replace(/inputType/g, "type")); } Here is the Fiddle to play with. Edit: I forgot replacements for "NUMBER", "TEXT" and "SWITCH". function changeData(data){ return JSON.parse(JSON.stringify(data).replace(/displayDetail/g, "title").replace(/displayName/g, "label").replace(/inputType/g, "type").replace(/TEXT/g, "text").replace(/NUMBER/g, "number").replace(/SWITCH/g, "switch")); }
type: Answer

http://stackoverflow.com/q/25143786
tagged with: internet-explorer
tagged with: internet-explorer-7
tagged with: javascript
has comment: http://stackoverflow.com/comment/39139744
has comment: http://stackoverflow.com/comment/39140814
upvote count: 1
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39140081
has comment: http://stackoverflow.com/comment/39141238
has comment: http://stackoverflow.com/comment/39140910
has comment: http://stackoverflow.com/comment/39141022
answer count: 0
downvote count: 0
has title: AngularJS in Internet Explorer 7
score: 1
has body: Yes, I know, IE 7 is dated and does not support modern technology. **Insert classic Microsoft joke** However I work for a state University and there is a lot of red tape so for the time being we still partially support IE7 (hopefully that won't be the case soon). Also, I'm really curious about this issue. I have read through Angular's documentation for supporting old versions of IE and for the most part I can get things to work. But oddly enough, a simple Angular application crashes on IE7 if you populate two attributes with data bound content in the same HTML tag. For instance if I am looping (ng-repeat) through an object to create a link list, this works just fine: Google But this does not work: Google In fact it crashes the whole application. Any thoughts? Here is a working Plunkr http://plnkr.co/edit/znbXJkhiEQXqhTcyYcU4?p=preview just so you can preview some sample code. When I run that code on a static .html page in an IE 7 browser emulator (browserstack.com), nothing shows, not even the "Hello World". Just the Angular templating brackets. Please let me know if you need more information. Thanks.
has comment: http://stackoverflow.com/comment/39139745
has comment: http://stackoverflow.com/comment/39141068
type: Question

http://stackoverflow.com/q/25129445
has body: I have a problem in my nav menu in my website responsive... when I check to iPad, the indention using &amp;#x00A0 and &amp;nbsp; were not working. el.find('a').each(function(){ var $this = $(this), optText = "&amp;nbsp;&amp;nbsp;" + $this.text(), optSub = $this.parents( '.' + settings.subMenuClass ), len = optSub.length, dash; ... I tried &amp;nbsp; if( $this.parents('ul ul ul').hasClass( settings.subMenuClass ) ) { dash = Array( len+1 ).join( settings.subMenuDash ); optText = '&amp;nbsp; &amp;nbsp; ' + optText; } and &amp;#x00A0 if( $this.parents('ul ul ul').hasClass( settings.subMenuClass ) ) { dash = Array( len+1 ).join( settings.subMenuDash ); optText = '&amp;#x00A0 &amp;#x00A0 ' + optText; } both were not working on iPad, but the other devices and browsers were great. Does anyone have an idea about my case? Thanks in advance...
has answer: http://stackoverflow.com/a/25131990
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
has comment: http://stackoverflow.com/comment/39113641
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25129629
tagged with: javascript
tagged with: jquery
tagged with: ipad
favorite count: 0
has title: &#x00A0 and &nbsp; not working in iPad

http://stackoverflow.com/q/25119461
favorite count: 0
has body: I have tried a variety of escaping and unescaping options, but don't understand why my erb is not rendering properly. I have standard picture url in the format: https://i.ytimg.com/vi/pB-5XG-DbAA/hqdefault.jpg; entered into my controller as the following: @whats_hot_last_vid = @whats_hot_last.video.picture When I try to render it in my js.erb file: var lastsongImg = &lt;%= @whats_hot_last_vid %&gt;; Here's how it renders: var lastsongImg = https://i.ytimg.com/vi/pB-5XG-DbAA/hqdefault.jpg; From what I can see, it renders '//' in the http address as the beginning of a JS comment, leading to raising various errors like Uncaught SyntaxError: Unexpected token : Any ideas?
accepted answer: http://stackoverflow.com/a/25119780
type: AnsweredQuestion
score: 1
upvote count: 1
tagged with: ruby-on-rails
has title: How to render URIs safely in erb
type: Question
has answer: http://stackoverflow.com/a/25119565
tagged with: erb
tagged with: javascript
has answer: http://stackoverflow.com/a/25119780
possible better answer: http://stackoverflow.com/a/25119565
has comment: http://stackoverflow.com/comment/39095169
answer count: 2
tagged with: url
downvote count: 0

http://stackoverflow.com/q/25186246
score: 0
has answer: http://stackoverflow.com/a/25186597
answer count: 2
has title: Using regex to validate in JSP
has body: I have an input field and I want to validate its content before passing the value further. I'm struggling with creating a proper regex though, as regex created in online editor doesn't really work with my code (actually it blocks everything). Desired regex behaviour: Only numbers and ., you can use . only once as a decimal separator, value cannot start/end with ., value cannot start with 0. My code: var valueInput = $(row).find("#value").val(); var numbers = /^[0-9.]*$/; if( !valueInput.match(numbers) ) { //do something } valueInput is fine, it brins the value from the input properly. Any ideas? Edit. Thanks for your contribution, I wanted to sum up a little for people from future, looking for an answer: 1. Regex is not a string! I edited former code to make sure nobody's get confused, but comment to get rid of " " was crucial, thanks Pointy. 2. Regex I decided to use is /^([1-9][0-9]*)+(?:\.\d+)?$/. I realized I also need to handle case, when value has only decimal part, so it starts with 0. I didn't really want to play with regex here, so I made a trick: if valueInput start with something other than zero I validate with , else I validate with /^[0]{1,1}\.\d{1,2}$/g.
tagged with: javascript
has answer: http://stackoverflow.com/a/25187184
favorite count: 0
linked to: http://stackoverflow.com/q/2495402
tagged with: regex
type: UnansweredQuestion
upvote count: 1
duplicate of: http://stackoverflow.com/q/2495402
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39220505
has comment: http://stackoverflow.com/comment/39220034

http://stackoverflow.com/q/25172979
type: Question
score: 1
tagged with: forms
has answer: http://stackoverflow.com/a/25173296
accepted answer: http://stackoverflow.com/a/25173296
has title: Handling multiple forms in the same page
upvote count: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: If I have something like this in some page in my project: <c:url value="/${entity}/cadastra" var="cadastra"/> <form:form method="POST" action="${cadastra}" class="form" enctype="multipart/form-data"> ... cadastrar </form:form> and the submit event is handled by this code: $('form.form').ajaxForm(function(data) { if(data == '') $('#yes').css('display', 'block'); else $('#not').css('display', 'block'); $('<<element>>').each(function(){ this.reset(); }); }); anyone knows what should be the value for <> if I want reset only the fields from the form I submit, and I could have a new form, with the same class, inside div.dialog? If I use form.form both forms are reseted, and if I use this, I get an error. Any ideas to solve this?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39195053

http://stackoverflow.com/a/25071810
upvote count: 2
downvote count: 1
has body: $('body').hide(); $(function() { callAjaxFunction(); $('body').show(); });
has comment: http://stackoverflow.com/comment/39006056
answers question: http://stackoverflow.com/q/25071715
score: 1
has comment: http://stackoverflow.com/comment/39005892
type: Answer

http://stackoverflow.com/comment/39237304
comment on: http://stackoverflow.com/a/25196233
type: AnswerComment
has text: ok. So I was the one to make the mistake, thinking that I could describe the problem more simply with an array instead of a dictionary.
score: 0
type: Comment

http://stackoverflow.com/comment/39073225
type: Comment
type: QuestionComment
has text: I see you accepted Satpals answer. I agree with his method; but you should use the complete callback instead of the success callback to set the click handler again. See my answer.
score: 1
comment on: http://stackoverflow.com/q/25107699

http://stackoverflow.com/q/25119800
tagged with: angularjs
type: UnansweredQuestion
score: 0
has title: Angular Injector Error help >
type: Question
has answer: http://stackoverflow.com/a/25119975
tagged with: javascript
has comment: http://stackoverflow.com/comment/39095610
has body: I am stuck on this task in my angular project for the passed 7 hours, hopefully some one can help. Well I am trying to display data from the backend in a table using angular. In My JS file I have the following: var MyApp = angular.module("MyApp", ["ngRoute"]). config(function ($routeProvider) { $routeProvider. when('/', { controller: ListCtrl, templateUrl: 'list.html' }). otherwise({ redirectTo: '/' }); }); MyApp.factory('MyApp', function ($resource) { return $resource('/myapp/:id', { id: '@id' }, { update: { method: 'PUT' } }); }); var ListCtrl = function ($scope, $location, MyApp) { $scope.items = MyApp.query(); }; I keep getting this error: Error: [$injector:unpr] Unknown provider: $resourceProvider <- $resource <- myApp Afer looking at the error I thought I was missing something in my HTML file but I think I have defined everything in my HTML file like so: I have no clue whats wrong here can some please help?
answer count: 1

http://stackoverflow.com/comment/39172529
comment on: http://stackoverflow.com/q/25161128
score: 0
type: Comment
type: QuestionComment
has text: well i'm new at web programming an i had no idea it .live was deprecated

http://stackoverflow.com/comment/39213357
type: Comment
has text: Ok, I see. My error was to consider the injected code as if it were incorporated somehow like a tag and therefore executed as page script.
comment on: http://stackoverflow.com/a/25182586
score: 0
type: AnswerComment

http://stackoverflow.com/a/25083392
has body: If you want to add more links that will trigger the checkbox, create a class name for them and use getElementByClass('classname') Use onclick in your html, not js. Example: &lt;div onclick="doSomething()"&gt;&lt;/div&gt; Just use an if/else statement for the check/uncheck: if(document.getElementById('myCheck').checked){document.getElementById("myCheck").checked = false;} else{document.getElementById("myCheck").checked = true;}
has comment: http://stackoverflow.com/comment/39029316
has comment: http://stackoverflow.com/comment/39027615
answers question: http://stackoverflow.com/q/25083201
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/25106913
has body: UPDATE: OK, that's completely different issue we are having here. And it requires similar but extended solution. Consider this: you have multiple fields and you require several of them to figure out order in which to sort. In this case you can create compound sorting property and use formula like this: compoundSortField = 2**N * fieldN + 2**(N-1) * fieldN-1 ... field1 In your case it is going to be: compoundSort = 4 * need_vote + 2 * has_comment + stale You can alter you json by hand or do it after each ajax request with real data. Next thing is orderBy accepts array of arguments which makes it possible to do this: &lt;tr ng-repeat="loan in loans | orderBy:[myOrder, 'name']"&gt; Which means that it first will be ordered by myOrder and then by name. Code of your controller will be changed to: $scope.orderOptions = ['name','-compoundSort'] And your button will be switching between name and -compoundSort making it double sort by name or sort by descending compound sort and then by name. Alternatively you can have two arrays: $scope.simpleOrder = ['name'] $scope.complexOrder = ['-compoundSort', 'name'] $scope.myOrder = $scope.simpleOrder And switch myOrder between them. Update plnkr here: http://plnkr.co/edit/dS9PNFdCiuP2p6RPPha2?p=preview Here is your updated fiddle: http://plnkr.co/edit/EDHUJHxW5V2W5L8RHapn?p=preview Filter orderBy accepts string as a parameter, but you do not need to provide string literal, it can be variable in scope ( or controller field if you use controllerAs etc ) &lt;tr ng-repeat="loan in loans | orderBy:myOrder"&gt; given that you will have several elelemts like ... ng-click='myOrder="name"' ... ng-click='myOrder="need_vote"' In order to have one button doing loop of options you can do this: $scope.orderOptions = ['name', 'need_vote', ...] $scope.myOrder = 'name' $scope.orderOption = 0 $scope.nextOrder = function() { $scope.orderOption ++ if ($scope.orderOption &gt;= $scope.orderOptions.length) $scope.orderOption = 0 $scope.myOrder = $scope.or…
has comment: http://stackoverflow.com/comment/39090571
upvote count: 2
answers question: http://stackoverflow.com/q/25106891
has comment: http://stackoverflow.com/comment/39071356
type: Answer
has comment: http://stackoverflow.com/comment/39080416
score: 2
has comment: http://stackoverflow.com/comment/39095322
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25106891

http://stackoverflow.com/comment/39244885
has text: @Daedalus, thanks for the comment, i'm new to this. I pasted in some code that i try to map the object to, the first layer workst but it is not yet a deep copy
comment on: http://stackoverflow.com/q/25199514
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39007395
type: QuestionComment
has text: Why not just auto-save every X seconds when they are modifying values to be sure. Relying on capturing the `onbeforeunload` event (and then in IE determining if it was really an unload event, not an in-page navigation) is fragile at best.
type: Comment
comment on: http://stackoverflow.com/q/25072720
score: 0

http://stackoverflow.com/a/25233663
has body: Read the Chrome documentation "Using eval in Chrome Extensions. Safely.". It answers this common question.
answers question: http://stackoverflow.com/q/25196121
has comment: http://stackoverflow.com/comment/39328782
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39334047

http://stackoverflow.com/comment/39176743
score: 0
type: Comment
has text: go-oleg Just one more question. I have a form and inside my drop zone. Why I need the url parameter: "/ file-upload"? Thank you!
comment on: http://stackoverflow.com/a/25153017
type: AnswerComment

http://stackoverflow.com/comment/39107956
comment on: http://stackoverflow.com/a/25126121
score: 0
type: AnswerComment
type: Comment
has text: @skarchmit - I'm not sure what you're asking. You can change transition properties again in the future by rerunning this code. I wouldn't recommend changing it in the middle of an animation, but other than that, it would work fine.

http://stackoverflow.com/q/25104442
has comment: http://stackoverflow.com/comment/39066667
has answer: http://stackoverflow.com/a/25104662
has comment: http://stackoverflow.com/comment/39066624
has comment: http://stackoverflow.com/comment/39066543
has comment: http://stackoverflow.com/comment/39066527
has answer: http://stackoverflow.com/a/25106192
has comment: http://stackoverflow.com/comment/39068024
has comment: http://stackoverflow.com/comment/39066655
has comment: http://stackoverflow.com/comment/39066511
type: Question
has comment: http://stackoverflow.com/comment/39066685
possible better answer: http://stackoverflow.com/a/25104825
has comment: http://stackoverflow.com/comment/39066735
has comment: http://stackoverflow.com/comment/39067337
has body: Just wondering if there is some other way than this. var hashStringArray = function(array) { array.sort(); return array.join('|'); }; I don't like sorting much and using that delimiter is not safe either if it's contained in one of the strings. In overall I need to produce same hash no matter the order of strings. It will be rather short arrays (up to 10 items), but it will be required very often so it shouldn't be too slow. I intend to use it with ES6 Map object and I need to easily find same array collection. Updated example of use var theMap = new Map(); var lookup = function(arr) { var item = null; var hashed = hashStringArray(arr); if (item = theMap.get( hashed )) { return item; } theMap.set( hashed, itemBasedOnInput ); return itemBasedOnInput; } var arr1 = ['alpha','beta','gama']; var arr2 = ['beta','alpha','gama']; lookup(arr1) === lookup(arr2) Performance tests http://jsperf.com/hashing-array-of-strings/5
has comment: http://stackoverflow.com/comment/39066603
tagged with: arrays
has comment: http://stackoverflow.com/comment/39066492
has answer: http://stackoverflow.com/a/25105589
tagged with: javascript
has comment: http://stackoverflow.com/comment/39066584
score: 4
has comment: http://stackoverflow.com/comment/39067047
has comment: http://stackoverflow.com/comment/39066614
upvote count: 4
has comment: http://stackoverflow.com/comment/39066670
downvote count: 0
tagged with: string-hashing
favorite count: 0
has comment: http://stackoverflow.com/comment/39066565
accepted answer: http://stackoverflow.com/a/25105589
has comment: http://stackoverflow.com/comment/39068002
answer count: 4
tagged with: lookup
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39066657
has title: Hashing array of strings in javascript
has answer: http://stackoverflow.com/a/25104825

http://stackoverflow.com/comment/39250468
score: 0
comment on: http://stackoverflow.com/q/25119349
type: QuestionComment
type: Comment
has text: Are you trying to convert world coordinates to camera coordinates?

http://stackoverflow.com/q/25119381
has answer: http://stackoverflow.com/a/25120280
has comment: http://stackoverflow.com/comment/39094603
accepted answer: http://stackoverflow.com/a/25120280
type: Question
has comment: http://stackoverflow.com/comment/39094396
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39094792
has comment: http://stackoverflow.com/comment/39094974
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 1
favorite count: 0
has title: How to reset questionnaire on 'no'
type: AnsweredQuestion
has body: I'm trying to build a questionnaire which shows the next question after the previous one is answered. I managed to get this working, but when 'no' is pressed, I want the questionnaire to reset to that answer and erase all later questions so you can start again from that point. At the moment my form goes nuts when I press 'no' and I can't get my head around it. Could someone help me out? HTML: 1. Question 1 Yes No 1. Question 2 Yes No No 3. Question 3 Yes No No Yes - End No - End Javascript: Fiddle: http://jsfiddle.net/ximmo/94Vjn/2/

http://stackoverflow.com/comment/39147376
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25144956
type: AnswerComment
has text: Yes, I think I will ask a new question, thanks for your help!

http://stackoverflow.com/comment/39046479
type: QuestionComment
comment on: http://stackoverflow.com/q/25088481
score: 0
has text: Have you checked Event tracking in Google Analytics? You could record custom events such as submitting the contact form. You can read more about that here https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
type: Comment

http://stackoverflow.com/q/25156674
linked to: http://stackoverflow.com/q/503093
has answer: http://stackoverflow.com/a/25156876
tagged with: javascript
has comment: http://stackoverflow.com/comment/39163777
type: Question
has comment: http://stackoverflow.com/comment/39163858
score: 0
answer count: 3
has title: Make a form submit display a different page depending on radio button answers
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25157058
has answer: http://stackoverflow.com/a/25157142
has body: I've built a simple survey page which consists of 3 questions where the user will click on a radio button on each row indicating a level where they are at with each. Here's a visual of how it looks:- They will get a score depending on what they choose. Never = 0, Infrequently = 1, Regularly = 2, Constantly = 3. When they click Submit below the form, I'd like them to be taken to a page depending on their score. Below 2 = page1.html, 2-4 = page2.html, 6-8 = page3.html, 9 = page4.html The form itself doesn't need to submit the data to any email or any database. It's simply to show a page of information depending on your score. What is the best way to achieve this using Javascript or jQuery? Thanks, Tim
accepted answer: http://stackoverflow.com/a/25157142
possible better answer: http://stackoverflow.com/a/25156876
type: AnsweredQuestion

http://stackoverflow.com/comment/39077713
type: QuestionComment
comment on: http://stackoverflow.com/q/25110017
score: 0
has text: @Dan: Here is my code. http://jsfiddle.net/RCe9Q/.
type: Comment

http://stackoverflow.com/comment/39233126
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25164907
score: 0
has text: How many computers nowadays have built-in fax modems, much less a RJ45 port? Would the script you mentioned be run on the client side or the server side? Can VB Script be run on any other browser besides IE, not to mention whether it is even supported anymore on other browsers?

http://stackoverflow.com/comment/39184274
has text: `angular.module('myApp', ['anydependenciesyouhave','swipe'])..`
comment on: http://stackoverflow.com/q/25165872
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/25173079
score: 2
answer count: 0
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has title: Merge results of duplicate fields
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39195452
upvote count: 2
has comment: http://stackoverflow.com/comment/39195047
has body: I have a JSON file which looks like the following: { "name1": { "fields": { "Name": { "type": "STRING" }, "Email": { "type": "STRING" }, "Password": { "type": "STRING" }, "role": { "type": "STRING" } } }, "name2": { "fields": { "url": { "type": "STRING" } } }, "name1": { "fields": { "Address": { "type": "STRING" } } } } I want to iterate through it and if there is a name which already exists I want to merge the fields; here is my code: var DBSchema = []; async.each(Object.keys(config), function(key) { var currentObject = config[key]; var DBSchemaTemp = []; for (var field in currentObject.fields) { if (currentObject.fields.hasOwnProperty(field)) { DBSchemaTemp[field] = {AttributeName: field, AttributeType: currentObject.fields[field].type } } } var arrayInSchema = DBSchema[key]; if (typeof arrayInSchema === 'undefined') { DBSchema[key] = []; DBSchema[key].push(DBSchemaTemp); } else { DBSchema[key].concat(DBSchemaTemp); } }, function(err) { console.log(err); }); for (variable in DBSchema) { console.log(variable); console.log(DBSchema[variable]); } My desired output is: { name1: [ Name: { AttributeName: 'Name', AttributeType: 'STRING' }, Email: { AttributeName: 'Email', AttributeType: 'STRING' }, Password: { AttributeName: 'Password', AttributeType: 'STRING' }, role: { AttributeName: 'role', AttributeType: 'STRING' } Address: { AttributeName: 'Address', AttributeType: 'STRING' } ] name2: [ url: { AttributeName: 'url', AttributeType: 'STRING' } ] } but my code returns: { name1: [ [ Address: { AttributeName: 'Address', AttributeType: 'STRING' } ] ] name2: [ [ url: { AttributeName: 'url', AttributeType: 'STRING' } ] ] } Please note; for some reason it is adding double [[]] as well!
tagged with: node.js
has comment: http://stackoverflow.com/comment/39195064
has comment: http://stackoverflow.com/comment/39194603

http://stackoverflow.com/a/25182964
type: Answer
accepted answer of: http://stackoverflow.com/q/25182912
downvote count: 0
score: 3
upvote count: 3
type: AcceptedAnswer
has body: parse: function (response, options) { return response.data; } http://backbonejs.org/#Model-parse
answers question: http://stackoverflow.com/q/25182912

http://stackoverflow.com/q/25210870
has title: "Uncaught ReferenceError: myVar is not defined" OOP Javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/39264886
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25211360
accepted answer: http://stackoverflow.com/a/25211360
tagged with: meteor
type: AnsweredQuestion
has body: I'm working with 3 different files: [root]/client/js/welcome.js [root]/client/js/ups.js [root]/client/js/main.js (I also renamed it xxx.last.js) Code: //welcome.js function Welcome(){ console.log("main"); } Welcome.prototype.constructor = Welcome; Welcome.prototype.displayPage = function(page){ var jQ_page = $("#" + page); var title = jQ_page.attr("data-tile"); $("#main").css("display", "none"); jQ_page.css("display", "block"); document.title = title; }; //ups.js function Ups(){ this.query = {}; this.creteria = {sort: {JB_owner: 0}, limit: 500, skip: 0, fields: {ClusterId: 0}}; console.log("UPS"); } Ups.prototype.constructor = Ups; Meteor.startup(function() { var mainObj = new Welcome(); var UpsObj = new Ups(); $(document).ready(function() { ... ... ... }); }); Welcome and Ups are undefined and I don't understand why, all three files are being loaded and according meteor Docs that should works but it doesn't, any hint or help? thanks!
type: Question

http://stackoverflow.com/comment/39056775
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25099120
type: QuestionComment
has text: `{ return d3.time.format('%x')(new Date(d[0])) });`?

http://stackoverflow.com/a/25108724
answers question: http://stackoverflow.com/q/25108648
has comment: http://stackoverflow.com/comment/39074890
has body: Because the string has newlines, the JavaScript looks like this: ... .innerHTML = "text text text text" Which is not valid JS. In PHP, replace the newlines with &lt;br /&gt;, so innerHTML will parse instead of a syntax error.
score: 0
type: Answer

http://stackoverflow.com/q/25129330
type: AnsweredQuestion
has body: I know I can setup a task in grunt.config that will grunt-contrib-copy files from src to dest, and looking through Grunt docs I know I can copy single files using grunt.file.copy. But, is it possible to create grunt-contrib-copy tasks on the fly in a custom registered task to accommodate arguments being sent from the bash? I want to create a new directory grunt.file.mkdir("some/path/appfoldername") and then copy files to that folder from another destination, but I won't know the folder name until after the custom task is run. So something like: grunt create_app:appfoldername So I could copy single files over one at a time, but the files will change so want the power of grunt-contrib-copy, but with the flexibility of a custom registered task. I imagine something like this if my explanation isn't clear enough: grunt.registerTask('createCopy', 'Create a copy', function(folderName) { var cwd = grunt.template.process("some/path/to/app"); var src = grunt.template.process("some/path/to/src"); var dest = grunt.template.process("some/path/to/dest") + folderName; grunt.task.run('copy: { files: { cwd: cwd, src: src, dest: dest } }'); } UPDATE grunt.registerTask('mkapp', 'Create Application', function(appName) { // Check appName is not empty or undefined if(appName !== "" &amp;&amp; appName !== undefined) { // Require node path module, since not a global var path = require("path"); // Resolve directory path using templates var relPath = grunt.template.process("&lt;%= root %&gt;/&lt;%= dirs.src %&gt;/application/"); var srcPath = relPath + "default_install"; var destPath = relPath + appName; // Create new application folder grunt.file.mkdir(destPath, 0444); // Return unique array of all file paths which match globbing pattern var options = { cwd: srcPath, filter: 'isFile' }; var globPattern = "**/*" grunt.file.expand(options, globPattern).forEach(function(srcPathRelCwd) { // Copy a source file to a destination path, creating directories if necessary grunt.file.copy( path.join(sr…
has answer: http://stackoverflow.com/a/25130208
type: Question
has title: Grunt - Can you call grunt-contrib-copy from within a custom registered task and customize the copy on the fly?
score: 5
upvote count: 5
tagged with: javascript
tagged with: gruntjs
answer count: 2
tagged with: bash
tagged with: grunt-contrib-copy
downvote count: 0
possible better answer: http://stackoverflow.com/a/25142415
accepted answer: http://stackoverflow.com/a/25130208
favorite count: 0
has answer: http://stackoverflow.com/a/25142415
tagged with: node.js

http://stackoverflow.com/comment/39199203
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25175728
has text: You can replace `$(this.el)` with `this.$el`
type: AnswerComment

http://stackoverflow.com/a/25230023
score: 1
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39300584
answers question: http://stackoverflow.com/q/25229971
has body: You'll have to refactor your code a little. I'm assuming you call initialize from the success callback. Pass the locations array as an argument to initialize. function initialize(locations) { ... } $.ajax({ type: "POST", url: "mapajax.php", dataType:'text', success: function (result) { initialize(result); } }); Then you can cut down even more and just do success: initialize, as long as initialize doesn't expect other parameters.
downvote count: 0

http://stackoverflow.com/q/25214060
answer count: 1
has body: I have a function like this, $(document).ready(function(){ $("#submitbutton").on("click", function(){ //disable the button to prevent multiple clicks $("#submitbutton").attr("disabled", "disabled"); var myname = $("#namefield").val(); //perform the request var req = ocpu.rpc("output", { myname : myname }, function(output){ //I am getting undefined is not a function error $("#output").highstock({ chart: { borderColor: '#98AFC7', borderRadius: 20 Can attached highstock to a div like this?
has answer: http://stackoverflow.com/a/25214213
has title: Unable to attach a highstock to a div
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25214213
type: Question
tagged with: highcharts
tagged with: javascript
score: 0

http://stackoverflow.com/q/25130851
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/39116133
has answer: http://stackoverflow.com/a/25130956
has body: Based on the DOM tree below, I want to get all of the element that are the child of every div with message as its class and put them all in an array. This will create an array of objects. Note : ul and all of its children in all levels can be added dynamically to the dom at any given time. How do I do that? I have tried var messages = $('.rightP').find('li>.message>p'); $.each(messages,function(){ console.log(this); }); but no luck DOM tree David Hello Watson yes anything? .... ...
has answer: http://stackoverflow.com/a/25130997
answer count: 3
upvote count: 1
tagged with: dom
possible better answer: http://stackoverflow.com/a/25130942
has answer: http://stackoverflow.com/a/25130942
tagged with: arrays
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25130997
has comment: http://stackoverflow.com/comment/39116330
has title: JQuery: How to get all bottom-most children in a DOM tree?
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/39087875
has text: @MackieeE Yes, but the browser has access to it before the user explicitly gives permission to use it. In action script you have an API to get a list of cameras and it also detects changes, in case the user adds or removes one. So 1. it is possible to add it, 2. it's not a security/privacy issue and 3. it makes sense to know it, because you want be able to implement different UI and/or text informations for the user, depending on this detection.
comment on: http://stackoverflow.com/q/25115682
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25134913
downvote count: 0
answers question: http://stackoverflow.com/q/25133812
accepted answer of: http://stackoverflow.com/q/25133812
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39136059
type: Answer
has comment: http://stackoverflow.com/comment/39129672
score: 2
has body: It is most likely that your responseObj.me[i].webUrl is incorrect or undefined. I also noticed that you had a grave accent character at the end of you javascript paste. Was it accidental or does it exist in your code as well? I created a jsfiddle here, you can see that it works (at least on jQuery 2.1.0 version) http://jsfiddle.net/V49Fe/1/ HTML &lt;div id="web"&gt;&lt;/div&gt; JavaScript var string = "google.co.in"; $('#web').append('&lt;a href="'+string+'" rel="external"&gt;'+string+'&lt;/a&gt;'); If you mean that your link is not pointing to actual google.co.in url, that is because you need to have http:// in front of the url, like this: $('#web').append('&lt;a href="http://'+string+'" rel="external"&gt;'+string+'&lt;/a&gt;');
has comment: http://stackoverflow.com/comment/39124881

http://stackoverflow.com/a/25213866
has comment: http://stackoverflow.com/comment/39270667
has comment: http://stackoverflow.com/comment/39270572
type: Answer
has comment: http://stackoverflow.com/comment/39270545
has comment: http://stackoverflow.com/comment/39270640
has body: jQuery find looks for descendents of the current jQuery selection. In this case, $(HTML) is already the div with the product class, so .find('.product .listing .item') would look for descendents of the top div with the class of product. In this case, using .find('.listing .item') is correct.
score: 0
answers question: http://stackoverflow.com/q/25213851

http://stackoverflow.com/q/25200235
tagged with: ajax
tagged with: get
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39244657
favorite count: 0
score: -1
type: Question
has comment: http://stackoverflow.com/comment/39244702
has answer: http://stackoverflow.com/a/25200314
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39245612
has comment: http://stackoverflow.com/comment/39244675
has title: Ajax .can't figure it out
upvote count: 0
accepted answer: http://stackoverflow.com/a/25200314
tagged with: javascript
has body: I just finished learning Ajax so I tried to make a simple project(a simple port scanner), it not working for me. I have no idea what is the problem. It's just showing 'Scan started'. please help me. There is no problem inside the php file, only in this code(VVVV) var ports = [80, 22, 443, 21, 8080, 25, 3306]; function loadData(url, port){ 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"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("myDiv").innerHTML += " " + xmlhttp.responseText; } } xmlhttp.open("GET","scan.php?url=" + url + "&port=" + port,true); xmlhttp.send(); } function scan () { // body... document.getElementById("myDiv").innerHTML = "Scan Started"; if(document.getElementById("url").innerHTML){ var url = document.getElementById("url").innerHTML; for (var i = 0; i < ports.length; i++) { loadData(url, ports[i]); }; } } Scan Thanks, Mr. Frost

http://stackoverflow.com/comment/39167262
type: QuestionComment
has text: @user3851652 There are already two answers to your question...
type: Comment
comment on: http://stackoverflow.com/q/25158543
score: 0

http://stackoverflow.com/a/26902662
upvote count: 1
answers question: http://stackoverflow.com/q/25080451
score: 1
has body: You enabled vp8 codec in asterisk server, If no then try to enable vp8 codec from sip.conf. If yes then copy your console log here from browser.. Thanks.!!!!
downvote count: 0
type: Answer

http://stackoverflow.com/q/25194600
has comment: http://stackoverflow.com/comment/39234260
has comment: http://stackoverflow.com/comment/39234444
has title: Removing the first line from a JSON response
has comment: http://stackoverflow.com/comment/39234459
score: 0
has comment: http://stackoverflow.com/comment/39234292
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25194708
has comment: http://stackoverflow.com/comment/39234323
type: Question
has comment: http://stackoverflow.com/comment/39234403
linked to: http://stackoverflow.com/q/3506208
tagged with: javascript
has body: My current code is : $.getJSON("https://www.domain.com/someapi/callback=?", function(data){ $.each(data, function(i,item){ alert(item.x); }); }); Right now I'm getting an error because they're adding a line to the top of my json response. is there a way to get rid of that line? Thanks! UPDATE: I have also tried doing something like this: $.ajax({ url: "https://www.domain.com/someapi/callback=?", type: "get", success: function (data) { alert(data) } }); but it's a crossdomain call, so i get that error.
has comment: http://stackoverflow.com/comment/39234411
has comment: http://stackoverflow.com/comment/39234295
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39234358

http://stackoverflow.com/comment/39156899
comment on: http://stackoverflow.com/a/25139329
type: AnswerComment
type: Comment
has text: +1. Bonus points for explaining how I can ask "Do these two balls look and behave the same?"
score: 0

http://stackoverflow.com/comment/39129530
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25136540
has text: It doesn't work, I remind you that I have this code inside a form and that is the problem, cause without it it works pretty good
type: AnswerComment

http://stackoverflow.com/comment/39100067
has text: Elements added to the DOM after page load can't be directly accessed. As such, access to/event for these nodes need to be delegated by an element (usually its parent) that already existed at page load. More here: http://api.jquery.com/on/ and http://api.jquery.com/delegate/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25120984

xamarin.android
type: Tag
tag name: xamarin.android
tags question: http://stackoverflow.com/q/25118869

http://stackoverflow.com/q/25089748
has comment: http://stackoverflow.com/comment/39040055
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39040043
has comment: http://stackoverflow.com/comment/39040030
has comment: http://stackoverflow.com/comment/39039898
has title: How can I detect when an element dynamically added has loaded?
downvote count: 0
possible better answer: http://stackoverflow.com/a/25089898
has comment: http://stackoverflow.com/comment/39040017
has comment: http://stackoverflow.com/comment/39039979
has answer: http://stackoverflow.com/a/25089898
type: Question
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25089981
accepted answer: http://stackoverflow.com/a/25089981
answer count: 2
has comment: http://stackoverflow.com/comment/39039963
upvote count: 1
has body: Edit: added Handlebar template loading I am trying to detect when a dynamically added element has been loaded (from a handlebars template), but the event never fires. Here is the code: var source = $('#mapTemplate').html(); var template = Handlebars.compile(source); $('#wrapper').fadeOut(function() { $('#wrapper').html(template()); $('#wrapper').fadeIn(); }); $('body').on('ready', '#mapCanvas', function() { alert('Ready') var mapOptions = { center: new google.maps.LatLng(-34.397, 150.644), zoom: 8 }; var map = new google.maps.Map(document.getElementById("mapCanvas"),mapOptions); }) What am I doing wrong?

http://stackoverflow.com/a/25141501
has comment: http://stackoverflow.com/comment/39135766
type: Answer
has comment: http://stackoverflow.com/comment/39136038
has body: As Daniel said, you're forgetting the first 2, it may be better to write your initial values as [1, 0] or use a generator like this var fib = (function () { var a = 1, b = 0, c = 0; return function () { c = a + b; a = b; return b = c; }; }()); var i, t = 0; while ((i = fib()) &lt; 4000000) { if ((i &amp; 1) === 0) { t += i; } } t; // 4613732 The Fibonacci sequence actually starts 1, 1, 2, 3..
has comment: http://stackoverflow.com/comment/39135732
has comment: http://stackoverflow.com/comment/39135813
upvote count: 1
has comment: http://stackoverflow.com/comment/39135572
has comment: http://stackoverflow.com/comment/39135729
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25141209
answers question: http://stackoverflow.com/q/25141209

http://stackoverflow.com/q/25156726
has comment: http://stackoverflow.com/comment/39163912
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/39163849
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39163760
answer count: 1
has answer: http://stackoverflow.com/a/25156828
type: UnansweredQuestion
score: 0
has title: Javascript Array not being filled
has body: So i'm trying to self learn HTML and Jscript but i cannot figure out for the life of me what i've did wrong in this piece of code, its a drop down question list that asks the user what fruits they like, and their asking to make 9 answers, so this script is to capture those answers and store them in an array but when it breaks outside the loop the last alert does not show, so i can see the array is not actually getting filled. I used the alerts for bug checking :) &lt;script&gt; function submitInfo(passed){ var Fruit = []; var myForm = passed+"Form"; //alert("here start"+" "+document.getElementById(myForm).length+" "+myForm); for (var i = 0; i &lt; document.getElementById(myForm).length; i++) { //alert("in loop"); var myFruit = passed+"Input"+i; //alert(myFruit+" "+document.getElementById(myFruit).value); Fruit.push(document.getElementById(myFruit).value); // var Fruit[i] = document.getElementById(myFruit).value; alert(Fruit[i]); } alert(Fruit[i]); } &lt;/script&gt; Thank you in advance for any help, it is appreciaed
type: Question

http://stackoverflow.com/a/25128241
accepted answer of: http://stackoverflow.com/q/25128163
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25128163
type: Answer
has body: This should do the trick $('.c-input').live('change', ':checkbox', function() { var target = $(this).closest('.c-input').prev().find('.showHideDiv'); if ($(this).find('input:checked').length == 0) { target.hide(); } else { target.show(); } }); DEMO Some comments: Replaced 'checkbox' by ':checkbox'. Your selector finds tags with name checkbox (&lt;checbox\&gt;,that's not what you're looking for this in your context is the checkbox and not the .c-input element. I changed the related selector to reflect this.

http://stackoverflow.com/comment/39182485
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25166603
type: QuestionComment
has text: You can't return a boolean, only the string `true`, but in your case PHP most likely returns the number `1` (or nothing)

http://stackoverflow.com/q/25078809
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39034342
has answer: http://stackoverflow.com/a/25092246
has comment: http://stackoverflow.com/comment/39019347
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25078974
has answer: http://stackoverflow.com/a/25078928
upvote count: 1
accepted answer: http://stackoverflow.com/a/25092246
type: Question
has title: reload PHP variable as submitted in dropdown menu via AJAX
possible better answer: http://stackoverflow.com/a/25078928
tagged with: javascript
has comment: http://stackoverflow.com/comment/39034427
answer count: 3
has body: On a webpage I am trying to create a dropdown menu with some features. After a selection has been made in the dropdown menu the PHP variable "$bin_sec" gets updated to a new value. After $bin_sec has been updated I want a div element (with the id tag of "WHAT") in my webpage to now be reloaded and now take on the new value of $bin_sec. I'm open to using AJAX, PHP, jQuery, MySQL, etc... I can't find or come to a working solution. My code for the dropdown menu: &lt;form id="container2" method="post"&gt; &lt;select name="name" onchange='$("#WHAT").load("testing.php",{bin_sec:x});'&gt; &lt;?php $bin_sec=60;?&gt; &lt;option selected="selected" &lt;?php if ($_POST['name'] == '60'){ print 'selected'; $bin_sec=60; }?&gt; value="60"&gt;1 Minute&lt;/option&gt; &lt;option &lt;?php if ($_POST['name'] == '120'){ print 'selected'; $bin_sec=120; }?&gt; value="120"&gt;2 Minutes&lt;/option&gt; &lt;option &lt;?php if ($_POST['name'] == '300'){ print 'selected'; $bin_sec=300; }?&gt; value="300"&gt;5 Minutes&lt;/option&gt; &lt;option &lt;?php if ($_POST['name'] == '600'){ print 'selected'; $bin_sec=600; }?&gt; value="600"&gt;10 Minutes&lt;/option&gt; &lt;/select&gt; &lt;/form&gt; &lt;div id="WHAT"&gt; &lt;?php echo $bin_sec; ... ?&gt; &lt;/div&gt; testing.php: &lt;?php $bin_sec = $_POST['name']; ?&gt; &lt;script type="text/javascript"&gt; $("#WHAT").load("index.php #WHAT") &lt;/script&gt; I think this code should work but it doesn't... Any corrections would be very much appreciated. Thank you in advance.
has comment: http://stackoverflow.com/comment/39035710
downvote count: 0
tagged with: jquery

http://stackoverflow.com/q/25183094
tagged with: ruby
has answer: http://stackoverflow.com/a/25183490
has answer: http://stackoverflow.com/a/25357938
answer count: 5
upvote count: 1
tagged with: ruby-on-rails
has title: Terms and agreement checkbox in simple form for
has comment: http://stackoverflow.com/comment/39212117
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25183178
score: 1
has answer: http://stackoverflow.com/a/25183289
has body: I am trying to achieve something very simple but cannot get my head around it . I just wanted the user to select the terms and conditions and not be able to move forward without checking it . I decided to do it in client side validations . View - Checkbox I agree to Terms and Conditions. View - Submit button <%= f.button :submit, "Submit", :class=>"big-blue-btn" %> Sign Up as a User JS $function validateCheckbox() { if ($('#checkbox').attr('checked')) { alert("you have to accept the terms first"); } }); Please do let me know how i can achieve the same , i know i am missing something very small but can't able to find it .
type: Question
accepted answer: http://stackoverflow.com/a/25357938
possible better answer: http://stackoverflow.com/a/25183289
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ruby-on-rails-3
has answer: http://stackoverflow.com/a/25183931
favorite count: 0

http://stackoverflow.com/comment/39189389
type: Comment
comment on: http://stackoverflow.com/q/25170134
type: QuestionComment
has text: That was quite unnecessary, @Aerovistae.
score: 0

http://stackoverflow.com/comment/39257080
type: QuestionComment
comment on: http://stackoverflow.com/q/25206719
has text: i tried that method earlier but it did not append the class to the div
score: 0
type: Comment

http://stackoverflow.com/comment/128720055
has text: Would you mind showing me an example of how it's mocked in the actual unit test? my unit test is failing with the following: Google maps library can not be found. I added the line in the .conf and created the file
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25226031
type: AnswerComment

http://stackoverflow.com/q/25192470
has answer: http://stackoverflow.com/a/25204738
score: 0
has body: I have been trying for hours to read the table from within azure client services with absolutely no success... I can insert items into the table fine, but when reading from the table it doesnt even seem to do the where part, I feel like i have tried every different version of code to get this working but nothing is working for me :( console.log("user_id1" + user_id1) notpic_pushClient.getTable("myTable").where({ user_id: user_id1 }).read({ success: function (results) { if (results.length &gt; 0) { console.log("yes exists"); } else { console.log("no doesnt exist yet"); } } }); This doesnt work BUT the code below does....I am baffled...do I need something special in the read section of scripts on that table? var item = { user_id: user_id1, text: "New User Added" }; notpic_pushClient.getTable("myTable").insert(item); EDIT I have just read another post Azure mobile services: basic read function in javascript that explains success is for server side and done is for client side so tried var client = new WindowsAzure.MobileServiceClient('https://mydemo.azure-mobile.net/', 'xxxxxxxxxxxxRxxxxxxxxxxxxxxxxxxxxx'); usersTable = client.getTable("myTable"); usersTable.where({ user_id: user_id1 }) .read() .done( function (results) { console.log("results: " + results) try { console.log("exists") } catch(err) { console.log("doesnt exist yet") } } ); BUT this still wont work, nothing gets logged to the console, I am using visual studio and dont even know if it is sending the request?
tagged with: visual-studio-2013
type: UnansweredQuestion
tagged with: azure-mobile-services
has title: Mobile Services Client gettable('mytable').read() methods not returning anything
linked to: http://stackoverflow.com/q/19392849
type: Question
tagged with: winjs
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39051476
score: 0
comment on: http://stackoverflow.com/q/25096125
type: QuestionComment
type: Comment
has text: No errors. Nothing in the console, I am going to try without the warning.

http://stackoverflow.com/q/25094498
has comment: http://stackoverflow.com/comment/39048157
answer count: 2
score: 3
downvote count: 0
has body: I have a piece of JavaScript which I use to search my site. When you type into the search it pulls up the products matching you query. This works fine, but I want the dropdown to close when the user clicks on the page. I know very little about JavaScript so any advice or even a point in the right direction will be appreciated. function showSmartSearch() { $.ajax({ url: "index.php?route=product/ajaxsearch&amp;search=" + $("input[name='search']").val(), type: "GET", success: function(e) { $("#smartsearchdiv").css("display", "block"); var t = ""; $("#smartsearchdiv").html(e) } }) } function hideSmartSearch() { $("#smartsearchdiv").css("display", "none") } var wait; $(document).ready(function() { $("input[name='search']").after('&lt;div id="smartsearchdiv" style="margin-top:30px;background:white;width:230px;position:absolute;z-index:999;"&gt;&lt;/div&gt;').blur(function() {}).keydown(function(e) { if ($("input[name='search']").length &amp;&amp; e.which == 38) { e.preventDefault(); return false } }).keyup(function(e) { if (!$("input[name='search']").val()) { $("#smartsearchdiv").css("display", "none") } var t = $("input[name='search']").val(); var n = t.length; if (t.replace(/^\s+|\s+$/g, "") &amp;&amp; (e.which == 8 || 47 &lt; e.which &amp;&amp; e.which &lt; 112 || e.which &gt; 185)) { if (n &gt; 0) { showSmartSearch() } else { hideSmartSearch() } } if ($("#smartsearchdiv li").length &amp;&amp; (e.which == 38 || e.which == 40)) {} }).blur(function() {}) }); function hideSmartSearch() { $("#smartsearchdiv").css("display", "none"); }
tagged with: jquery
favorite count: 0
has title: Javascript not closing menu
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25094577
upvote count: 3
possible better answer: http://stackoverflow.com/a/25094561
linked to: http://stackoverflow.com/q/152975
has answer: http://stackoverflow.com/a/25094561
accepted answer: http://stackoverflow.com/a/25094577
type: Question
tagged with: hidden
tagged with: javascript

http://stackoverflow.com/q/25228535
score: 0
answer count: 1
has body: I am developing a Worklight application in which i would like to add a progress bar with % value between request and response of a Worklight Adapter call. Can anyone please suggest whether there is either a built-in functionality or any other logic which i can use to show the percentage with progress bar?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25228667
has comment: http://stackoverflow.com/comment/40173483
has title: Progress Bar between worklight adapter calls
type: AnsweredQuestion
tagged with: worklight-adapters
type: Question
has answer: http://stackoverflow.com/a/25228667
tagged with: ibm-mobilefirst

http://stackoverflow.com/comment/39116004
has text: @runTarm I'm actually doing it all manually. I guess creating `template.js` should be no harder than creating `template.html` was, I just don't know how it should look like.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25130752

http://stackoverflow.com/q/25109556
downvote count: 0
type: UnansweredQuestion
has title: How can I disable hover state on mousedown or on dragstart?
tagged with: drag
tagged with: hover
score: 1
type: Question
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25187798
tagged with: javascript
has answer: http://stackoverflow.com/a/25109662
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/39077444
has comment: http://stackoverflow.com/comment/39076552
has body: I have a list of nodes (divs) that can be re-arranged via drag-and-drop. Sample code is listed below. Normally, I want to highlight the hovered node with one class (for simplicity, let's say blue background, ":hover" pseudo class), but when a node is dragged I want to highlight with a different class (red, "dragged" class). I'm having two problems with this: In dragstart() I apply "dragged" class to the node, but it doesn't take the effect immediately. I can change the background color by modifying style.backgroundColor directly, but I was hoping there's a more straightforward css solution to redraw a node after adding a class. Hover state gets messed up once I change the order of nodes. As you can see, if you drag node from top to bottom hovered state follows that node (masking "dragged" class), but if you drag from bottom to top hovered state jumps to the original index (index of the node that received mousedown) and now "dragged" class shows up. I tried various things but to no avail. As far as I can tell there's no way to remove or suspend :hover pseudo class, and I can't figure out if there's a way to force hover on a certain node (I tried simple things like setting focus to make the node active). The second problem is the real issue, but I would appreciate if anyone can comment on how to resolve both issues. Thanks in advance.

http://stackoverflow.com/comment/41727333
type: Comment
comment on: http://stackoverflow.com/a/25078587
has text: did this directive worked? if yes, can you please accept the answer?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39249422
score: 0
comment on: http://stackoverflow.com/q/25202669
type: QuestionComment
type: Comment
has text: So you mean when I extend this.options.ajax, it will stack the functions rather than overwrite them?

http://stackoverflow.com/a/25209010
score: 1
has comment: http://stackoverflow.com/comment/39261613
upvote count: 1
has comment: http://stackoverflow.com/comment/39261579
has body: Your JavaScript should end up looking like this in the source. var data = {"TopicName":"A","TopicUrl":"a"}; // &lt;== this is a javascript object literal assigned to the variable "data" var text, val; for (text in data) { val = data[text]; alert( 'text ' + text + ', val' + val); $('&lt;option/&gt;').val(val).text(text).appendTo($('#first_subcat_id')); } if you have some HTML like &lt;select id="first_subcat_id"&gt;&lt;/select&gt; If your var data = line isn't structured like that, then you have an issue somewhere in your PHP. If your PHP file was generating the entire document you could just embed the output from the json_encode into the JavaScript something like this. &lt;script type="text/javascript"&gt; var data = &lt;?= json_encode($fetch_child_topic, JSON_HEX_QUOT|JSON_HEX_TAG|JSON_HEX_AMP|JSON_HEX_APOS); ?&gt;; var text, val; for (text in data) { val = data[text]; alert( 'text ' + text + ', val' + val); $('&lt;option/&gt;').val(val).text(text).appendTo($('#first_subcat_id')); } &lt;/script&gt; I don't think fetchAll would return an Array in the format you've shown at the top of your example. It returns an Array of associative arrays so probably something more like Array ( [0] =&gt; Array ( [TopicName] =&gt; A [TopicUrl] =&gt; a ) ) You need to get rid of the outer array. So just do something like this... depending on what your actual output from the SQL query returns. $fetch_child_topic = $fetch_child_topic[0];
has comment: http://stackoverflow.com/comment/39261485
has comment: http://stackoverflow.com/comment/39261348
answers question: http://stackoverflow.com/q/25208755
has comment: http://stackoverflow.com/comment/39262361
downvote count: 0
has comment: http://stackoverflow.com/comment/39262176
type: Answer
has comment: http://stackoverflow.com/comment/39262471

http://stackoverflow.com/q/25147329
answer count: 1
has answer: http://stackoverflow.com/a/25147372
has comment: http://stackoverflow.com/comment/39146860
tagged with: javascript
has body: I'm trying to get the contents of a div and display them as the last li on a ul for a mobile menu. The markup for the content is generated with php so I can't simply append html. I have tried using sethtml and append without success. This is my attempt: $("#mobile-menu li").last().append($("#header-top-widget-area-2 div").innerHTML); Here is the markup generated with php that I need to display as the last li in mobile menu: Contact Us Blog
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39146866
score: -3
upvote count: 1
has title: getting div content and displaying it as the last "li" not working
type: Question
downvote count: 4

http://stackoverflow.com/comment/39242735
has text: Of course that the Url in Href will not access, because you have called Ajax. If you want to access with href attr , please use window.location.href = <href url>;
type: Comment
comment on: http://stackoverflow.com/a/25197655
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39172618
type: Comment
comment on: http://stackoverflow.com/a/25161167
has text: That URL shows `cbv3` so you must have deleted the underscore because in the answer I use `cbv_' + a` in the URL. If you don't want the underscore then remove it from the dynamic function as well on line 5.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39029452
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25084033
type: Comment
has text: this returns all the elements but it adds them, I want to replace the content of the div every time I click on another html element

http://stackoverflow.com/q/25204616
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39253823
has comment: http://stackoverflow.com/comment/39253338
has title: How to keep a button at the end of the table
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25205210
type: Question
has comment: http://stackoverflow.com/comment/39253164
has body: I am trying to keep the button appended at the end of the table. At the moment it works great as long as I don't click the 'X' of last : here's JSFiddle This is the function which appends the button: function del() { var last_tr = document.getElementsByTagName("tbody")[0].lastChild; if (last_tr.lastChild.children.length != 1) { var t = document.createElement("td"); t.innerHTML = " + "; last_tr.appendChild(t) } } Any guess what I am doing wrong?
has comment: http://stackoverflow.com/comment/39252837
has comment: http://stackoverflow.com/comment/39253577
tagged with: javascript
has comment: http://stackoverflow.com/comment/39253108
has answer: http://stackoverflow.com/a/25205193
tagged with: dom
answer count: 2
possible better answer: http://stackoverflow.com/a/25205193
accepted answer: http://stackoverflow.com/a/25205210
downvote count: 0

titanium
type: Tag
tag name: titanium
tags question: http://stackoverflow.com/q/25220568

http://stackoverflow.com/comment/39154221
has text: Marco, I mean every browser always invokes .permission-check handler BEFORE invoking that for .category-one for link?
comment on: http://stackoverflow.com/a/25151288
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39125906
type: QuestionComment
comment on: http://stackoverflow.com/q/25136413
score: 0
type: Comment
has text: Keep the first line, try removing the second script import i.e..

http://stackoverflow.com/comment/39630986
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25301279
type: Comment
has text: +1 Good job. This is the best answer. I updated the [fiddle](http://jsfiddle.net/TtTr8/2/) that I generated accordingly.

http://stackoverflow.com/a/58807040
has body: The current state of the Shadow DOM / CSS is that you can link to external stylesheets. More info at MDN: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM#Internal_versus_external_styles You could, then, have some sort of utility stylesheet (Tailwind or similar) that all of your components reference, so you don't duplicate CSS. In theory, that CSS file would get downloaded once, cached, and then the custom elements would each be able to use the classes in it (as long as they each link to it).
answers question: http://stackoverflow.com/q/25211111
downvote count: 0
score: 8
upvote count: 8
type: Answer

http://stackoverflow.com/comment/39213999
has text: you sure `this` there is the correct instance? I couldn't reproduce this bug even in my Developer Channel version.
comment on: http://stackoverflow.com/q/25181052
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25210653
answers question: http://stackoverflow.com/q/25206802
type: Answer
has body: $("form").submit(function(e) { e.preventDefault(); var $form = $(this); var serializedData = $form.serialize(); $.ajax({ url: "check.php", type: "post", data: { formData: serializedData }, datatype: "JSON", success: function(data) { return data; } }); }); So, to break it down. Stop the form submission with the preventDefault(). Get the form data and submit it to your validator script. The return value, I assume, is a boolean value. If it validated, it'll be true, or false. Return the value which will continue the form submission or end it. NB.: This is a horrible way to validate your forms. I'd be validating my forms on the server with the form submission, because javascript can be terribly easily monkeyed with. Everything from forcing a true response from the server to turning the submission event listener off.
score: 0

http://stackoverflow.com/q/25213964
tagged with: jquery
has title: mmenu not closing on link pages
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25215013
accepted answer: http://stackoverflow.com/a/25215013
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: I'm currently working on another mobile website which has the mmenu installed, all works fine as far as the scroll opens to show the menu, but all the menu items are external links. When I tap/click an external link the page will hyperlink to the page selected without closing the menu first. Is there anyway of making the menu close before loading the external links? Here is the code: Today Times Settings Log out Thanks in advance!!

http://stackoverflow.com/a/25110620
downvote count: 0
answers question: http://stackoverflow.com/q/25098066
upvote count: 31
has body: Just answer the question: could you please also show how RX solves the "callback hell problem" on that simple example? The magic is flatMap. We can write the following code in Rx for @hugomg's example: def getData() = Observable[X] getData().flatMap(x -&gt; Observable[Y]) .flatMap(y -&gt; Observable[Z]) .map(z -&gt; ...)... It's like you are writing some synchronous FP codes, but actually you can make them asynchronous by Scheduler.
type: Answer
score: 31

http://stackoverflow.com/comment/39258577
type: AnswerComment
comment on: http://stackoverflow.com/a/25207488
has text: Also worked like a charm in the bigger picture. I feel smart for getting so damn close, and even smarter for taking the time to ask a question, and provide simplified code. 12 hours into my work day, this was a lifesaver :)
type: Comment
score: 1

http://stackoverflow.com/comment/39119335
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25123006
type: Comment
has text: OK, I'm glad I was able to help promptly with the original issue - please don't forget to upvote and "mark as answer" as I resolved that part. Moving on to the completely different issue of why Flash won't work for you, can you now provide a complete page using jplayer 2.6.4. I'm not having any issues - I've cloned your fiddle to be solution: "flash,html", and also set IE dev tools to be IE7, and it both cases the inspector shows "jPlayer's flash solution is being used and will support: mp3" and it plays fine for me - Chrome, IE and Firefox, all in "flash" mode.

http://stackoverflow.com/comment/39180000
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25165210
type: AnswerComment
has text: .inputButton[disabled] should support IE 8.

http://stackoverflow.com/a/25152996
answers question: http://stackoverflow.com/q/25152981
upvote count: 2
has body: This $('.item', '.wrapper').addClass('active'); would be internally translated as $('.wrapper').find('.item').addClass('active');. So i am sure that there is no difference between them. //HANDLE: $(expr, context) //(which is just equivalent to: $(context).find(expr) I just found the above comments in the jquery source
has comment: http://stackoverflow.com/comment/39157013
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25152981
score: 2

http://stackoverflow.com/a/25084040
type: Answer
has comment: http://stackoverflow.com/comment/39028801
accepted answer of: http://stackoverflow.com/q/25083772
score: 1
has comment: http://stackoverflow.com/comment/39029610
has comment: http://stackoverflow.com/comment/39029278
answers question: http://stackoverflow.com/q/25083772
upvote count: 1
has comment: http://stackoverflow.com/comment/39029081
has body: This is how to do it: $('.accessBox').filter(function() { return $(this).find("li:contains('1')").length === 0; }).hide(); Concept Verification Demo
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39028695
has comment: http://stackoverflow.com/comment/39029180

http://stackoverflow.com/q/25204942
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25205019
has comment: http://stackoverflow.com/comment/39253748
has title: use sleep or update javascript
answer count: 1
favorite count: 0
downvote count: 1
has answer: http://stackoverflow.com/a/25205019
type: AnsweredQuestion
has body: I am new to javascript and jquery, just finished a tutorial. $('form').keydown(function (key) { key = parseInt(key.which, 10); var toAdd = $('input[name=type]').val(); var s = $('.text p').text(); if (key !== 8) { s = s.substring(0, toAdd.length); alert(s); alert(toAdd); if (toAdd === s) { $('.img').animate({ left: '+=25px' }, 5); } this is part of the code im trying to execute. but when i insert text into the textbox, the first letter is not assigned into toAdd. when i put the line between second and third line it work's just fine: alert("something"); do i need to use a function that wait's a bit or something? i hope i was understandable.. thank you
score: -1
type: Question
has comment: http://stackoverflow.com/comment/39253573
upvote count: 0

http://stackoverflow.com/a/25115447
has body: read_com0 is an object Try this: console.log(node) console.log(node["read_cam0"]["x"])
downvote count: 3
has comment: http://stackoverflow.com/comment/39121484
has comment: http://stackoverflow.com/comment/39126037
score: -3
type: Answer
answers question: http://stackoverflow.com/q/25115233
upvote count: 0

http://stackoverflow.com/comment/39419135
score: 0
comment on: http://stackoverflow.com/a/25193305
type: AnswerComment
type: Comment
has text: I'll give this a try and let you know what what happens

http://stackoverflow.com/q/25217706
tagged with: javascript
has comment: http://stackoverflow.com/comment/39277760
has answer: http://stackoverflow.com/a/25218110
favorite count: 0
upvote count: 81
has answer: http://stackoverflow.com/a/25217790
has answer: http://stackoverflow.com/a/45489050
has title: Converting Object to Array using ES6 features
possible better answer: http://stackoverflow.com/a/25218110
has answer: http://stackoverflow.com/a/55007117
score: 81
has answer: http://stackoverflow.com/a/25217832
accepted answer: http://stackoverflow.com/a/45489050
answer count: 8
type: AnsweredQuestion
has body: Given a javascript object, how can I convert it to an array in ECMAScript-6 ? For example, given: var inputObj = {a:'foo', b:[1,2,3], c:null, z:55}; The expected output would be: ['foo', [1,2,3], null, 55] The order of the elements in the result is not important to me.
has comment: http://stackoverflow.com/comment/39279342
type: Question
tagged with: ecmascript-6
has answer: http://stackoverflow.com/a/63210139
has answer: http://stackoverflow.com/a/65855969
has answer: http://stackoverflow.com/a/25217707
has comment: http://stackoverflow.com/comment/99162206
has comment: http://stackoverflow.com/comment/39277844
tagged with: arrays
downvote count: 0
has comment: http://stackoverflow.com/comment/39277776

http://stackoverflow.com/comment/39099183
score: 0
type: AnswerComment
has text: Good answer, for a *better* validation, you could use `[\s-\.]*` (and other chars). Or yeah `\D*` like in your edit.
comment on: http://stackoverflow.com/a/25121849
type: Comment

http://stackoverflow.com/comment/39139492
comment on: http://stackoverflow.com/a/25143562
type: AnswerComment
has text: I [updated the fiddle with your exact html](http://jsfiddle.net/K6MD3/1/) and it appears to work. What isn't working about it?
score: 0
type: Comment

http://stackoverflow.com/comment/39025501
type: Comment
has text: yes I'm already using this, but I'm trying to store the whole HTML of the form (as a string for example), not only the values.
comment on: http://stackoverflow.com/a/25079772
score: 0
type: AnswerComment

http://stackoverflow.com/a/25185981
has body: Assuming you have a container div Then where you set up your jQGrid, you can just fetch your variable name with var myColumn = $('#jq-grid-container').data('my-column');
type: Answer
answers question: http://stackoverflow.com/q/25185610
score: 0

http://stackoverflow.com/a/48765655
answers question: http://stackoverflow.com/q/25170515
score: 0
has body: The problem in selecting current date when using minDate : moment(). Solution: try using like below: $('#datetimepicker6').datetimepicker({ format: 'DD/MM/YYYY', minDate: moment().millisecond(0).second(0).minute(0).hour(0), clear : false });
type: Answer

http://stackoverflow.com/a/25077105
has body: The problem here is that JavaScript does not support associative arrays (scroll down to "Associative arrays, no way!"). It has some internal workarounds which make it appear as if it does, but really all it does is just adding the keys as properties. So you would most likely be able to access it using Productdata.someid = .... EDIT: So assuming you have the following JSON string: {"id":"123"} (which is valid JSON), you can use it like this: var jsonString = '{"id":"123"}'; var parsedJSON = $.parseJSON(jsonString); var productID = "product_" + parsedJSON.id; Does this help? Some useful links: JSON format checker to make sure the JSON is valid. Unfortunately I wasn't allowed to add more than 2 links, so the jQuery parseJSON function link is still in the comment below.
has comment: http://stackoverflow.com/comment/39091698
score: 0
has comment: http://stackoverflow.com/comment/39018379
has comment: http://stackoverflow.com/comment/39016046
type: Answer
has comment: http://stackoverflow.com/comment/39170861
answers question: http://stackoverflow.com/q/25076996

http://stackoverflow.com/comment/39276782
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25216924
has text: If you notice, I want to store all values taken from `option` tag to an array. Then make again a new array to store the filtered duplicate value. And for final step is to append a textbox that has a value of those three. And I think I can do that. If the last problem will be solve.

http://stackoverflow.com/comment/39109645
has text: So you've left out the ticks between 31.5 and 32.1 because you don't want any text there to make room for the axis title "Work Weeks". But now there aren't any vertical lines either and you do want those. Have I understood this correctly?
comment on: http://stackoverflow.com/q/25126621
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25141308
downvote count: 0
has comment: http://stackoverflow.com/comment/39135340
tagged with: javascript
duplicate of: http://stackoverflow.com/q/21562973
has comment: http://stackoverflow.com/comment/39135683
score: 4
has comment: http://stackoverflow.com/comment/39135614
tagged with: scope
has answer: http://stackoverflow.com/a/26591556
has body: Is there a way to import all methods into scope without the necessity of a qualifier? Other languages (like Elm) allow this. The ES6 spec allows: import {map, where} from 'underscore'; //unqualified imports by name only import * as _ from 'underscore'; //with qualifier but not this: import * from 'underscore';
has comment: http://stackoverflow.com/comment/39135909
has comment: http://stackoverflow.com/comment/39135790
has comment: http://stackoverflow.com/comment/39135742
has title: EcmaScript: Import all methods into local scope
possible better answer: http://stackoverflow.com/a/25145268
favorite count: 0
has answer: http://stackoverflow.com/a/25145268
has comment: http://stackoverflow.com/comment/39135637
has comment: http://stackoverflow.com/comment/39135834
tagged with: module
tagged with: namespaces
accepted answer: http://stackoverflow.com/a/26591556
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39135396
duplicate of: http://stackoverflow.com/q/35554526
has comment: http://stackoverflow.com/comment/39135714
type: Question
upvote count: 4
linked to: http://stackoverflow.com/q/21562973
answer count: 2

http://stackoverflow.com/q/25112718
has answer: http://stackoverflow.com/a/25112793
upvote count: 3
has comment: http://stackoverflow.com/comment/39083489
has body: Sorry I'm kind of new to JS; I have an array of object; how can I get the name of the object which has the key "user_key3" and obviously without having a loop and have a condition. arr = [{ "name": "user1", "key": "user_key1" },{ "name": "user3", "key": "user_key3" },{ "name": "user2", "key": "user_key2" }] Please let me know if you need more clarification Thanks
type: Question
accepted answer: http://stackoverflow.com/a/25112808
tagged with: object
score: 3
possible better answer: http://stackoverflow.com/a/25112738
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/25112738
has answer: http://stackoverflow.com/a/25112854
has answer: http://stackoverflow.com/a/25112889
has answer: http://stackoverflow.com/a/25112917
has title: Get an object in array by one of its fields
has answer: http://stackoverflow.com/a/25112831
downvote count: 0
answer count: 7
favorite count: 0
has answer: http://stackoverflow.com/a/25112808
type: AnsweredQuestion

http://stackoverflow.com/comment/39286041
type: AnswerComment
has text: I think it functions alright but it gives errors. Which is probably why it doesnt auto play when scrolled into view again `Uncaught TypeError: Cannot read property 'playVideo' of undefined Uncaught TypeError: undefined is not a function`
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25171444

http://stackoverflow.com/q/25220565
type: Question
has body: I want to create my own markdown system for my platform. So, to allow users to make their text bold, they can wrap text in double asterisks. Here is how I do this: The following will be bold: **I am bold** jQuery: function markdown(markdownable) { var bold = /\*\*(\S(.*?\S)?)\*\*/gm; markdownable = markdownable.replace( bold, '$1' ); return markdownable; } $('.content').each(function() { var markdownable = $(this).html(), content = markdown(markdownable); $(this).html(content); }); Here is a working fiddle. Now, to my question. Whenever users add a > at the beginning of a paragraph, like this: > Hello world, this can be a very lengthy paragraph. Then I want to wrap that text into . How can I do this?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25220683
accepted answer: http://stackoverflow.com/a/25220683
has title: jQuery custom markdown for a blockquote
has comment: http://stackoverflow.com/comment/39283084
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
tagged with: markup

http://stackoverflow.com/q/25150634
has comment: http://stackoverflow.com/comment/39152879
has body: I need to do long list of "if-statement" in javascript, about 700. Is it possible to do without making each condition like list below of three conditions. I need to change value of variable minutes adding "15" and make variable adding every "15". Don't ask me why I have to make so much if-statements. I just wonder if I can do it without making every "value of 15" "if-statement". if (minutes == 124415999040) { var a; a= "480"; }; //first if (minutes == 124415999055) { var a; a= "495"; }; //second if (minutes == 124415999070) { var a; a= "510"; }; //third and so on up to 700...
type: Question
tagged with: if-statement
has title: How to automatically make if condition javascript
tagged with: javascript
has comment: http://stackoverflow.com/comment/39152994
has answer: http://stackoverflow.com/a/25150885
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39152869
type: UnansweredQuestion

http://stackoverflow.com/q/25152821
has comment: http://stackoverflow.com/comment/39156877
has answer: http://stackoverflow.com/a/26505234
has title: Insert data in mongoDB database from node.js
type: Question
tagged with: mongodb
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39157006
score: 0
has body: Context: Want to insert data in mongoDB database from node.js Problem Statement: I am trying to insert data in the mongoDB database but thrown an error. Cant find it. Present Output: Reference error Attach Code: filter.js var server = require('http'), express = require('express'), http = require('http'), fs = require('fs'); filter = express(), io = require('socket.io'), mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/filter_CheckBoxSchema', function(err){ if(err){ console.log(err); } else{ console.log('Connected to mongodb!'); } }); http.createServer(function(request, response) { response.writeHeader(200, {"Content-Type": "text/html"}); response.write(html); response.end(); }).listen(8000); var filter_CheckBoxSchema = mongoose.Schema({ name: String, type: Boolean, created: {type: Date, default: Date.now} }); var Filter = mongoose.model('Store', filter_CheckBoxSchema); fs.readFile('./index.html', function (err, html) { if (err) { throw err; } new Filter({ name: request.body.name, type: request.body.gender, }).save(function(err, doc){ if(err) { throw err; } else response.send('Successfully inserted!!!'); }); }); index.html Please enter your details Please enter your details Please register below!!! Name: Gender: Male Female Interest: (Check all that apply) Breakfast Lunch Evening Snacks Dinner Output: C:\node\people discovery app>node filter.js Connected to mongodb! C:\node\people discovery app\filter.js:152 name: request.body.name, ^ ReferenceError: request is not defined at C:\node\people discovery app\filter.js:152:9 at fs.js:271:14 at Object.oncomplete (fs.js:107:15)
tagged with: node.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39194509

http://stackoverflow.com/comment/39124948
has text: use `$(this).index();` in the `click event (note zero based)
comment on: http://stackoverflow.com/q/25135872
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25179661
type: Answer
answers question: http://stackoverflow.com/q/25179270
has body: You can't put code in that place,you can use the method like @name3anad said. if you want to show code in screen you can use &lt;code&gt; or &lt;pre&gt; if you want to bind event in div , you should write it in &lt;script&gt; : &lt;script type="text/javascript"&gt; function d(a, d, f, g, h, l, q) { m(d, g); var t = null, u = document.getElementById('Stage_Ellipse'); //change this d.tag &amp;&amp; (u = d.tag); switch (d.t) { case "rect": case "ellipse": case "canvas": case "group": t = s(u, a, d, f, h, l,g, q); } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39206461
score: 0

http://stackoverflow.com/comment/39205246
score: 0
type: Comment
type: QuestionComment
has text: You button is a submit. `preventDefault()` needs to be added. Alternatively you can use ` ` or change the ` ` type to _BUTTON_.
comment on: http://stackoverflow.com/q/25178693

infinite-scroll
tag name: infinite-scroll
tags question: http://stackoverflow.com/q/25073587
type: Tag
tags question: http://stackoverflow.com/q/25229358
tags question: http://stackoverflow.com/q/25103838
tags question: http://stackoverflow.com/q/25145924
tags question: http://stackoverflow.com/q/25133909
tags question: http://stackoverflow.com/q/25147884

http://stackoverflow.com/q/25141160
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25141750
answer count: 1
has title: Angularjs can't get eggheadio $http example to work
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39134887
accepted answer: http://stackoverflow.com/a/25141750
has body: I am trying to follow the tutorial at the following https://egghead.io/lessons/angularjs-http The error I get is TypeError: Cannot read property '1' of null I have the following directory structure: expressproject/ index.js angularproject/ app.js index.html My index.js file looks like the following: var express = require('express'); var http = require('http'); var cors = require('cors'); var app = express(); app.use(express.bodyParser()); app.use(cors()); app.set('port', 3000); app.get('/users', function (req, res) { res.send({hello: 'World'}) }) http.createServer(app).listen(app.get('port'), function() { console.log('Express server listening on port ' + app.get('port')); }); My app.js file looks like: var app = angular.module("app", []); app.controller("AppCtrl", function($http) { $http.get('http://localhost:3000/users') .success(function(data) { console.log(data) }) }) My index.html file looks like: Http test When I run the express server and point my web browser at (http://localhost:3000/users) I get: { "hello": "World" } which is what I would expect. I have tried running the angularjs part with the python SimpleHTTPServer and without any server and I still get the same error.
has comment: http://stackoverflow.com/comment/39134955

http://stackoverflow.com/comment/39131583
has text: try `d.resolve()` / `d.reject()` instead of `d.notify()`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25139302
score: 0

http://stackoverflow.com/q/25206102
downvote count: 0
has body: Hi I am using Marketo's forms 2.0 api to try and build a sequential form on our site(I want to break up a large form into 2 sections). We also wan to be able to track abandonment rates when users click "next" to load the part 2 of the form. So I was trying to have the other form load when the first one is submitted. Has anyone done this before? Or have a better way of doing this. This is my code so far. &lt;script src="//app-sjp.marketo.com/js/forms2/js/forms2.js"&gt;&lt;/script&gt; &lt;form id="mktoForm_333"&gt;&lt;/form&gt; &lt;script&gt; MktoForms2.loadForm("//app-sjp.marketo.com", "466-AGZ-592", 333, function(form) { form.onSuccess(function(callback) { form.getFormElem().hide(); MktoForms2.loadForm("//app-sjp.marketo.com", "466-AGZ-592", 334, function(forms) { form.getFormElem().show(); }); }); }); &lt;/script&gt; Any advice would be greatly appreciated. Thanks -John
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 1
has answer: http://stackoverflow.com/a/26748231
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: marketo
tagged with: forms
type: Question
has title: How to load a different Marketo form inside another form object?

http://stackoverflow.com/q/25166287
score: 0
has comment: http://stackoverflow.com/comment/39189397
tagged with: http://stackoverflow.com/tag/html
answer count: 0
type: UnansweredQuestion
tagged with: jakarta-ee
linked to: http://stackoverflow.com/q/8404464
has comment: http://stackoverflow.com/comment/39197375
has body: I am facing very strange problem when i am creating server socket event connection with java application deployed on tomcat .After making 6 server socket connection .it is not able to make new connection even when i am request simple url from ajax or from new tab it is not hitting application .I have checked through proxy tolls even request is not genearted from browser .if the same url i request from some other browser then request got submitted and response comes . This means issue is at browser side not application side . I have checked with both mozila and google chrome but still no success . Is there any kind of restriction with HTML 5 server socket Event .I am using following code eventSource.addEventListener('trigger', function(event){ var data=event.data; var oFormB = document.getElementById('a'+tabId); var audioEnable; var sound; if(oFormB!=null&amp;&amp;data.charAt(data.length-1)=='b'){ audioEnable=oFormB.elements.audibleAlarm[0].checked; if(audioEnable!=null&amp;&amp;audioEnable==true){ sound = new Howl({ urls: ['js/sounds.mp3'],buffer:false}).play(); //sound.stop(); }else{ // alert(" Alarm Id:"+event.data+" Triggered.Tabs Id: "+tabId); } alert(" Alarm Id:"+event.data+" Triggered. Tabs Id: "+tabId); if(sound!=null){ sound.stop(); } } Any help would be really appreciated
has title: After 6 Serversocket event connection with same application futher ajax request is not getting sumitted
tagged with: java
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39101065
comment on: http://stackoverflow.com/a/25110938
has text: @TimoRütten just updated to the latest Iron-Router which deprecates load in favour of onRun. It will run on a param change or page refresh but not on HCR.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25154171
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25153224
answers question: http://stackoverflow.com/q/25153224
score: 0
type: Answer
has body: Use Bootstrap CSS and JS styling framework. You can download it from here. Refer the files and folder structure. Now you can copy bootstrap.css and bootstrap-theme.css, then paste it in your project like Myproject CSS bootstrap.css bootstrap-theme.css JS bootstrap.js demo.html Now this your moderated demo.html External Form Please fill out my form.

http://stackoverflow.com/comment/58233822
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25144357
has text: This works, but you missed out 1 vital bit. When creating the pushpin (aka marker), you need to give it a typeName, e.g. 'pub' in this example `new Microsoft.Maps.Location( lat, lon, { ... typeName: 'pub' }` This is what `e.target.getTypeName()` returns, and what `$( '.pub')` works on.

http://stackoverflow.com/a/46561906
downvote count: 0
type: Answer
upvote count: 1
has body: You can use .detach() according to JQuery: The .detach() method is the same as .remove(), except that .detach() keeps >all jQuery data associated with the removed elements. This method is >useful when removed elements are to be reinserted into the DOM at a later time. var div = $("div").detach(); $(div).appendTo("body");
score: 1
answers question: http://stackoverflow.com/q/25121168

http://stackoverflow.com/a/25124444
type: Answer
has comment: http://stackoverflow.com/comment/39104077
score: 1
has comment: http://stackoverflow.com/comment/39104248
has comment: http://stackoverflow.com/comment/39104155
downvote count: 1
answers question: http://stackoverflow.com/q/25124392
has body: Look for a library that provides some functional style methods. You can use Underscore.js with reduce to do just this. var sum = _.reduce(arrInductedInfo, function(memo, item){ return memo + (item.isSaved ? 1 : 0); }, 0);
upvote count: 2

http://stackoverflow.com/q/25093551
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25093715
type: Question
has title: How do I use setInterval with my form to create an alarm clock?
score: 1
accepted answer: http://stackoverflow.com/a/25094002
favorite count: 0
has answer: http://stackoverflow.com/a/25093899
upvote count: 1
has body: I'm currently trying to learn JavaScript and I've decided to make things more interesting by actually creating something instead of endless reading &amp; no practice. I'm currently trying to build an alarm clock. Here's my code: http://codepen.io/anon/pen/dCsax function wakeup() { window.location = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } I need to create another function that uses setInterval to check every few seconds if the time set in that form is equal to the current time, and if it is, execute the wakeup function that plays Rick Astley - Never Gonna Give You Up. I don't know how to write this piece of code. Could someone please help me out so I can see how it's done? Thanks in advance.
answer count: 3
has answer: http://stackoverflow.com/a/25093715
has answer: http://stackoverflow.com/a/25094002
type: AnsweredQuestion

http://stackoverflow.com/q/25110856
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39098108
linked to: http://stackoverflow.com/q/14890681
tagged with: javascript
score: 4
linked to: http://stackoverflow.com/q/14508707
has title: Replacing dumb quotes with smart quotes and keeping caret position in contenteditable div
has body: I'm trying to turn some dumb quotes into curly quotes on the fly in a contenteditable div (as seen here), using the following: $("#editor").on("keyup", ".content", function () { $(".content").html(function() { var start = this.selectionStart, end = this.selectionEnd; return $(this).html() .replace(/'\b/g, "\u2018") // opening single .replace(/\b'/g, "\u2019") // closing single .replace(/"\b/g, "\u201c") // opening double .replace(/\b"/g, "\u201d") // closing double .replace(/--/g, "\u2014") // em-dash .replace(/\b\u2018\b/g, "'"); // handle conjunctions this.setSelectionRange(start, end); }); // other stuff happens here... }); The return bit works fine on its own, but moves the caret position back to the start of the dive after every keystroke, which is obviously not desirable. But trying to keep the caret position (using some code seen here) throws Unreachable 'this' after 'return' in JSHint and so doesn't actually do anything in the browser. Can someone point me in the right direction here, please?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39079053
tagged with: jquery
has comment: http://stackoverflow.com/comment/39140539
has comment: http://stackoverflow.com/comment/39081840
has comment: http://stackoverflow.com/comment/39122701
favorite count: 0
upvote count: 4
has answer: http://stackoverflow.com/a/25135979
accepted answer: http://stackoverflow.com/a/25135979

http://stackoverflow.com/comment/39123803
comment on: http://stackoverflow.com/a/25134908
type: AnswerComment
has text: Then you need to post more code, so we can see what you're actually doing that's causing the problem. And I don't believe you when you say that you got the error with an empty loop body.
type: Comment
score: 1

http://stackoverflow.com/a/25128617
answers question: http://stackoverflow.com/q/25083992
type: Answer
score: 2
upvote count: 2
has body: Ok I looked deeply into this and found out it was a very slight thing. dataType in EngineProperties should be 1 which is Ci.nsISearchEngine.DATA_XML you were using 3 which is for Ci.nsISearchEngine.TYPE_OPENSEARCH. Yeah I know yours is an opensearch xml file but its xml so use use 1. In the XML change &lt;URL to &lt;Url notice the lower case r and l. weird. anyways you can install this addon here it installs your search engine: https://github.com/yajd/PortableTester/tree/a9ed2432cf4fab4362b71d2c805d97caac2cd237 Use https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/ addon to install straight from repo. LASTLY for I don't know what reason, but callback never calls after addEngine, it's so weird I have no idea how to get that to work :( Also I'm not sure if the security error if not chrome path is true, not sure but it might be in other cases, but maybe not here. You should be able to do localhost or or local file paths like file:///C:/blah.xml
downvote count: 0

http://stackoverflow.com/a/25191633
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25191594
answers question: http://stackoverflow.com/q/25191594
type: Answer
score: 2
upvote count: 2
has body: Use || to specify a default value when extracting the property. var job = person.job || "Unemployed"; However, this has to be done in every place where you get the job. If you don't want to have to repeat it all over the place, you need to use a function or prototype.

http://stackoverflow.com/q/25180890
tagged with: firefox
tagged with: intern
tagged with: javascript
upvote count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25383707
has title: Dojo intern set firefox profile name
downvote count: 0
has answer: http://stackoverflow.com/a/26635283
score: 1
tagged with: selenium
type: Question
answer count: 2
tagged with: testing
has body: Hi Iam trying to set firefox profile name in environment settings of intern config file.I have tried environments: [ { browserName: 'firefox',firefox_profile:'default' }, {firefox_profile:'default'} ], and environments: [ { browserName: 'firefox',profile:'default' }, {profile:'default'} ], as well as capabilities: { 'selenium-version': '2.42.0', firefox_profile:'default' }, as mentioned in Selenium capabilities But still firefox launches with an anonymous profile. However if I use watir, def setup @browser = Watir::Browser.new :firefox, :profile =&gt; 'default' goto_ecp_console_manage_page end browser launches the default profile which is 'kinit-ed'(kerberos)

http://stackoverflow.com/comment/39152729
score: 0
type: Comment
type: QuestionComment
has text: Where you store selected value – from where AngularJS should to know what is the selected option?
comment on: http://stackoverflow.com/q/25150341

http://stackoverflow.com/a/25212436
has comment: http://stackoverflow.com/comment/39271744
answers question: http://stackoverflow.com/q/25212283
accepted answer of: http://stackoverflow.com/q/25212283
upvote count: 8
type: AcceptedAnswer
type: Answer
score: 8
downvote count: 0
has body: If you want "service 1" to appear at the top, and then the rest to follow clockwise (i.e. just like the hands on a clock) then the basic math you need is this: First - figure out how many elements there are: var count = $('#myList &gt; li').length; Then each element i from 0 .. count - 1 would need to be positioned at an angle theta: var theta = 2 * Math.PI * (i / count); 2*pi radians split into "count" sections giving coordinates: var left = horizontalCenter + radius * Math.sin(theta); var top = verticalCenter - radius * Math.cos(theta); Do bear in mind that this just sets the top-left corner of the element - further tweaking may be required to calculate the position of the center of the element. NB: this is different to the standard cartesian convention of angles being calculated anti-clockwise relative to the positive X axis, hence why the sin and cos terms are swapped and the top having a subtraction instead of an addition to account for the way Y coordinates start at zero at the top of the page. See http://jsfiddle.net/alnitak/ah1k1mo3/

http://stackoverflow.com/comment/39139750
type: Comment
comment on: http://stackoverflow.com/a/25126214
has text: Then why did you post it as an answer?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39003472
score: 0
type: AnswerComment
has text: I just copypasted OP's code, I am not sure what val.title is... Could it be that he actually meant data.title?
type: Comment
comment on: http://stackoverflow.com/a/25070455

http://stackoverflow.com/a/25106244
score: 0
type: Answer
has body: If you want the server to push the information back to the client, Comet may be what are you looking for. Recent browsers support WebSockets, which enables the server to communicate with clients without the need for the client to make regular AJAX requests. Older browsers don't support WebSockets, so if you need to support them, you may be interested in frameworks which allow to fallback to more basic techniques, such as long polling on those browsers. Note that there are libraries which make it really easy (well, some don't) to integrate WebSockets or Comet in your web application, so don't reinvent the wheel and stick with the one which is available in the PHP framework you use right now. For example, if it's Laravel, a simple Google search leads me to BrainSocket, "a Laravel package that allows you to get up and running with real-time event-driven PHP apps using WebSockets." In all cases, you're not expected to use sockets (unless by sockets, you mean WebSockets in your question).
accepted answer of: http://stackoverflow.com/q/25106198
answers question: http://stackoverflow.com/q/25106198
type: AcceptedAnswer

wifi
tag name: wifi
type: Tag
tags question: http://stackoverflow.com/q/25169644

http://stackoverflow.com/q/25202402
accepted answer: http://stackoverflow.com/a/25208092
tagged with: javascript
score: 0
has title: How to call webservice from ember
tagged with: ember.js
has body: How can i produce web service call from ember. now I'm using simple web api which returns json data, but need to connect web service, which is working with xml file
tagged with: web-services
has comment: http://stackoverflow.com/comment/39248451
has comment: http://stackoverflow.com/comment/39249055
type: AnsweredQuestion
type: Question
linked to: http://stackoverflow.com/q/25203749
has answer: http://stackoverflow.com/a/25208092
answer count: 1

http://stackoverflow.com/q/25170939
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25171004
has answer: http://stackoverflow.com/a/25171004
has answer: http://stackoverflow.com/a/25171234
score: 4
type: AnsweredQuestion
type: Question
upvote count: 4
has body: In my AngularJS app, I am looping through an array object and send the value to a radio input as value. The overall idea is that the user selects a radio box and the value with be back part of $routeParams. Unfortunately, the variable {{ modelSelected }} does not seemed to be available outside of the ng-repeat. Why? The first never shows the variable {{ modelSelected }}. Does AngularJS creates a ScopeChild within the ng-repeat? Link to my jsfiddle example Selected {{ modelSelected }} shown outside paragraph {{ model.name }} - Selected {{ modelSelected }} shown inside paragraph
tagged with: angular-ngmodel
tagged with: javascript
has title: AngularJS: Make ng-model available outside of ng-repeat
accepted answer: http://stackoverflow.com/a/25171234
has answer: http://stackoverflow.com/a/25171063
answer count: 3
downvote count: 0
tagged with: angularjs-ng-repeat

http://stackoverflow.com/a/25209444
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39261982
answers question: http://stackoverflow.com/q/25209391
accepted answer of: http://stackoverflow.com/q/25209391
has body: You can certainly prevent the default action of clicking and trigger the hover event instead, but I wouldn't recommend it due to accessibility and usability concerns. $('a').click(function(e) { e.preventDefault(); $(this).trigger('hover'); }); (Here I'm using a as the selector but you probably want to be way more specific as to which links you are selecting.) If the current hovering effect is done via CSS :hover pseudo-class, this will not have the desired outcome.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39062118
has text: You are using the `css` method as a getter not a setter, it tries to return the value of `{color: #900;margin-top:20px;}:hover {margin-top:0px;}` property, which of course doesn't exist. That's not even valid CSS.
comment on: http://stackoverflow.com/q/25101980
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39151507
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25149645
has text: That was left over from long ago. I updated the tag wiki.
score: 0

http://stackoverflow.com/comment/39253355
score: 0
comment on: http://stackoverflow.com/a/25174760
type: AnswerComment
type: Comment
has text: @ThE_-_BliZZarD There’s a link to the source code in my answer. Check it out – it should be fairly straightforward. The main loop, where it loops through the string and escapes each character as needed, is here: https://github.com/mathiasbynens/jsesc/blob/a4368cc02063500fedd3fbae99c8042a086a4e8b/jsesc.js#L161-L186

http://stackoverflow.com/comment/39130001
type: QuestionComment
has text: array + `indexOf`, or even a regex `x.match(/^[abcdexyx]$/)`
comment on: http://stackoverflow.com/q/25138645
score: 14
type: Comment

http://stackoverflow.com/a/56257420
downvote count: 3
has body: You need to add "hold-on-click" to "dropdown-menu" class
has comment: http://stackoverflow.com/comment/104572690
answers question: http://stackoverflow.com/q/25089297
score: -3
type: Answer
upvote count: 0

http://stackoverflow.com/a/25198099
has comment: http://stackoverflow.com/comment/39241305
has comment: http://stackoverflow.com/comment/39241391
type: Answer
accepted answer of: http://stackoverflow.com/q/25197581
score: 1
has body: I think the problem is that you are creating/opening the dialog before the HTML has properly been parsed. From the jQuery documentation: If a "complete" callback is provided, it is executed after post-processing and HTML insertion has been performed. So try changing this code: var cuentas = $("#cuentas").load("AdministracionCuentaEquipo.html").dialog({ stack:true, autoOpen:false, close:function(){ $(this).dialog("close"); } }); to: var cuentas = $("#cuentas").load("AdministracionCuentaEquipo.html", function(e) { $("#cuentas").dialog({ stack:true, autoOpen:false, close:function(){ $(this).dialog("close"); } }); EDIT: the line $("#accioncuentas").tabs(); might also fire too early, so you could change that script tag to wrap it in a function and call that function in your other code. Example: &lt;script type="text/javascript"&gt; function InitializeTabs() { $("#accioncuentas").tabs(); } &lt;/script&gt; and then add the line InitializeTabs(); to your code, for example above the line $("#cuentas").dialog({. SECOND EDIT: I actually think Dasarp is correct in saying that the $("#accioncuentas").tabs(); is the main problem. Either wrap it in a function as I suggested, or move the entire &lt;script&gt; tag down to the bottom of the file (below all your HTML).
upvote count: 1
has comment: http://stackoverflow.com/comment/39241618
has comment: http://stackoverflow.com/comment/39241174
answers question: http://stackoverflow.com/q/25197581
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25235395
has body: Callback function in animate(...) will be call after name(tab) in context which do not have access to scope of name(tab) function, but it have access to global scope. Try to put pressedTab(tab) outside $(document).ready(...) it should work.
type: Answer
has comment: http://stackoverflow.com/comment/39399174
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39438480
upvote count: 1
answers question: http://stackoverflow.com/q/25202856

http://stackoverflow.com/q/25115381
has answer: http://stackoverflow.com/a/25118626
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39086939
has comment: http://stackoverflow.com/comment/39086978
type: Question
possible better answer: http://stackoverflow.com/a/25118550
upvote count: 5
has answer: http://stackoverflow.com/a/25118550
accepted answer: http://stackoverflow.com/a/25118626
tagged with: javascript
has comment: http://stackoverflow.com/comment/39087524
answer count: 2
score: 5
has comment: http://stackoverflow.com/comment/39091942
downvote count: 0
has title: JavaScript: prevent unintentional creation of new property
has comment: http://stackoverflow.com/comment/39091417
favorite count: 0
has body: Typos happen, and sometimes it is really hard to track them down in JavaScript. Take this for example (imagine it in between some more code): // no error. I would like a warning document.getElementById('out').innerHtml = "foo"; For undeclared variables, strict mode helps: "use strict"; var myHTML = "foo"; myHtml = "bar"; // -&gt; error But it does not work for the example above. Is there a program or mode that can catch these bugs? I tried JSLint and JavaScript Lint, but they do not catch it. And ideally, I would like this to still work (without warning): // should work (without warning) function MyClass(arg) { this.myField = arg; }
tagged with: error-detection

http://stackoverflow.com/a/31576684
downvote count: 0
has comment: http://stackoverflow.com/comment/56567930
has comment: http://stackoverflow.com/comment/98904528
has body: Unfortunately the option firefox_profile.set_preference('permissions.default.image', 2) will no longer work to disable images with the latest version of Firefox - [for reason see Alecxe's answer to my question Can&#39;t turn off images in Selenium / Firefox ] The best solution i had was to use the firefox extension quickjava , which amongst other things can disable images- https://addons.mozilla.org/en-us/firefox/addon/quickjava/ My Python code: from selenium import webdriver firefox_profile = webdriver.FirefoxProfile() firefox_profile.add_extension(folder_xpi_file_saved_in + "\\quickjava-2.0.6-fx.xpi") firefox_profile.set_preference("thatoneguydotnet.QuickJava.curVersion", "2.0.6.1") ## Prevents loading the 'thank you for installing screen' firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.Images", 2) ## Turns images off firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.AnimatedImage", 2) ## Turns animated images off driver = webdriver.Firefox(firefox_profile) driver.get(web_address_desired) Other things can also be switched off by adding the lines: firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.CSS", 2) ## CSS firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.Cookies", 2) ## Cookies firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.Flash", 2) ## Flash firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.Java", 2) ## Java firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.JavaScript", 2) ## JavaScript firefox_profile.set_preference("thatoneguydotnet.QuickJava.startupStatus.Silverlight", 2) ## Silverlight
has comment: http://stackoverflow.com/comment/54488532
type: Answer
has comment: http://stackoverflow.com/comment/106528518
has comment: http://stackoverflow.com/comment/59749397
answers question: http://stackoverflow.com/q/25214473
score: 20
upvote count: 20

http://stackoverflow.com/a/25298548
answers question: http://stackoverflow.com/q/25205911
has body: ng-grid was not designed for nested grids: Or even dynamic height cell by cell If you look ng-grid's template ui-grid.html you see that the size is fixed in pixels: height: {{ grid.options.rowHeight }}px; see github This CSS class is embedded in the template, leaving no room to over-write to "auto". Since grids are built with Div's rather than Tables, tabular relationships between rows and columns is difficult if every cell-div is free to decide it's own behavior. So nested grids are quite the challenge. You CAN get the affect you want with a hack that resembles nested grids: see plnkr Collapsed Grid note: The caret's have been added to show that parent rows are expandable. I have'nt added logic to hide carets for parent rows that have no children. Expanded Grid see plnkr Alter your JSon to include a column for Test, Name, andd Score. Use columns for either Test names or Student Names/Scores. use parent id for children and give id's to parents: $scope.facdata = [{test: "Basic Physics Test", parentId:0,id:1,expanded:true}, {name: "NAME", Score: "SCORE",parentId:1,expanded:false}, {name: "John", Score: 77,parentId:1,expanded:false}, {name: "Jacob", Score: 66,parentId:1,expanded:false}, {name: "Jenny", Score: 94,parentId:1,expanded:false}, {test: "Advanced Physics Test",id:2, parentId:0,expanded:true}, {name: "NAME", Score: "SCORE",parentId:2,expanded:false}, {name: "Freddy", Score: 94,parentId:2,expanded:false}, {name: "Samantha", Score: 38,parentId:2,expanded:false}, {name: "Judy", Score: 100,parentId:2,expanded:false} ]; In Grid Options set rowTemplate to use ng-show directive on the children against the expanded field $scope.gridOptions = { data: 'facdata', columnDefs: [{field: 'id',displayName:'',width:20, cellTemplate:' '}, {field: 'test', displayName: ''}, {field: 'name', displayName:''}, {field:'Score', displayName:'', cellTemplate: ' {{row.getProperty(col.field)}} '}], rowTemplate:' ' + ' ' Add a ToggleSubReport function to manage showing the embedded data $sc…
type: Answer
has comment: http://stackoverflow.com/comment/39430418
accepted answer of: http://stackoverflow.com/q/25205911
has comment: http://stackoverflow.com/comment/39939955
has comment: http://stackoverflow.com/comment/39969164
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/39431080
has comment: http://stackoverflow.com/comment/39952209
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39430835
upvote count: 5

http://stackoverflow.com/comment/39175780
score: 1
type: AnswerComment
has text: Isn't this just an awesome candidate for a comment.
type: Comment
comment on: http://stackoverflow.com/a/25163091

http://stackoverflow.com/q/25130465
has comment: http://stackoverflow.com/comment/39115479
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39115486
type: Question
has answer: http://stackoverflow.com/a/25130574
tagged with: javascript
score: 0
has title: Why does $http.get not need to return anything?
answer count: 1
has body: I'm working on an angular app and I have a controller that is calling a service. The controller sends a Url to the service. The service sends a GET request to that Url and receives JSON back. In that JSON is a Uri for Http requests. I extract that Uri from the JSON and then redirect the browser to it. The JSON returned from the endpoint looks like this { "profile":"...", "releases_url":"http://...", "name":"...", ..., "uri":"http://the-value-i-want-to-return.com", ..., } Service Code // Resolves an API endpoint link to its Http counterpart function resolveJSONEndpointToHttpUrl(JSONEndpointUrl) { return $http({ method: 'GET', url: JSONEndpointUrl }). success(function (data, status, headers, config) { console.log("resolveJSONEndpointToHttpUrl : data"); console.log(data); //return data; }). error(function (data, status, headers, config) {}); } Controller Code function redirectViaJSONLink(url) { return musicCollectionService.resolveJSONEndpointToHttpUrl(url).then(function (data) { console.log("redirectViaJSONLink : data"); console.log(data); console.log("redirectViaJSONLink : data.data"); console.log(data.data); console.log("redirectViaJSONLink : data.data.uri"); console.log(data.data.uri); // Perform redirection // $window.location.href = data.uri; }); } As you can see I'm doing some logging to break down the JSON and figure out exactly what is being returned to me and how to access the properties of the returned object. My questions are: Why do I not need to return data; in my $http .success call? In what situations would I need to? Is there a way to return a specific property from the data object in the $http .success call so that I don't have to call data.data.uri in my Controller method? Or could I modify the returned JSON payload before it is returned to my Controller?
accepted answer: http://stackoverflow.com/a/25130574
tagged with: angularjs
tagged with: angular-promise

http://stackoverflow.com/q/25116137
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25117067
type: Question
answer count: 1
tagged with: javascript
score: 0
tagged with: facebook
has body: This is javascript code to create a share dialog for facebook. The share dialog is well opened but not my informations. FB.ui({ method: 'feed', name: 'blabla', caption: 'an example', message: 'my message', description: 'fdfdfd' }, function (response) { }); Can you help me ? Thank you
tagged with: facebook-javascript-sdk
has title: Facebook API - My informations for the share dialog don't print

http://stackoverflow.com/q/25190338
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25191437
tagged with: design-patterns
type: Question
tagged with: canvas
tagged with: javascript
has body: I need a canvas to be filled with another canvas as a pattern. I know I'm close, and I've found a few examples of this in use but I can't seem to replicate it for my purposes. EDIT: I applied a width to the 'hazards' canvas and it is repeating, but there's a lot of space between the patterns, now. CodePen updated to reflect this. Here's the result I need: Here's what I have so far: CodePen var canvas = document.getElementById("haz-pat"); var context = canvas.getContext("2d"); context.beginPath(); context.moveTo(0,0); context.lineTo(36, 0); context.lineTo(0, 36); context.closePath(); context.fill(); context.beginPath(); context.moveTo(72, 0); context.lineTo(72, 36); context.lineTo(0, 108); context.lineTo(0, 72); context.closePath(); context.fill(); context.beginPath(); context.moveTo(72, 72); context.lineTo(72, 108); context.lineTo(36, 144); context.lineTo(0, 144); context.closePath(); context.fill(); var canvas2 = document.getElementById("hazards"); var context2 = canvas2.getContext("2d"); var ptn = document.getElementById("haz-pat"); var haz_pattern = context2.createPattern(ptn, "repeat"); context2.fillStyle = haz_pattern; context2.fillRect(0, 0, canvas2.width, canvas2.height); context2.fill();
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Creating a canvas pattern using another canvas

http://stackoverflow.com/comment/39011641
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25075117
type: Comment
has text: Thanks for the reply Sander.I use version 5.1.7

http://stackoverflow.com/comment/39135033
has text: Seems kinda overkill using keyframes for a simple linear infinite slide?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25124399
type: AnswerComment

http://stackoverflow.com/a/25155169
has comment: http://stackoverflow.com/comment/39165428
score: 0
answers question: http://stackoverflow.com/q/25154580
type: Answer
has comment: http://stackoverflow.com/comment/39162090
has body: I think you need to have buttons separately, right: if the returned result is employee,travels then you need 2 buttons employee and travels, if so I would make one function which creates button with the name: &lt;script type="text/javascript"&gt; $('#but').click(function() { $.ajax({ type: "POST", url: "tab.php", data: {id: this.id}, success: function(result) { makeButtons(result); } }); }); function makeButtons(buttonsString) { // you can clear #show tag $('#show').html(''); var buttonsArray = buttonsString.split(','); for(var i = 0; i &lt; buttonsArray.length; i++) { makeButton(buttonsArray[i]); } } function makeButton(buttonName) { // you can also add some events atc.. // if u want clicking this button to do something $('#show').append('&lt;button&gt;' + buttonName + '&lt;/button&gt;'); } &lt;/script&gt;

http://stackoverflow.com/comment/39163934
type: QuestionComment
has text: Not simply (you could poll for the change with a timer). What is the intended use for this?
comment on: http://stackoverflow.com/q/25156842
score: 0
type: Comment

http://stackoverflow.com/comment/39122670
type: Comment
score: 0
type: AnswerComment
has text: Right, so in that case your `keydowntime` variable doesn't apply exclusively to "D" because it is also counting the original time from "A". Also right now your keyup fires any time a key is released, even if other keys are still down, so it would fire for "A" (also happens in your jsFiddle).
comment on: http://stackoverflow.com/a/25134401

http://stackoverflow.com/comment/39155723
comment on: http://stackoverflow.com/a/25133122
type: Comment
has text: sorry i don't know about servlet, but you try this code i am not sure it works for you. Your code is: $(".save").click(function() { $( document ).ajaxStart(function() { $("body").css("cursor", "wait"); }).ajaxComplete(function() { $("body").css("cursor", "default"); }); });
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39259420
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25207732
has text: It would be just `selections = menu.selectAll("options:checked")`, no?
score: 0

http://stackoverflow.com/comment/39297151
type: QuestionComment
comment on: http://stackoverflow.com/q/25228128
has text: I realized that. But what about the latter part of the question? Would we rather have one more posted question just to address that or reopen this?
score: 0
type: Comment

http://stackoverflow.com/a/25143731
answers question: http://stackoverflow.com/q/25125062
type: Answer
has body: I built a little example so you can see how to handle a tooltip on an element click event. I'm not quite familiar with the mentioned library but since the logic is similar, copy-paste the inner part of the snippet below within the given method map.addListener("clickMapObject", function (event) { // place the snippet below in here ... });` and give it a try. JavaScript. document.addEventListener('click', function(e) { e = e || window.event; var target = e.target || e.srcElement; if (target.className == 'killer') return false; var div = document.createElement('DIV'); div.className = 'tooltip'; div.innerHTML = 'This is a content within tooltip.'; var span = document.createElement('SPAN'); span.className = 'killer'; span.innerHTML = 'X'; span.onclick = function(){ document.body.removeChild(this.parentNode); }; div.appendChild(span); document.body.appendChild(div); div.style.left = e.clientX + document.body.scrollLeft + 'px'; div.style.top = e.clientY + document.body.scrollTop + 'px'; }, false); CSS .tooltip { background-color:#555; width:200px;height:50px; z-index:99999; position:absolute; } .killer { background-color:#fff; color:#555; cursor:pointer; } Here is a working jsBin so you may play around :)
score: 0

http://stackoverflow.com/q/25138735
score: 4
has title: Expand input field width smoothly on click
has answer: http://stackoverflow.com/a/25138785
answer count: 2
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
upvote count: 4
has answer: http://stackoverflow.com/a/25138804
tagged with: css
accepted answer: http://stackoverflow.com/a/25138804
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/25138785
type: Question
has body: I want to display an input field .search when clicking on .icon class. I have managed to do that with following code. However instead of show/hide, I want to display the input field by smoothly expanding its width. How that can be done? JSFiddle Demo: http://jsfiddle.net/9nPW9/ HTML: &lt;div class="box"&gt; &lt;input class="search" type="search" placeholder="Search" /&gt; &lt;div class="icon"&gt;&lt;/div&gt; &lt;/div&gt; CSS: .box{ position: relative; width: 220px; } .search { width: 200px; padding: 5px; -webkit-transition: all .5s ease; -moz-transition: all .5s ease; transition: all .5s ease; float: left; } .icon{ width: 20px; height: 20px; background: red; position: absolute; right: 0; } JS: $('.icon').click(function() { $('.search').toggle(); });
tagged with: javascript

http://stackoverflow.com/q/25167066
type: AnsweredQuestion
tagged with: shuffle
score: 1
has answer: http://stackoverflow.com/a/25167339
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25167910
tagged with: javascript
has body: My goal is to make a randomly generated 2D Array in Javascript, that has an X amount of the same one character value while the rest of the values are equal to another character. In this example, there are 10 rows and 10 columns for the 2D Array. 20 out of the possible 100 values of the Array should be equal to 'Y' (for yes) and the 80 others should be 'N' (for no). I want the 'Y's to be randomly placed all over the Array, and I absolute need exactly 20 of them to be 'Y's and the rest 'N's. I had a less efficient way before, and I thought to try this approach, where after I define the Array, I make the first X amount of values a 'Y' and then the rest all 'N's. Then I shuffle the array, (using the shuffle from the underscore library) so that the 'Y's are all spread out randomly everywhere. Is this an efficient way of getting what I need done? Are there any better solutions? I tried making a JSFiddle with my example, but the site appears to be down at the moment. (I was unable to test my code yet to see if the shuffle worked correctly on my 2D array) var rows = 10; var cols = 10; var elements = 20; //Define Empty Array var test = new Array(rows); for (var k = 0; k &lt; rows; k++) { test[k] = Array(cols); } var i = 1; for (var x = 0; x &lt; rows; x++) { for (var y = 0; y &lt; cols; y++) { if (i &lt;= elements) { test[x][y] = "Y"; } else { test[x][y] = "N"; } } } //Shuffle all those values so they're no longer in order var shuffledTest = _.shuffle(test); //Print in rows for (var x = 0; x &lt; rows; x++) { console.log(shuffledTest[x]); }
possible better answer: http://stackoverflow.com/a/25167339
tagged with: arrays
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25168087
tagged with: multidimensional-array
has title: Create a 2D Array with an X amount of one character
has answer: http://stackoverflow.com/a/25168429
accepted answer: http://stackoverflow.com/a/25168429
answer count: 4

http://stackoverflow.com/a/25183862
accepted answer of: http://stackoverflow.com/q/25183363
type: Answer
score: 2
upvote count: 2
has body: http://jsfiddle.net/PeteA/kr11waha/ function addZero(v) { if (v &lt; 10) return '0' + v; return v; } function stripTime(ds) { var d = new Date(ds), h = addZero(d.getHours()), m = addZero(d.getMinutes()), s = addZero(d.getSeconds()); return h + ':' + m + ':' + s; } document.getElementById('answer').innerHTML = stripTime('2014-08-07T22:35:00+04:00'); That should do what you're after in pure JS
answers question: http://stackoverflow.com/q/25183363
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39067390
has text: I got the request from ajax working, but the console log says "POST http://localhost:8000/dashboard/avatar 400 (Bad Request) "
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25103911

jquery-selectors
tags question: http://stackoverflow.com/q/25129080
type: Tag
tags question: http://stackoverflow.com/q/25085704
tags question: http://stackoverflow.com/q/25192328
tags question: http://stackoverflow.com/q/25154990
tags question: http://stackoverflow.com/q/25204468
tags question: http://stackoverflow.com/q/25198471
tag name: jquery-selectors
tags question: http://stackoverflow.com/q/25183084
tags question: http://stackoverflow.com/q/25211393

http://stackoverflow.com/q/25214776
type: Question
answer count: 2
tagged with: filtering
has answer: http://stackoverflow.com/a/25215540
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25214818
has title: Remove if the does not contain the value of the
type: UnansweredQuestion
has body: I'm trying to implement a live search (filtering) feature with jQuery for a table. The table contains a list of people and their grad year and high school. When the user starts typing inside the search input, the table will start filtering out all the rows that do not contain the value of the search input. It will also add the class of highlight to the td that the searched text was in. How can I filter each row and highlight the td element when the user searches something? I tried implementing this with the code below but to no avail. What can I tweak in this code to get this working correctly? Below is my code. Here is my jsFiddle: http://jsfiddle.net/mikerodriguez/jybrnt22/2/ jQuery $("#search").on("keyup", function(){ var input = $(this).val(); $("#search_table tbody tr").each(function(){ var row = $(this); var td_element = $("#search_table tbody tr td"); if(input !== td_element.text()){ row.hide(); }else{ row.show(); td_element().addClass("highlight"); } }) }); CSS body { margin: 0; padding: 0; font-family: Arial; font-size: 14px; } .search_field { padding: 15px; } .search_field input[type="text"] { padding: 15px; width: 98%; font-size: 18px; } .search_table_container { padding: 15px; } .search_table { width: 100%; } .search_table th { background-color: #AAA; font-weight: bold; padding: 10px 0px; } .search_table td { text-align: center; background-color: #CCC; padding: 15px 0px; } HTML Name Class High School John Smith 2014 Some High School Homer Simpson 2015 Springfield High School Bugs Bunny 2050 Looney Tunes High School George Washington 1749 Georgetown Academy Marty McFly 1991 Back to the Future Doc Emmet Brown 1965 One Point Twenty-one Gigawatts

http://stackoverflow.com/q/25220478
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39283871
score: 3
has comment: http://stackoverflow.com/comment/39284412
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/39283242
has title: Angular directive creation - using multiple templates
has answer: http://stackoverflow.com/a/25223881
has comment: http://stackoverflow.com/comment/39288877
accepted answer: http://stackoverflow.com/a/25223881
answer count: 1
tagged with: angular-ui
has comment: http://stackoverflow.com/comment/39283705
favorite count: 0
has comment: http://stackoverflow.com/comment/39283848
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39283651
has comment: http://stackoverflow.com/comment/39283416
has comment: http://stackoverflow.com/comment/39283363
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39283470
has body: I'm fairly new to Angular JS and I'm trying to create a datepicker directive. It will not work like the Angular UI Bootstrap datepicker as it won't use a textbox but a full page calendar which you will be able to swipe through and click a day (which will update ngModel). My plan was to have a single directive which has a renderMonth() function. This function would accept a month as a parameter and generate all the rows/days in an array which would then be bound to a template for the month. My problem is that I can specify a template for the datepicker in my directive declaration but I don't know how to specify templates for the rows/days etc and load them in and bind them. I could do it using jQuery and lots of string concetenation, but that seems all wrong. I have been reading the source code for the Angular UI Datepicker but as a newbie it makes very little sense to me. They have decoupled everything into many sub-directives (month directive, year directive etc.) and they have their own templates, but that's not what I want to do because my Angular skills aren't going to stretch to creating directives which communicate with each other. The Angular UI code is just way too complicated for me. One thing I do like is that they use existing directives like ng-repeat in their templates and bind them to the array or rows/days. For me to do that I'd need to load the template in each time the renderMonth() is called and compile the template because it has existing directives in it. So, basically my question is, does anybody have any examples of how I could write a import a template into my render function, compile it and ten bind it to the row/day data which is in my directives scope. I'll be honest. I have no idea if I'm even speaking any sense. I'm just typing words which sound vaguely right. ALl I need is for somebody to point me in the right direction. Thanks.
type: Question

http://stackoverflow.com/q/25149713
answer count: 3
has comment: http://stackoverflow.com/comment/39151277
tagged with: javascript
has body: I am trying to emulate inheritance in javascript using a the Lo-Dash javascript library. I am simply using _.extend to do so: function Parent() { var self = this; self.hello = function () { console.log('Hello from parent'); }; } function Child() { var self = this; _.extend(self, Parent); } Child.hello(); // Doesn't exist I thought this would work since all javascript functions are objects but obviously I am wrong. Why doesn't this work and how would I properly emulate inheritance using Lo-Dash?
tagged with: inheritance
favorite count: 0
has title: Inheritance with Lo-Dash
has comment: http://stackoverflow.com/comment/39159017
has answer: http://stackoverflow.com/a/26169659
tagged with: lodash
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/1595611
downvote count: 0
linked to: http://stackoverflow.com/q/16063394
type: Question
score: 3
has answer: http://stackoverflow.com/a/42694860
possible better answer: http://stackoverflow.com/a/26169659
has answer: http://stackoverflow.com/a/25150328
accepted answer: http://stackoverflow.com/a/25150328
upvote count: 3

http://stackoverflow.com/q/25155425
has body: I have a grid. there is first 4 column static and other are changes according data. i want to fridge first 4 column and scroll other by them. like excel fridge pane
type: Question
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25178646
tagged with: gridview
type: UnansweredQuestion
has title: javascript freeze columns and rows in gridview
has comment: http://stackoverflow.com/comment/39161603

http://stackoverflow.com/comment/39178297
score: 0
has text: You could try to use https://developer.mozilla.org/en-US/docs/Web/API/Element.setCapture using retargetToElement=`true`.
type: QuestionComment
comment on: http://stackoverflow.com/q/25164105
type: Comment

http://stackoverflow.com/comment/39081064
has text: @aa333 I don't know what you mean with "blogs on the same page", there is only one blog page, inside the blog there are many articles, look at the following website http://html5up.net/uploads/demos/astral/#. Basically what I want is to scroll to an specific id given that an #anchor is already there used to change the pages.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25112059

http://stackoverflow.com/q/25080451
tagged with: webrtc
answer count: 1
tagged with: javascript
has title: no audio with chrome using sip.js based webrtc app and asterisk 11.11.0. Working fine with firefox and Opera
score: 0
has answer: http://stackoverflow.com/a/26902662
tagged with: asterisk
type: UnansweredQuestion
tagged with: google-chrome
tagged with: audio
has body: I am working on webrtc using sip.js and asterisk. My webrtc application is working fine with firefox 31 and opera 22.0.1471.70. But when i use my webrtc application with chrome (Version 37.0.2062.58 beta-m (64-bit)). Everything seems fine but there is no audio. I have also tried 32 version of the latest stable chrome browser. Issue remains the same. Setup Details:- 1. Asterisk 32 bit - 11.11.0 2. Sip-0.6.1.js 3. Chrome (Version 37.0.2062.58 beta-m (64-bit)), Firefox 31.0 and opera 22.0.1471.70. 4. Cent O.S 6.5 (32 bit) Asterisk Configuration: http.conf :- [general] enabled=yes bindaddr=0.0.0.0 bindport=8088 sip.conf :- [1061] ; This will be the legacy SIP client type=friend username=1061 host=dynamic secret=password context=default [1090] ; This will be WebRTC client type=friend username=1090 ; The Auth user for SIP.js host=dynamic ; Allows any host to register secret=testsip ; The SIP Password for SIP.js encryption=yes ; Tell Asterisk to use encryption for this peer avpf=yes ; Tell Asterisk to use AVPF for this peer icesupport=yes ; Tell Asterisk to use ICE for this peer context=default ; Tell Asterisk which context to use when this peer is dialing directmedia=no ; Asterisk will relay media for this peer transport=udp,ws ; Asterisk will allow this peer to register on UDP or WebSockets force_avp=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11 dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer dtlsverify=no ; Tell Asterisk to not verify your DTLS certs dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is dtlsprivatekey=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS private key is dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS nat=no disallow=all allow=ulaw extension.conf [default] exten => 1060,1,Dial(SIP/1060) ; Dialing 1060 will call the SIP client registered to 1060 exten => 1061,1,Dial(SIP/1061) ; Dialing 1061 will call the SIP client registered to 10…
type: Question

http://stackoverflow.com/comment/39050409
type: AnswerComment
comment on: http://stackoverflow.com/a/25095694
has text: You might want to use `animate()`...check this [fiddle](http://jsfiddle.net/hellosze/MMgXu/) I found.
type: Comment
score: 0

http://stackoverflow.com/a/25101522
downvote count: 0
answers question: http://stackoverflow.com/q/25101517
has comment: http://stackoverflow.com/comment/39061298
upvote count: 2
has comment: http://stackoverflow.com/comment/39061399
has body: Simply use Object.keys to get the array of keys and then use forEach as usual, like this Object.keys(myObj).forEach(function(k) { myObj[k].addEventListener('click', function() { alert('you clicked on element with key = ' + k) }, false); });
type: Answer
score: 2

http://stackoverflow.com/comment/39170914
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25160544
has text: First wrapping a div around the ` `. Then, I'm trying to add a ` ` inside that ` ` I created that wrapped around the selection.
type: AnswerComment

http://stackoverflow.com/comment/39125923
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25136048
type: Comment
has text: @beratishka then you only have to remove the `myBlocks.removeClass('dis');` from the click handler. You can then get the disabled blocks by (in my example) the class *dis*

http://stackoverflow.com/comment/84898955
type: AnswerComment
comment on: http://stackoverflow.com/a/44007538
type: Comment
has text: That's an excellent addition. You're right some settings are not just arbitrary names but have an impact in the app's behavior
score: 1

http://stackoverflow.com/comment/39212830
type: QuestionComment
has text: I hate flying blind with something this tricky, so I won't give any concrete recommendations as it probably just ends up wasting both of our time! Have a look how I implement my zoom listener here http://www.robschmuecker.com/d3-js-drag-and-drop-zoomable-tree/ I'm not sure those methods you are using are valid i.e. `RadarDraw.ZoomListener.scale(6);` etc.
comment on: http://stackoverflow.com/q/25182617
score: 0
type: Comment

http://stackoverflow.com/a/25195879
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39236692
has comment: http://stackoverflow.com/comment/39236662
has comment: http://stackoverflow.com/comment/39237412
has body: While ago I've designed so called repeatable jQuery plugin: https://github.com/c-smile/repeatable So if you have template (html fragment) like this: {{this.name}} 18">18+ No data available and data var data = [ { name: "Olga", age: 20, email: "aaa@example.com" }, { name: "Peter", age: 30, email: "bbb@example.com" }, { name: "Ivan", age: 15, email: "ccc@example.com" }, ]; Then to render list from that data you will do just this: var list = $("ul#people").repeatable(); // declaring the repeatable list.value = data; // that's data population, sic! Here is the demo.
answers question: http://stackoverflow.com/q/25195662

http://stackoverflow.com/q/25157071
possible better answer: http://stackoverflow.com/a/25157149
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25157149
has body: I am working inside an asp.net MVC web application, and I am using jQuery version 1.8.2 &amp; jQuery-ui 1.8.24. I have the following autocomplete code:- $("#ServerTag,#SDTag,#FirewallTag,#RouterTag,#SwitchTag").live("focus.autocomplete", null, function () { var URL ="@Url.Content("~/Server/AutoComplete")"; $(this).autocomplete({ minLength: 1, delay: 1000, source: function (request, response) { $.ajax({ url: URL, cacheLength:1, dataType: "json", data: { term: request.term, rackid: "@Model.Rack.TMSRackID.ToString()", }, success: function (data) { response(data); }, select: function (event, ui) { return false; }, create: function () { $(this).data("autocomplete")._renderItem = function (ul, item) { return $('&lt;li&gt;').data('item.autocomplete', item).append('&lt;a&gt;' + '&lt;b&gt;' + item.label + '&lt;/b&gt;&lt;br&gt;' + '&lt;span style="color: #737373;font-size: 12px;font-weight: 300;line-height: 16px;font-family: Helvetica,Arial,sans-serif;white-space: owrap;"&gt;' + item.resourcename + ' | ' + item.customername + ' | ' + item.sitename + '&lt;hr style="padding: 0px; margin: 0px;"&gt;' + '&lt;/span&gt;&lt;/a&gt;') .appendTo(ul); }; } }); }, }); }); And the following action method, which return the json:- public ActionResult AutoComplete(string term,int? rackid) { var query = from techItems in ad join resourcesItems in resources on techItems.Technology.IT360ID.Value equals resourcesItems.RESOURCEID // join based on db2ID orderby techItems.Technology.PartialTag select new { label = techItems.Technology.Tag.ToString(), customername = resourcesItems.ResourceLocation.SiteDefinition.AccountDefinition.ORG_NAME.ToString(), resourcename = resourcesItems.RESOURCENAME.ToString(), sitename = resourcesItems.ResourceLocation.SiteDefinition.SDOrganization.NAME }; return Json(query, JsonRequestBehavior.AllowGet); } The problem I am facing is that the Autocomplete results will contain only a single label and not the concatenated string defined inside the create section . Can anyone…
type: Question
answer count: 2
tagged with: jquery-1.8
tagged with: jquery-ui
tagged with: autocomplete
has title: jquery 1.8.2 autocomplete + .live() + .create() , not working together
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25157284
score: 0
accepted answer: http://stackoverflow.com/a/25157284

http://stackoverflow.com/q/25077376
has answer: http://stackoverflow.com/a/26535474
answer count: 3
has title: jasmine.clock().tick() does not work with $timeout and debounce, but works fine with setTimeout
has answer: http://stackoverflow.com/a/56561173
tagged with: lodash
tagged with: jasmine
score: 8
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39813509
type: AnsweredQuestion
tagged with: leaflet
downvote count: 0
has comment: http://stackoverflow.com/comment/39691895
upvote count: 8
type: Question
has body: Below I have 3 functions that do exactly the same thing. Each one uses a different way of calling setTimeout, delay1() uses setTimeout directly, delay2() uses angularjs $timeout and delay3() uses lodash debounce. They all work fine. The problems occurs when I test using Jasmine. setTimeout works fine with the jasmine.clock().tick() method, but $timeout and debounce don't I am interested in getting debounce working with Jasmine. I know I can use $timeout.flush() with angularjs but $timeout and setTimeout give me problems elsewhere in my code where I am using it with leaflet maps. debounce works nicely with leaflet. I have created a plunker here: plnkr where you will see the $timeout and debounce tests not passing while the setTimeout test passes. Is there a way I can work around this problem? Thanks JS var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope, $timeout) { $scope.name = 'World'; $scope.delayed1 = function(){ setTimeout(function(){ $scope.name = "Hello world by setTimeout"; },500) } $scope.delayed2 = function(){ $timeout(function(){ $scope.name = "Hello world by $timeout"; },500) } $scope.delayed3 = function(){ _.debounce(function(){ $scope.name = "Hello world by debounce"; },500) } }); spec describe('Testing a Hello World controller', function() { var $scope = null; var ctrl = null; //you need to indicate your module in a test beforeEach(module('plunker')); beforeEach(inject(function($rootScope, $controller) { $scope = $rootScope.$new(); ctrl = $controller('MainCtrl', { $scope: $scope }); })); it('should say hallo to the World', function() { expect($scope.name).toEqual('World'); }); it('should say Hello world by setTimeout', function() { jasmine.clock().install(); $scope.delayed1(); jasmine.clock().tick(600); expect($scope.name).toEqual('Hello world by setTimeout'); jasmine.clock().uninstall(); }); it('should say Hello world by timeout', function() { jasmine.clock().install(); $scope.delayed2(); jasmine.clock().tick(600); exp…
accepted answer: http://stackoverflow.com/a/26535474
has answer: http://stackoverflow.com/a/31747414
possible better answer: http://stackoverflow.com/a/56561173
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/25164105
has comment: http://stackoverflow.com/comment/39180473
tagged with: mouseevent
type: Question
tagged with: javascript
has title: Avoid events in overlapping elements
score: 0
tagged with: http://stackoverflow.com/tag/html
has body: I have an element with a listener for mousemove events, this element is overlapped by another. I'd like the listener to keep working when the mouse pointer is over the second element, meaning that I want to avoid the mouse event for the element that overlaps the main one, is it possible?
has comment: http://stackoverflow.com/comment/39178297
linked to: http://stackoverflow.com/q/11356132
type: UnansweredQuestion
answer count: 0

http://stackoverflow.com/q/25214115
has comment: http://stackoverflow.com/comment/39273118
tagged with: http://stackoverflow.com/tag/html
has body: I have an html form which has a couple of text boxes and a submit button. I would like to check if the textbox has changed value -- if so, submit it to database, else just redirect to different page. I was trying the following code. I keep getting the text changed alert even when the text is not changed. I am not sure what is wrong here? Here is the code that I have tried: http://jsfiddle.net/6bSX6/828/ And my html form.
has comment: http://stackoverflow.com/comment/39283713
has comment: http://stackoverflow.com/comment/39302717
has comment: http://stackoverflow.com/comment/39290427
upvote count: 1
accepted answer: http://stackoverflow.com/a/25231861
has comment: http://stackoverflow.com/comment/39290577
has comment: http://stackoverflow.com/comment/39281069
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39292664
has comment: http://stackoverflow.com/comment/39290595
tagged with: forms
has comment: http://stackoverflow.com/comment/39304352
type: Question
score: 0
has title: Check form field change on submit
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39291868
favorite count: 0
has answer: http://stackoverflow.com/a/25231861

http://stackoverflow.com/comment/39061486
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25101667
has text: Their animation is happening using JS. If you'd like I can post there JS code, and you could maybe apply it to your site.
score: 1

http://stackoverflow.com/comment/39301144
has text: Yes, I started with for loop before I realized it is simpler to go with forEach, just did not think I should get rid of closures.
type: Comment
comment on: http://stackoverflow.com/a/25230156
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39281940
type: AnswerComment
score: 0
type: Comment
has text: Whooo that did it, thank you! Closures are weird. definitely gonna have to get used to them.
comment on: http://stackoverflow.com/a/25215148

http://stackoverflow.com/a/25186198
upvote count: 1
answers question: http://stackoverflow.com/q/25186161
downvote count: 0
has body: Use on like so (event delegation): $("#content").on("click", "h1", function() { Now, each time you click #content, it'll check for an h1 and run the event. Your previous code only bound the handler to the h1 at runtime.
type: Answer
has comment: http://stackoverflow.com/comment/39218277
score: 1

http://stackoverflow.com/q/25185434
has title: Table alignment when header is fixed and body scrollable
score: 2
downvote count: 0
has body: I am facing an issue in alignment of table.I want fixed header and scrollable body of table .I have align table header and body using display:table-header-group I have used following css property on table body &lt;tbody class="scrollablebody"&gt; .scrollablebody { display: block; //if i remove then scroll bar is not coming..i need scroll bar overflow-y: auto; max-height: 200px; } but when i use above css on table body all alignment get disturbed. Please let me know is there way to achieve this ? thanks in advance.. [jsfiddle] (http://jsfiddle.net/saurabh07/7aj5fxmb/)
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40463039
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
linked to: http://stackoverflow.com/q/673153
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39217134
has answer: http://stackoverflow.com/a/25186448

http://stackoverflow.com/q/25193082
has body: I am building a form where the user can input the necessary tools to perform a task. I generate two input boxes for the user to have initially, but i want them to be able to have more inputs if necessary. I created a bit of jQuery that adds a new text box when the last text box is clicked, hinting that they may need another one. The code is as follows: $( ".sidebar input:last-of-type" ).click(function(){ $( ".sidebar input:last-of-type" ).after( '&lt;input type="text" placeholder="Tool Name" /&gt;' ); }); This works, but it is only tied to the second text box that was generated initially. What I want to happen is if after the user adds additional tools, each time they click in the last, newly generated input, it will generate another one and so on. My guess is that the DOM still thinks that the second text box is the "last", although another one was added after the DOM was initially created. Is there a way to re-render the DOM or change my jQuery so that it ALWAYS selects the last input box?
type: Question
type: AnsweredQuestion
tagged with: javascript
tagged with: forms
has answer: http://stackoverflow.com/a/25193197
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25193209
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39231583
has answer: http://stackoverflow.com/a/25193439
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: dynamic
score: 1
has title: jQuery : Create new text box when the last textbox is filled
possible better answer: http://stackoverflow.com/a/25193209
accepted answer: http://stackoverflow.com/a/25193197

http://stackoverflow.com/comment/39174731
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25161544
type: AnswerComment
has text: Yes, I know. But browser interoperability is a general purpose, I wasn't addressing this particular issue.

http://stackoverflow.com/a/25198954
type: Answer
downvote count: 0
score: 1
has body: You have to put the event on the table row (tr) and then change color of each table cell (td) $("tr").click(function () { $('.selected').removeClass('selected'); $(this).find("td").addClass("selected"); });
answers question: http://stackoverflow.com/q/25198895
upvote count: 1

http://stackoverflow.com/q/25093330
type: AnsweredQuestion
has body: The problem I am having is that I want to create a canvas on the top of a webpage but it is always created at the bottom. var canvas = document.createElement('canvas'); canvas.id = "CursorLayer"; canvas.width = 75; canvas.height = 25; //canvas.style.zIndex = 8; canvas.style.position = "absolute"; canvas.style.border = "1px solid"; canvas.style.display = "inline"; canvas.style.backgroundColor = 'rgba(0,0,0,1)'; var body = document.getElementsByTagName("body")[0]; body.appendChild(canvas); cursorLayer = document.getElementById("CursorLayer"); var ctx = cursorLayer.getContext("2d"); function daily() { ctx.fillStyle="#FFFFFF"; ctx.font="20px Hallo Sans Light"; ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.fillText("asdf",1,20); } setInterval(daily,1000); If you need to see the webpage just tell me in the comments
type: Question
tagged with: canvas
possible better answer: http://stackoverflow.com/a/25093382
accepted answer: http://stackoverflow.com/a/25093368
has comment: http://stackoverflow.com/comment/39046145
tagged with: javascript
has answer: http://stackoverflow.com/a/25093382
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25093368
tagged with: http://stackoverflow.com/tag/html
has title: Creating a Canvas at the top of a page

http://stackoverflow.com/a/25218801
has comment: http://stackoverflow.com/comment/39279803
type: Answer
has comment: http://stackoverflow.com/comment/39279819
has body: If you must do this, you can chain your AJAX calls using jQuery deferred's then: http://api.jquery.com/deferred.then/. Also make things easier with a helper fn: var urls = [url1, url2, ....]; function callAjax(url) { return function() { return $.ajax({url: ...}); } }; for (var i = 0; i &lt; urls.length; i+=2) { var dfd = callAjax(urls[i])(); if(urls[i+1]) { dfd.then(callAjax(urls[i+1])); } };
has comment: http://stackoverflow.com/comment/39283123
has comment: http://stackoverflow.com/comment/39279798
has comment: http://stackoverflow.com/comment/39279956
has comment: http://stackoverflow.com/comment/39282081
score: 0
answers question: http://stackoverflow.com/q/25218709

http://stackoverflow.com/q/25182471
favorite count: 0
has body: So I'm working on a Phonegap app and having some trouble with the textarea and maxlength. When the Phonegap app is built on Google Chrome, it is possible to write more than 255 characters with the use of line break/enter on the phone itself. Heres my html: &lt;textarea class="content" wrap="physical" rows="10" cols="50" maxlength="255"&gt;&lt;/textarea&gt; And heres my JS/jQuery: $('.content').keyup( function(e){ /*var char = 255 - $(this).val().length; if(char &lt; 0) char = 0; $('.char_left').text(char);*/ var y = 255; var x = $(this).val(); x = x.replace(/(\r\n|\n|\r)/g,""); x = x.length; if (x &gt;= y) { $('.char_left').text('Limit!'); } else { var ch = y - x; $('.char_left').text(ch); } }); I have commented out a earlier version I used, and that worked in the default android browser.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25182770
type: UnansweredQuestion
tagged with: google-chrome
score: 2
has answer: http://stackoverflow.com/a/25182562
type: Question
upvote count: 2
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Google Chrome; Textarea max characters

ratchet
type: Tag
tag name: ratchet
tags question: http://stackoverflow.com/q/25131391

http://stackoverflow.com/a/25223267
has body: I think { async: true } is what you're looking for. See http://discuss.emberjs.com/t/what-is-an-async-relationship-async-true-vs-async-false/4107 for some discussion on what it is, and how to use it. You would probably want to setup your model like this: App.User = DS.Model.extend({ displayName: DS.attr('string'), email: DS.attr('string'), firstName: DS.attr('string'), lastName: DS.attr('string'), location: DS.attr('string'), messages: DS.hasMany('message', { async: true } ) }); Then when your Handlebars template makes a request for {{myUser.messages}} (or {{myUser.messages.someProperty}} Ember Data will look at the User model, and note that the message id's (say, 5, 10, and 12). It will then look in the local datastore for messages 5, 10, and 12. If it has them, it will display them. If they're not present, it will then use the Adapter you've defined for Message (or if no adapter is defined the default RESTAdapter) to fetch these using an HTTP GET. I believe it will make one request for each id (versus one request for all of them), but that's something I'm not 100% sure about.
has comment: http://stackoverflow.com/comment/39337438
accepted answer of: http://stackoverflow.com/q/25222720
upvote count: 1
answers question: http://stackoverflow.com/q/25222720
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39338735

http://stackoverflow.com/a/25120879
has body: Information must reside in server side. Page 1 sends variable using Ajax OR variable is saved on page 1 execution Server stores information in database Page 2 is loaded with variable while processing OR Page 2 gets variable using Ajax.
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25120541

http://stackoverflow.com/q/25106407
has answer: http://stackoverflow.com/a/25106485
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25106485
has title: angular.js ng-repeat with arrays
score: 0
answer count: 1
tagged with: angularjs-ng-repeat
tagged with: angularjs
has body: i have a simple shopping cart app with angular.js, working quite well. Customer adds product to the cart, obtaining an object like this (just pasting little) : shoppingCart { cartName: "Store", items: Array[2] 0: Object name: "product1" price: 3.5 quantity: 1 sku: "1906" 1: Object name: "product2" price: 5 quantity: 1 sku: "1907" } Now, people can make different orders, and they're receiving products at the bar before proceeding to checkout and pay). I have a summary page with an ng-repeat directive to show all products (and + - buttons to make last correction). Once reviewed the cart, the customer click on a order-button. After ordering, cutsomers can continue shopping and in the same summary page i would like to show, on top, all orders already fulfilled (without + - buttons as the products were already delivered). i tried moving the content of the shoppingCart object inside another object, but i'm using array.push, and can't figure out how to ng-repeating with an array. $scope.alreadyDeliveredProducts = { 'itemsAlready' : [] }; $scope.pushmyorders = function (){ $scope.alreadyDeliveredProducts.itemsAlready.push($scope.cart.items); // and then clear Store } now my alreadyDeliveredProducts is like this: Object { itemsAlready: Array[2] 0: Array[2] //contains all items of first order 1: Array[3] //contains all items of second order } should sound good but now i dont' know how to iterate on this collection. tried something like this, and it's not correct, but i can0t do better, for now: &lt;ion-item ng-repeat="ordereditem in alreadyDeliveredProducts.itemsAlready track by $index"&gt; &lt;p&gt; {{ordereditem.name}} &lt;/p&gt; Sorry for this long question, but perhaps (sure) all my strategy to store data could be improved. Thanks
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/25120934
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25120858
has body: Three things: 1) you used a : instead of a ; after the declaration of the array indexDropDown 2) you used a zero-based indexer to loop through the array while the values start with 1; therefor add 1 to i when looping 3) you updated the value attribute while in html you used the val attribute, so update that one instead of value var indexDropDown = ["A","B","C"]; for (var i = 0; i &lt; indexDropDown.length; i++) { $("#dropdown"+indexDropDown[i]+" option[val="+(i+1)+"]").attr('selected','selected'); } FIDDLE
upvote count: 1
has comment: http://stackoverflow.com/comment/39097347

http://stackoverflow.com/a/25176482
accepted answer of: http://stackoverflow.com/q/25176397
type: Answer
has comment: http://stackoverflow.com/comment/39200588
answers question: http://stackoverflow.com/q/25176397
score: 1
has comment: http://stackoverflow.com/comment/39201840
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: Your result seems off. If inside your action you do return Json(Tuple.Create(False, "Failed to remove")); your result object should be something along these lines: {Item1: false, Item2: "Failed to remove"} In which case all you need to do is access result.Item1 or result.Item2. Either way, using Tuples is ugly, and you should probably create some kind of model for your action to return.

drop-down-menu
tags question: http://stackoverflow.com/q/25217881
tags question: http://stackoverflow.com/q/25132698
tags question: http://stackoverflow.com/q/25189308
tags question: http://stackoverflow.com/q/25129382
tags question: http://stackoverflow.com/q/25209969
tags question: http://stackoverflow.com/q/25156923
tags question: http://stackoverflow.com/q/25213080
tags question: http://stackoverflow.com/q/25164494
type: Tag
tags question: http://stackoverflow.com/q/25126091
tags question: http://stackoverflow.com/q/25198169
tags question: http://stackoverflow.com/q/25197065
tag name: drop-down-menu
tags question: http://stackoverflow.com/q/25119615
tags question: http://stackoverflow.com/q/25089297
tags question: http://stackoverflow.com/q/25144255
tags question: http://stackoverflow.com/q/25207732
tags question: http://stackoverflow.com/q/25193309

http://stackoverflow.com/comment/39062241
score: 0
has text: @HMR Or maybe I can do that in javascript, but I won't be able to use c standard libraries, or any other c libraries for that matter.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25100981

http://stackoverflow.com/comment/39219450
has text: It's an actual pointer column. I changed InstallationQuery.equalTo as you suggested, that does work. The only issue I'm running into now is trying to pass the _User objectId now. response.success(objectId + installations); out puts the _User objectId and then [Object, object]. I tried installation.push({userId: objectId, But I get and error saying that "user" is not defined.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25168726
type: AnswerComment

http://stackoverflow.com/a/25126261
downvote count: 0
answers question: http://stackoverflow.com/q/25126136
type: Answer
upvote count: 3
has body: Use this: $(document).on("click", "#seleccion li a", function(){ Instead of $("#seleccion li").click(function(){
has comment: http://stackoverflow.com/comment/39107664
has comment: http://stackoverflow.com/comment/39107764
score: 3

http://stackoverflow.com/comment/39217941
comment on: http://stackoverflow.com/q/25185043
score: 0
type: Comment
type: QuestionComment
has text: How can I create a fiddle without the together function :D?

http://stackoverflow.com/comment/39024796
type: QuestionComment
comment on: http://stackoverflow.com/q/25082081
has text: possible duplicate of [Adding multiple class using ng-class](http://stackoverflow.com/questions/18871277/adding-multiple-class-using-ng-class)
score: 0
type: Comment

http://stackoverflow.com/q/25141258
has title: Javascript difference between || and ?:
downvote count: 3
score: -3
has comment: http://stackoverflow.com/comment/39134956
possible better answer: http://stackoverflow.com/a/25141330
has body: As I understand from Javascript || operator, || will return whichever operand is true, and ?: will return the 1st operand if the condition before ? evaluates to true, the 2nd otherwise. But can || be considered as a ternary operator itself or not? Explain.
type: AnsweredQuestion
type: Question
answer count: 2
upvote count: 0
linked to: http://stackoverflow.com/q/1378619
tagged with: javascript
has answer: http://stackoverflow.com/a/25141385
accepted answer: http://stackoverflow.com/a/25141385
favorite count: 0
has answer: http://stackoverflow.com/a/25141330
tagged with: ternary-operator

http://stackoverflow.com/a/25228547
answers question: http://stackoverflow.com/q/25228386
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39298047
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39298094
upvote count: 2
has comment: http://stackoverflow.com/comment/39297848
accepted answer of: http://stackoverflow.com/q/25228386
has comment: http://stackoverflow.com/comment/39298158
has body: Using parse_str() Recommended method $string = 'year=1923&amp;season=Winter&amp;person_1_name=barry&amp;person_1_age=20&amp;person_2_name=Tom&amp;person_3_name=Jane&amp;person_3_age=30'; parse_str($string, $output); foreach ($output as $key =&gt; $person){ echo $key . " = " . $person . "&lt;br /&gt;"; } Using explode() $string = 'year=1923&amp;season=Winter&amp;person_1_name=barry&amp;person_1_age=20&amp;person_2_name=Tom&amp;person_3_name=Jane&amp;person_3_age=30'; $persons = explode("&amp;", $string); foreach ($persons as $person){ $details = explode("=", $person); echo $details[0] . " = " . $details[1] . "&lt;br /&gt;"; } Output: year = 1923 season = Winter person_1_name = barry person_1_age = 20 person_2_name = Tom person_3_name = Jane person_3_age = 30 ---------- year = 1923 season = Winter person_1_name = barry person_1_age = 20 person_2_name = Tom person_3_name = Jane person_3_age = 30 Exclude all other fields that don't start with person_ parse_str($string, $output); foreach ($output as $key =&gt; $person){ if(preg_match('/person_/', $key)){ echo $key . " = " . $person . "&lt;br /&gt;"; } } Output: person_1_name = barry person_1_age = 20 person_2_name = Tom person_3_name = Jane person_3_age = 30
has comment: http://stackoverflow.com/comment/39298133

http://stackoverflow.com/comment/39242868
has text: Thanks for your reply ..i tested your code and it does highlight the parent element but everytime you click to the other radio button it will highlight also..here's the fiddle http://jsfiddle.net/venz/a4vsawj6/ .
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25198513
type: Comment

http://stackoverflow.com/comment/39097922
score: 0
type: Comment
has text: @Nate is it from a tutorial or a blog post? I think the intention of it is that code runs on both the client and server. If you had your code in a folder such as `client` it would run on just the client (same with server). Check out the link in the first comment for special directory names
comment on: http://stackoverflow.com/a/25120330
type: AnswerComment

http://stackoverflow.com/comment/39217209
type: AnswerComment
comment on: http://stackoverflow.com/a/25185346
type: Comment
score: 0
has text: Note, the discussion is also appearing in the form of a bug report [on github](http://github.com/lokku/jquery-nstslider/issues/13).

http://stackoverflow.com/comment/39097192
has text: Corrected syntax of using when-then. Check if this works for you. I am not sure which one is called before done or then...
comment on: http://stackoverflow.com/a/25120600
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25191028
has comment: http://stackoverflow.com/comment/39227743
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25191137
has comment: http://stackoverflow.com/comment/39227770
has comment: http://stackoverflow.com/comment/39227829
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25191256
tagged with: javascript
has answer: http://stackoverflow.com/a/25191256
favorite count: 0
has comment: http://stackoverflow.com/comment/39227776
has title: Linking to another html document when a button is clicked
has comment: http://stackoverflow.com/comment/39227863
has answer: http://stackoverflow.com/a/25191137
has comment: http://stackoverflow.com/comment/39227762
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39227738
has body: Am trying to redirect to another html document when a button is clicked. This is my js code: $('#getTextBoxValue').on("click", function(){ var value = $("#textbox1").val(); }); $('#getTextBoxValue').click(function() { window.location.href = 'view.html'; return false; }); And this is my html code: Submit Nothing happens when I click the button though, is there a better way to do this?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/503093
has comment: http://stackoverflow.com/comment/39227953
has answer: http://stackoverflow.com/a/25191135

http://stackoverflow.com/a/25100793
has comment: http://stackoverflow.com/comment/39060509
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39060546
downvote count: 0
type: Answer
has body: I'm surprised you're running into an issue when using the toggle class strategy. Can you give a concrete example of a situation where this gets messy? You mention that your site's code isn't a problem, so what is? Where are some bits that smell? I say this only because it seems like toggling visibility is really the most straight forward option and you might be over thinking this. Unless I'm misunderstanding your use case. Also, there's not going to be a 'best' answer for this question. It's very situation dependent. EDIT: This is a high level question that's difficult to answer directly. The crux of what your asking is really "how do I manage complex view state and interaction". The distinction between dynamic/static html doesn't really matter, you're faced with the challenge you outline no matter how you generate your html for the subviews. That said, you mention that you're using backbone. Remember that backbone is just a tool to help you architect a solution, if you feel like you're fighting it, perhaps you are. Even so, if I were implementing the case in your comment and wanted to stick with backbone conventions, yes, I would do as you mentioned; I'd treat my 'static' views the same as my 'dynamic' ones. Backbone views are less about html and more about interaction contexts - and it sounds like its the interaction context that you really care about. So I'd have a View named ProductView that itself had a TabContainerView. This TabContainerView would have TabViews and so on. I'd go down the hierarchy for every level of interaction state that's important. Then it becomes easy to track state and work with the views. Need to track the currently visible tab? Add a property to TabContainerView. Need to hide a pop-up triggered by a TabContainerView, add a hide method to TabContainerView. In this way, your view hierarchy is rich with state and event handlers. Further, you can develop things in a widget fashion and use composition to build up a pretty sophisticated exper…
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25100455
answers question: http://stackoverflow.com/q/25100455

http://stackoverflow.com/q/25110447
accepted answer: http://stackoverflow.com/a/25111292
answer count: 1
has title: Vertically center div responsively
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39079239
has answer: http://stackoverflow.com/a/25111292
has body: I'm trying to vertically center the nav panel responsively, so that it is centered on all screens that are ~940px and up. I found this article CSS-Tricks but I have been unable to implement this with my current code effectively. html css /* Core */ *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } body { display: block; font-family: "Open Sans", sans-serif; font-size: 12px; font-weight: 400; line-height: 1.42857; color: black; background-color: white; } ul { margin: 0; padding: 0; -webkit-margin-before: 0em; -webkit-margin-after: 0em; -webkit-padding-start: 0px; } .wrapper { position: fixed; width: 100%; height: 100%; top: 75px; z-index: 0; } #content { position: relative; left: 0; z-index: 0; height: 100%; overflow: auto; } /* Header */ .header { background-color: white; width: 100%; height: 75px; position: absolute; top: 0; z-index: 2; box-shadow: 1px 0 1px #bdc3c7; } #nav-button { color: #555c60; position: absolute; left: 40px; top: 35%; -webkit-transition: -webkit-transform 0.2s; -moz-transition: -moz-transform 0.2s; transition: transform 0.2s; -webkit-font-smoothing: antialiased; -moz-font-smoothing: antialiased; font-smoothing: antialiased; } #nav-button.nav-button-open { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); transform: rotate(90deg); -webkit-transition: -webkit-transform 0.2s; -moz-transition: -moz-transform 0.2s; transition: transform 0.2s; -webkit-font-smoothing: antialiased; -moz-font-smoothing: antialiased; font-smoothing: antialiased; } .logo { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } #account-control { color: #555c60; position: absolute; right: 40px; top: 35%; -webkit-transition: -webkit-transform 0.2s; -moz-transition: -moz-transform 0.2s; transition: transform 0.2s; -webkit-font-smoothing: antialiased; -moz-font-smoothing: antialiased; font-smoothing:…
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/39173222
has text: did you try to add `.fail(console.log.bind(console))`
comment on: http://stackoverflow.com/q/25161751
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25073782
type: Answer
has body: What's the lowest version of IE that you're concerned with? You may be able to use Array.filter to help narrow down your search. Here's an example: HTML contain certain text contain certain text YAY contain certain text contain certain text contain certain text contain certain text JavaScript //turn nodelist into an array //feel free to use getElementsByTagName or something similar here var h2 = Array.prototype.slice.call(document.querySelectorAll("h2")); //Array of matches var matches = h2.filter(filterElements); console.log(matches); //Filter Function function filterElements(element){ return element.textContent === "YAY"; } There's a polyfill Array.filter as well on the MDN page. EXAMPLE
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/39011696
answers question: http://stackoverflow.com/q/25073477
has comment: http://stackoverflow.com/comment/39011156
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25073477

http://stackoverflow.com/q/25076996
answer count: 3
has comment: http://stackoverflow.com/comment/39015086
has answer: http://stackoverflow.com/a/25077105
has comment: http://stackoverflow.com/comment/39015233
has title: Json associative array accessing in jQuery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25077092
has answer: http://stackoverflow.com/a/25077123
type: Question
has body: I am getting response in below format for every product and in a single call there can be many products. I am trying to access this data via jQuery but I'm not able to access it. Productdata['someid'] = { "Product Json data"} I am using below syntax in jQuery but not getting the data. Please suggest. alert(Productdata['someid']);
tagged with: http://stackoverflow.com/tag/json
score: 0
tagged with: javascript
tagged with: web
tagged with: jquery

http://stackoverflow.com/a/25126931
has comment: http://stackoverflow.com/comment/39110393
score: 0
has comment: http://stackoverflow.com/comment/39108903
type: Answer
has body: function displayMessage(inputId, messageId, valueToCheck) { var inputEle = document.getElementById(inputId), messageEle = document.getElementById(messageId); if (inputEle &amp;&amp; messageEle) { if (inputEle.value == valueToCheck) { messageEle.innerHTML = 'Correct!'; messageEle.style.color = "green"; } else { messageEle.innerHTML = 'Wrong :( Try again!'; messageEle.style.color = "red"; } } } Check this jsfiddle http://jsfiddle.net/7v7y5/
answers question: http://stackoverflow.com/q/25126754

http://stackoverflow.com/comment/39268058
type: Comment
has text: Guno makes a good point, albeit the performance difference is largely insignificant nowadays...? I did it the way I did for clarity, in terms of helping RRajg get to grips with how he could change his code and help him see what is being changed and why.
type: AnswerComment
comment on: http://stackoverflow.com/a/25212251
score: 0

http://stackoverflow.com/comment/39133832
has text: @Pointy Thanks I had a look at my scripts and found out that i have put momentjs after my scripts. If you post this as an answer I will accept it.
comment on: http://stackoverflow.com/q/25140347
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25175909
score: 1
answers question: http://stackoverflow.com/q/25175145
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39199684
downvote count: 0
has body: I think you can use the built-in implementation of jqLite in angular, here in your case is .find() method would be useful if you need to have like this: var title = element.find('input').length; // &lt;---update this alert("input length is ====&gt;"+title); Demo
accepted answer of: http://stackoverflow.com/q/25175145
type: Answer
upvote count: 1

http://stackoverflow.com/q/25177761
has answer: http://stackoverflow.com/a/25178462
type: Question
has body: Found out that on this example: https://dl.dropboxusercontent.com/u/169269/group_drag.svg If I try to use the same code in html, it doesn't work at all: Uncaught ReferenceError: evt is not defined What could cause this behavior?
tagged with: javascript
score: -1
accepted answer: http://stackoverflow.com/a/25178381
answer count: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/39203367
tagged with: http://stackoverflow.com/tag/svg
has title: Difference in event model between svg and html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25178381
downvote count: 2
possible better answer: http://stackoverflow.com/a/25178462
upvote count: 1

bukkit
tag name: bukkit
type: Tag
tags question: http://stackoverflow.com/q/25190791

http://stackoverflow.com/a/26668025
answers question: http://stackoverflow.com/q/25229344
downvote count: 0
score: 1
has body: Angular Deckgrid has a bug where ng-if and ng-repeat does not work. I'm not sure the plugin is still maintained unfortunately. See https://github.com/akoenig/angular-deckgrid/issues/58
type: Answer
upvote count: 1

http://stackoverflow.com/a/25251316
type: Answer
downvote count: 0
has body: You can stop click on the dropdown from propagating and then manually reimplement the carousel controls using carousel javascript methods. $('ul.dropdown-menu.mega-dropdown-menu').on('click', function(event) { event.stopPropagation(); }); $('a.left').click(function () { $('#carousel').carousel('prev'); }); $('a.right').click(function () { $('#carousel').carousel('next'); }); $('ol.carousel-indicators li').click(function (event) { var index = $(this).data("slide-to"); $('#carousel').carousel(index); }); Here is the jsfiddle.
score: 5
has comment: http://stackoverflow.com/comment/39344958
upvote count: 5
answers question: http://stackoverflow.com/q/25089297

http://stackoverflow.com/q/25150129
tagged with: css
has title: jQuery magnific-popup : open 2 popup iframe with differents width/height
type: AnsweredQuestion
downvote count: 0
tagged with: iframe
type: Question
score: 1
has answer: http://stackoverflow.com/a/25150459
accepted answer: http://stackoverflow.com/a/25150459
upvote count: 1
answer count: 1
has body: ) My code : OPEN POP1 OPEN POP2 My JS : $('.pop').magnificPopup({ type:'iframe', midClick: true} ); I would like POP1 to open with 500px 200px, and POP2 with 400px 400px. What is the way to set differents width/height for POP1 and POP2 ? Do I have to use a CLASS in the HREF ? or is it a code in the JS, by creating a $(.pop1) and $(.pop2) ? I played with width/height in the class ".mfp-iframe-holder .mfp-content" but the settings change both pop1 and pop2. Any help will be great. ;-)
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39277172
type: Comment
comment on: http://stackoverflow.com/a/25216954
has text: The `<#` tags are also executed by the browser.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39123840
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25134598
score: 1
has text: @Donovant: I am not sure you understand what you are saying... anyway, [here is an example](http://jsfiddle.net/6rdL3/) of when you can call a function as a parameter. Hopefully you will understand it... [this one too](http://jsfiddle.net/6rdL3/1/)

http://stackoverflow.com/comment/39249068
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25202077
has text: @Nicolas i am really sorry that i am not able to ask what i actually want. i am totally new to all of this. in my last comment i mentioned my html part image

http://stackoverflow.com/q/25089651
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Why are the CSS transforms not displayed?
favorite count: 0
has answer: http://stackoverflow.com/a/25094202
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: css-transitions
has comment: http://stackoverflow.com/comment/39039967
has body: I'm trying to make a navigation panel slide in on the click of a nav button in the main menu. Needless to say, it's not working. I've made this work before, so I'm not sure what's going on. Help? HTML Billing Support Servers Settings Reports asdf Relevant CSS /* Core */ *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } body { display: block; font-family: "Open Sans", sans-serif; font-size: 12px; font-weight: 400; line-height: 1.42857; color: black; background-color: white; } .wrapper { position: relative; width: 100%; height: 100%; top: 100px; z-index: 0; overflow: hidden; } #content { position: relative; left: 0; z-index: 5; height: 100%; overflow: auto; -webkit-transition: -webkit-transform 0.5s; -moz-transition: -moz-transform 0.5s; transition: transform 0.5s; } .sidebar-open #content { -webkit-transform: translate(200px, 0); -moz-transform: translate(200px, 0); transform: translate(200px, 0); } /* Header */ .header { background-color: #222222; width: 100%; height: 100px; position: absolute; top: 0; z-index: 1; } #nav-button { font-size: 24px; color: white; position: absolute; left: 40px; top: 50%; -webkit-transform: translateY(-50%); -moz-transform: translateY(-50%); transform: translateY(-50%); } #nav-button.open { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); transform: rotate(90deg); } .logo { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .account-control { font-size: 24px; color: white; position: absolute; right: 40px; top: 50%; -webkit-transform: translateY(-50%); -moz-transform: translateY(-50%); transform: translateY(-50%); } /* Navigation */ #sidebar { position: absolute; top: 100px; left: 0; visibility: hidden; width: 200px; height: 100%; background: #222222; opacity: 1; z-index: 1; -webkit-transform: all 0.5s; -moz-transform: all 0.5s; transform: all 0.5s; -webkit-…
type: Question
has comment: http://stackoverflow.com/comment/39041220
answer count: 2
has answer: http://stackoverflow.com/a/25090460

http://stackoverflow.com/q/25202310
type: Question
has answer: http://stackoverflow.com/a/25206424
has comment: http://stackoverflow.com/comment/39252076
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25217385
tagged with: ajax
has body: i need to send an order row by ajax to php...but have lack about this...anyone can help me? (it a very simple order form with populating from xml file and add a select items with a simple menù ) //Retrieve XML document and loop for each item jQuery(function($) { //just like $(document).ready() $.ajax({ type: "GET", url: "data/menu.xml", dataType: "xml", error: function() { $("&lt;p&gt;Error loading XML file...&lt;/p&gt;") .replaceAll("#order_form") }, success: function(xml) { $(xml).find("item").each(fWriteXML); //must call function as var } }); }); //Populate drop-down box with XML contents var fWriteXML = function writeXML() { var id = $(this).attr("id"); var cost = $(this).attr("cost"); var item = $(this).text(); $("#select_item") .append($("&lt;option&gt;&lt;/option&gt;") .val(id) //same as .attr("value", id)) .html(item) .attr("title", cost)); }; //Add selected item to order $(function() { $("#add_btn").click(function() { var order_item_selected_quantity = $("#select_quantity").val() var selected_item = $("#select_item option:selected"); var order_item_selected_id = selected_item.val(); var order_item_selected_name = selected_item.text(); var order_item_selected_cost = selected_item.attr("title"); var pattern = new RegExp("^[1-9][0-9]?$"); //Select between 1-99 items //Do not proceed if input is incorrect if (pattern.test(order_item_selected_quantity) &amp;&amp; order_item_selected_cost != "") { //Calculate subtotal var order_item_selected_subtotal = parseFloat(order_item_selected_cost) * parseInt(order_item_selected_quantity); $("&lt;tr class='order_row'&gt;&lt;/tr&gt;").html("&lt;td&gt;" + order_item_selected_quantity + "&lt;/td&gt;&lt;td&gt;" + order_item_selected_id + "&lt;/td&gt;&lt;td class='order_item_name'&gt;" + order_item_selected_name + "&lt;/td&gt;&lt;td class='order_item_cost'&gt;" + order_item_selected_cost + "&lt;/td&gt;&lt;td class='order_item_subtotal'&gt;" + order_item_selected_subtotal + "&lt;/td&gt;&lt;td&gt;" + "&lt;input type='button' valu…
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39249007
has comment: http://stackoverflow.com/comment/39248911
has title: send orderform ajax to php
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39248948

http://stackoverflow.com/comment/39062219
type: AnswerComment
has text: So if I add `...=null;` to which function? it will be less prone to leaks in ancient browsers? I must admit I have coded like the above since 1996 and never noticed a problem
type: Comment
comment on: http://stackoverflow.com/a/25101698
score: 0

http://stackoverflow.com/q/25126679
favorite count: 0
has body: Consider following examples new Date("Wed, 28 May 2014 09:50:06 EEST"); // Invalid Date new Date("Thu, 26 Jun 2014 09:09:27 EDT"); // OK, is parsed new Date("Wed, 28 May 2014 09:50:06 (EEST)"); // OK, is parsed new Date("Thu, 26 Jun 2014 09:09:27 (EDT)"); // OK, is parsed Why "EEST" example without brackets is not parsed whereas second example is?
has title: Javascript Date constructor can't parse date string with some timezones without brackets
tagged with: parsing
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: date
upvote count: 1
answer count: 1
has answer: http://stackoverflow.com/a/25126820
accepted answer: http://stackoverflow.com/a/25126820

http://stackoverflow.com/comment/39240980
type: Comment
type: QuestionComment
has text: @Fred-ii- Still not work. Not go in this case.
score: 0
comment on: http://stackoverflow.com/q/25198219

http://stackoverflow.com/q/25109483
tagged with: javascript
has body: I want that each click on .clickClass would affect toggle .foo on .present class - mean - init - present , 1st click present foo 2nd click present and so on ... so far I have - http://jsfiddle.net/urielz/qQdn7/1/ How to get that ? Update : Here is sample works - http://plnkr.co/edit/0lu6x8uP7nVcTTYaNj4o?p=preview
has title: How to toggle class name with ng-click
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25109647
tagged with: angularjs
type: AnsweredQuestion
tagged with: angularjs-ng-click
type: Question
accepted answer: http://stackoverflow.com/a/25109647

http://stackoverflow.com/comment/39090936
comment on: http://stackoverflow.com/a/25117547
has text: Tried it, but unfortunately it does nothing. But if I set value: resource I get this in the form: #<User:0x007f512c91ee78>
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25074351
tagged with: java
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25076862
linked to: http://stackoverflow.com/q/16889950
has comment: http://stackoverflow.com/comment/39015965
upvote count: 0
answer count: 1
favorite count: 0
type: AnsweredQuestion
downvote count: 2
has title: Executing phantom.exit() in java script from JAVA program
type: Question
has body: How to execute phantom.exit() in java script from JAVA program. Actually the scenario is Java program calls a java script program using PhantomJs, java script program is returning some values to that Java program. Refer to this link : Running Phantomjs from javascript, JSP or Java After getting values from javascript I need to stop javascript. For that I used phantom.exit() in javascript, which is not executing when I call it from Java Program. But it works fine when I execute the same javascript program from command promt using the command 'phantomjs myscript.js'. The code is getting stuck in this line.. int exitStatus = process.waitFor(); It keep on waiting and it is not terminating. So what is the way to terminate javascript from JAVA program?
tagged with: phantomjs
has answer: http://stackoverflow.com/a/25076862
has comment: http://stackoverflow.com/comment/39019322
score: -2

http://stackoverflow.com/a/25214026
answers question: http://stackoverflow.com/q/25214012
score: 1
upvote count: 1
has body: You can do this by replacing setTimeout with setInterval to keep repeating the click after the specified timeout. setInterval(function(){ $('.next').trigger('click'); }, 500); Fair warning, while this will work, it's a terrible solution. It would be better to look for an API in your carousel, or add one to trigger a slide.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39271033
accepted answer of: http://stackoverflow.com/q/25214012
type: Answer

http://stackoverflow.com/comment/116004315
type: Comment
score: 2
comment on: http://stackoverflow.com/a/63517061
has text: What's the difference?
type: AnswerComment

http://stackoverflow.com/comment/39028801
type: Comment
has text: The goal is to hide the `div` not the `li` or `ul`. To call this a slight variation of what you've provided clearly shows we are reading from different scripts: "**My goal would be to hide the div**"
type: AnswerComment
comment on: http://stackoverflow.com/a/25084040
score: 0

http://stackoverflow.com/a/25185703
score: 0
answers question: http://stackoverflow.com/q/25185505
type: Answer
has body: var d = new Date('2014-07-08 00:00:00') d.toDateString() This will give Thu Aug 07 2014 If this is not enough. You may consider using moment.js from http://momentjs.com/

http://stackoverflow.com/a/25141592
downvote count: 0
answers question: http://stackoverflow.com/q/25138699
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25138699
type: AcceptedAnswer
has body: editor#change event is available since CKEditor 4.2. Update your version of CKEditor.

http://stackoverflow.com/comment/39277929
score: 1
type: Comment
type: QuestionComment
has text: It's a short-hand for self-invoking anonymous functions, it's same as `(function(){ // code })();`
comment on: http://stackoverflow.com/q/25217743

http://stackoverflow.com/comment/39179508
has text: a) `.on` doesn't accept a DOM element as the second argument (it, accepts a selector, http://api.jquery.com/on/#on-events-selector-data-handler). b) you also have to add the element to the document. The second one should work then. However, you should also add some content to the element, otherwise it won't have any dimensions and you can't target it with the mouse.
comment on: http://stackoverflow.com/q/25165119
type: Comment
type: QuestionComment
score: 7

http://stackoverflow.com/a/43550657
type: Answer
upvote count: 13
has body: jQuery: HTML: Dropdown Example HTML CSS JavaScript Demo: Generic: https://jsfiddle.net/kerryjohnson/omefq68b/1/ Your demo with this solution: http://jsfiddle.net/kerryjohnson/80oLdtbf/101/
score: 13
answers question: http://stackoverflow.com/q/25089297
downvote count: 0

http://stackoverflow.com/q/25173036
favorite count: 0
has comment: http://stackoverflow.com/comment/39194587
has comment: http://stackoverflow.com/comment/39194522
downvote count: 1
linked to: http://stackoverflow.com/q/18148559
has comment: http://stackoverflow.com/comment/39194678
has comment: http://stackoverflow.com/comment/39194677
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39194651
score: -1
has comment: http://stackoverflow.com/comment/39194636
has answer: http://stackoverflow.com/a/25173158
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25173153
upvote count: 0
accepted answer: http://stackoverflow.com/a/25173158
has answer: http://stackoverflow.com/a/25173153
has body: On my wordpress site, I have created an button that, upon clicking it, will send you to a specific scroll position on the website. This is working great. My issue is getting this code to run once the web page has finished loading. Specifically to scroll to a position on the page that will hide the page header unless the user scrolls back to the top. This is the JavaScript I've been attempting to use: &lt;body onLoad="pageScroll(240)"&gt; For reference, this is the HTML of the button I've created: &lt;button onclick="document.documentElement.scrollTop = 240;document.body.scrollTop =240;"&gt; Click to scroll to beginning of content &lt;/button&gt; &lt;/div&gt; Here is the entire contents of the header.php file: http://pastebin.com/YxknizFU I used pastebin because I couldn't figuire how to format the code properly
tagged with: javascript
has title: Executing HTML/JavaScript On Page Load? (Wordpress)
has comment: http://stackoverflow.com/comment/39194733
has comment: http://stackoverflow.com/comment/39195111

http://stackoverflow.com/q/25203118
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: So what I have is a full HTML / CSS site that I did not design, I've just inherited it. The issue that I'm facing at the moment is that on one page in particular, when viewed on a phone / tablet, almost becomes too sensitive. What I mean by that is that it actually becomes very difficult to scroll around on the page due to the fact that there are many little "tiles" that are all wired to up for .click() listeners, which are being triggered by scrolling on the phones / tablets. I am really looking for best practices or any ideas anyone might have as how to best handle this. After scouring google, I have been unsuccesful in finding anything of value to me. A few ideas I had, but have yet to implement are to Add a delay so that a person must actually tap and hold for a second or two before running the code in the click() event listener With media queries, drastically reduce the size of the element that the click() listener is bound to Anyways, here is a sample of the HTML and a screenshot of what the final product looks like when output to a browser HTML -- There are many of these little blocks in succession that stack with the responsive css Shop and earn with Macys Screenshot
linked to: http://stackoverflow.com/q/14486804
favorite count: 0
has title: Issue with Responsive Design and .click() event listeners
tagged with: css
has answer: http://stackoverflow.com/a/25203164
accepted answer: http://stackoverflow.com/a/25203164
type: AnsweredQuestion
score: 2
tagged with: responsive-design
type: Question
tagged with: javascript
tagged with: jquery
upvote count: 2

http://stackoverflow.com/q/25204160
has comment: http://stackoverflow.com/comment/39273636
has body: This is my HTML: Filter Products By Price 1000-2000 2000-3000 3000-4000 Size Small Medium Large Brand Dell HP Sony Currently I am working on this search but i want to call an ajax function on click of each checkbox and run a database query and fetch results and when checkbox is unchecked i want to delete corresponding divs from the JSP page.I have tried different logics on my servlet but failed to get relevant result.Could anybody guide me how to code servlet and make logic of this search. EDIT: Basically i want to know which query to run at Servlet which can fulfil all the checkboxes that user have selected.
has comment: http://stackoverflow.com/comment/39273626
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/39253229
has comment: http://stackoverflow.com/comment/39252124
tagged with: servlets
score: 0
tagged with: sql
has comment: http://stackoverflow.com/comment/39252420
has comment: http://stackoverflow.com/comment/39252779
has comment: http://stackoverflow.com/comment/39252626
has comment: http://stackoverflow.com/comment/39252876
has comment: http://stackoverflow.com/comment/39253058
type: UnansweredQuestion
has title: Unable to find logic of checkbox search?
has comment: http://stackoverflow.com/comment/39252313
answer count: 0
has comment: http://stackoverflow.com/comment/39253340
has comment: http://stackoverflow.com/comment/39252330
tagged with: java
type: Question
has comment: http://stackoverflow.com/comment/39273661

http://stackoverflow.com/q/25212726
score: 0
linked to: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/39268584
has body: I seem to be unable to make the following work. I simply want to define a function that retrieves JSON files and lets me store them in an object without defing global variables. So basically, why does this Works: ///Global var filesaved=[]; ///function function getQuandlData(subset,datatype,token){ var url = "http://www.quandl.com/api/v1/datasets/"+subset+"/AAPL"_"+datatype+".json?auth_token="+token; console.log(url); $.getJSON(url, function(data) { filesaved=data; console.log("filesaved as "+subset+"/"+$('#ticker').val().toUpperCase()+"_"+datatype,filesaved) }); ///use getQuandlData("RAYMOND","NET_INCOME_Q",Quandl_auth_token);filesaved.data[0][1] and yet this doesn't ///function function gQD(subset,datatype,token){ var fs=[]; var url = "http://www.quandl.com/api/v1/datasets/"+subset+"/AAPL_"+datatype+".json?auth_token="+token; console.log(url); $.getJSON(url, function(data) { fs=data; }); return fs; } ///use gQD("RAYMOND","NET_INCOME_Q",Quandl_auth_token).data[0][1]; The variable Quandl_auth_token can be obtained from Quandl.com for free, I'd just like to keep mine private :o ***This is essentially my code, only different with my actual code is that I replace "AAPL" with an input from the HTML. ***I understand that my issue revolves around something with asynchronous functions, is there a way to work around that? ***Also the output for the gQD("RAYMOND","NET_INCOME_Q",Quandl_auth_token) example is [], which
has comment: http://stackoverflow.com/comment/39268451
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25212849
duplicate of: http://stackoverflow.com/q/23667086
has comment: http://stackoverflow.com/comment/39268564
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39268538
has title: JS: Using getJSON to retrieve an object of data in a function
has comment: http://stackoverflow.com/comment/39268534
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39268473
tagged with: get

http://stackoverflow.com/q/25080174
has comment: http://stackoverflow.com/comment/39021640
has comment: http://stackoverflow.com/comment/39043218
has comment: http://stackoverflow.com/comment/39021988
has comment: http://stackoverflow.com/comment/39021999
answer count: 0
type: UnansweredQuestion
tagged with: handlebars.js
has comment: http://stackoverflow.com/comment/39021326
has comment: http://stackoverflow.com/comment/39021086
has title: BackboneJS Jquery How to pass values to magnific popup
has comment: http://stackoverflow.com/comment/39023152
has comment: http://stackoverflow.com/comment/39021400
has body: How can I pass values which I get from a click event in Backbone to my Magnific popup? So far, my View looks like this: events: { 'click .albumolfull': 'listenAlbum' }, listenAlbum: function(e) { e.preventDefault(); var album = $(e.currentTarget).find('a'); this.openMusicService(album); }, openMusicService: function(album){ $.magnificPopup.open({ items: { src: '#pickservice', }, type: 'inline', disableOn: 700, mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false, }); } And my HTML looks like this (I use HandlebarsJS): &lt;div class="albumolfull"&gt; &lt;span&gt;PLAY&lt;/span&gt; &lt;div style="display:none;"&gt; {{#each services}} &lt;a href="{{id}}" target="blank"&gt;{{name}}&lt;/a&gt; {{/each}} &lt;/div&gt; &lt;/div&gt; and the HTML for the popup (in same template): &lt;div id="pickservice" class="white-popup mfp-hide"&gt; &lt;section class="ppw-links ip"&gt; &lt;div id="ppwlinkh"&gt; &lt;h2&gt;Vælg tjeneste:&lt;/h2&gt; &lt;/div&gt; &lt;div class="ipof"&gt; &lt;ol class="olls"&gt; {{#each releases}} {{#each services}} &lt;li class="ls2"&gt; &lt;a href="{{id}}"&gt;&lt;button class="btnspotify"&gt;&amp;nbsp;&lt;/button&gt;{{name}}&lt;/a&gt; &lt;/li&gt; {{/each}} {{/each}} &lt;/ol&gt; &lt;/div&gt; &lt;/section&gt; &lt;/div&gt; the values id and name gets provided by an API as JSON. How can I achieve this? please help...
type: Question
has comment: http://stackoverflow.com/comment/39024656
has comment: http://stackoverflow.com/comment/39021222
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
score: 0

http://stackoverflow.com/comment/39010402
type: AnswerComment
comment on: http://stackoverflow.com/a/25074080
type: Comment
has text: I answered you in post 1 as can't post code anymore, thanks for looking.
score: 0

http://stackoverflow.com/comment/39045256
type: QuestionComment
has text: They don't do the same thing. Try `console.log(theScript)` after each of them and you'll see the difference.
comment on: http://stackoverflow.com/q/25092892
score: 5
type: Comment

http://stackoverflow.com/q/25169285
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: cordova
has body: I know clicking an html &lt;select&gt; element will automatically show iOS's native selector. I want, however, to launch the selector from javascript with custom options. How can I do this?
has comment: http://stackoverflow.com/comment/39187862
answer count: 0
linked to: http://stackoverflow.com/q/16157459
type: Question
has comment: http://stackoverflow.com/comment/39187538
tagged with: javascript
has comment: http://stackoverflow.com/comment/39187897
has comment: http://stackoverflow.com/comment/39187763
has comment: http://stackoverflow.com/comment/39187740
score: 0
has title: How can I launch a native iOS select list via JavaScript?
has comment: http://stackoverflow.com/comment/39187673
tagged with: ios
has comment: http://stackoverflow.com/comment/39187373
has comment: http://stackoverflow.com/comment/39187724
has comment: http://stackoverflow.com/comment/39187731
has comment: http://stackoverflow.com/comment/39187943

http://stackoverflow.com/q/25097867
has title: How to check the first radio input generated by ng-repeat?
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25097906
accepted answer: http://stackoverflow.com/a/25097906
tagged with: angularjs
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39054637
has body: Here's my code: {{color}} It generates three radio inputs, as it should: beige black white What I want is to have one of the inputs already checked when the page loads (preferably the first one). I've tried more approaches I can count and I'm getting out of my mind. How can this be done?
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39054509
score: 0

http://stackoverflow.com/q/25152388
has answer: http://stackoverflow.com/a/25152684
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39156242
has comment: http://stackoverflow.com/comment/39155968
has comment: http://stackoverflow.com/comment/39156094
type: Question
has body: I am using $.ajax to upload images to my server with sizes less than 200mb when I run this code on my computer using wampserver the code works fine and I upload images with appropriate sizes however when I run this website on online server like 000webhost and try to upload files with size more than about 160kb I get no response, is this normal? My code var formData = new FormData($('#uploadform')[0]); $.ajax({ cache:false, type: 'POST', url: 'process.php', data: formData, beforeSend: function(){ alert("Ready"); }, success: function(response){ if(response=='Complete'){ alert("Completed"); } }, contentType: false, processData: false }); }
tagged with: javascript
tagged with: ajax
has title: Ajax file upload doesn't work as normal
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39156050
tagged with: file-upload

unicode
tags question: http://stackoverflow.com/q/25145638
tag name: unicode
type: Tag
tags question: http://stackoverflow.com/q/25218153
tags question: http://stackoverflow.com/q/25121993
tags question: http://stackoverflow.com/q/25136593
tags question: http://stackoverflow.com/q/25172861

http://stackoverflow.com/q/25209207
tagged with: javascript
has answer: http://stackoverflow.com/a/25209291
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25209291
tagged with: node.js
has comment: http://stackoverflow.com/comment/39262064
has comment: http://stackoverflow.com/comment/39261595
type: AnsweredQuestion
has body: I'm working with Javascript "classes", I have a parent "class" with a variable and a function, something like this function WS() { this.auth = { client: '', password: '' }; this.Execute = function(url, callback) { soap.createClient(url, function(err, client) { if (err) return callback(err); return callback(null, client); }); } } The "subclass" uses this function and variable, like this function Stats() { this.url = 'http://'; this.emailsByDate = function(params, callback) { this.Execute(this.url, function(err, client) { if (err) return callback(err); client.Get(this.auth.concat(params), function(err, results) { if (err) return callback(err); return callback(results); }); }); } } Stats.prototype = new WS; I'm getting through this.Execute() function, but this.auth variable is undefined, why is that
linked to: http://stackoverflow.com/q/20279484
has title: Javascript subclass doesnt inherit parent variable
linked to: http://stackoverflow.com/q/17392857
has comment: http://stackoverflow.com/comment/39261677
type: Question

http://stackoverflow.com/a/25136703
score: -2
answers question: http://stackoverflow.com/q/25136561
has body: Try this: Fiddle here This code doesn't freezes browser and I've checked it and it works perfectly. Hope to get vote up for the code.
downvote count: 2
type: Answer
upvote count: 0

http://stackoverflow.com/comment/39146103
score: 0
has text: @MikeC C I looked good, where is Your result do Non-Stop ? Just Time Count Down and after do some msg. For shop function but not for me.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25146841

http://stackoverflow.com/a/25174760
has body: I’ve made a library for just that called jsesc. From its README: This is a JavaScript library for escaping JavaScript strings while generating the shortest possible valid ASCII-only output. Here’s an online demo. This can be used to avoid mojibake and other encoding issues, or even to avoid errors when passing JSON-formatted data (which may contain U+2028 LINE SEPARATOR, U+2029 PARAGRAPH SEPARATOR, or lone surrogates) to a JavaScript parser or an UTF-8 encoder, respectively. For your specific example, use it as follows: var stringVar = 'Hällö Würld.'; var resultStringVar = jsesc(stringVar, { 'json': true, 'wrap': false });
answers question: http://stackoverflow.com/q/25172861
has comment: http://stackoverflow.com/comment/39212511
score: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39253355
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/25172861
downvote count: 0

html5-video
tags question: http://stackoverflow.com/q/25128762
tags question: http://stackoverflow.com/q/25184464
tags question: http://stackoverflow.com/q/25077238
tags question: http://stackoverflow.com/q/25084502
tags question: http://stackoverflow.com/q/25092969
tags question: http://stackoverflow.com/q/25151814
tag name: html5-video
type: Tag
tags question: http://stackoverflow.com/q/25091972
tags question: http://stackoverflow.com/q/25173581
tags question: http://stackoverflow.com/q/25105414

http://stackoverflow.com/comment/39269669
has text: @JaredFarrish We will still have the same problem if I don't have a reliable way to tell if the eyes are open or closed... ;-)
score: 0
comment on: http://stackoverflow.com/q/25213390
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39157984
has text: What you have tried? you should also show that.
comment on: http://stackoverflow.com/q/25153526
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39239311
has text: use `break` statement, will "jumps out" of a loop.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25197257

http://stackoverflow.com/comment/39104176
comment on: http://stackoverflow.com/q/25124476
has text: can you setup a jsfiddle
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/39295980
type: QuestionComment
has text: Not if you wrap that code in a function. Something like: var loadMyDate = function(){service.get();}. In your controller you call that function the first time, and when the button is clicked call it again.
comment on: http://stackoverflow.com/q/25227460
score: 0
type: Comment

http://stackoverflow.com/a/25096649
has comment: http://stackoverflow.com/comment/39052149
has comment: http://stackoverflow.com/comment/39052194
type: Answer
has body: You are mixing the two apis.It must be mysqli_real_escape_string instead of mysql_real_escape_string.
has comment: http://stackoverflow.com/comment/39052084
has comment: http://stackoverflow.com/comment/39052179
has comment: http://stackoverflow.com/comment/39052097
answers question: http://stackoverflow.com/q/25096125
score: 0
has comment: http://stackoverflow.com/comment/39052121

http://stackoverflow.com/q/25090140
has comment: http://stackoverflow.com/comment/126104019
downvote count: 0
score: 6
linked to: http://stackoverflow.com/q/27688804
type: Question
has comment: http://stackoverflow.com/comment/39041348
tagged with: express-generator
upvote count: 6
tagged with: javascript
tagged with: express
has comment: http://stackoverflow.com/comment/39040562
has comment: http://stackoverflow.com/comment/39040968
has comment: http://stackoverflow.com/comment/39042815
answer count: 1
favorite count: 0
has body: I have started a node.js app with the express-generator, I have a strange issue where I can't view a page via the browser twice, first time it loads fine, second time it doesn't as the node process ends with the following error: GET / 304 412ms events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:988:11) at Process.ChildProcess._handle.onexit (child_process.js:779:34) package.json { "name": "example01-express", "version": "0.0.1", "private": true, "scripts": { "start": "node-dev ./bin/www" }, "dependencies": { "body-parser": "~1.0.0", "cookie-parser": "~1.0.1", "debug": "~0.7.4", "express": "~4.2.0", "jade": "~1.3.0", "morgan": "~1.0.0", "node-compass": "0.2.3", "static-favicon": "~1.0.0" }, "devDependencies": { "grunt": "^0.4.5", "grunt-contrib-cssmin": "*", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-sass": "*", "grunt-contrib-uglify": "*", "grunt-contrib-watch": "*", "grunt-cssc": "*", "grunt-htmlhint": "*", "matchdep": "*" } }
has answer: http://stackoverflow.com/a/25467979
accepted answer: http://stackoverflow.com/a/25467979
linked to: http://stackoverflow.com/q/55033450
has title: spawn ENOENT node.js error
tagged with: node.js
has comment: http://stackoverflow.com/comment/39040902
type: AnsweredQuestion

http://stackoverflow.com/q/25176566
has comment: http://stackoverflow.com/comment/39220393
type: Question
has title: Webgl using coordinates from a texture
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25191748
tagged with: colors
type: AnsweredQuestion
has body: In webgl I created a scene where I have 4 objects, and I added different textures on each of them. Each texture is passed on to the shader via uniform variables. I am trying to make half of one of my objects red. But every time I try to change half of one of the objects to red, i somehow get the half of every texture red. The following is what I have in my fragment shader at the moment. varying vec2 vTextureCoord; uniform sampler2D Texture2; vec4 a = texture2D(Texture2, vTextureCoord); if(a.t&gt;0.5) { gl_FragColor = vec4(1.0,0.0,0.0,1.0) } else { gl_FragColor = vec4(t.x,0.0,0.0,1.0) } So to sum up my question, how can I get half of only one of my textures to red? Thank you
tagged with: shader
tagged with: webgl
accepted answer: http://stackoverflow.com/a/25191748

http://stackoverflow.com/comment/39250693
type: AnswerComment
type: Comment
has text: @Quentin But we know it will never return undefined, don't we?
comment on: http://stackoverflow.com/a/25203642
score: 2

http://stackoverflow.com/q/25134285
has comment: http://stackoverflow.com/comment/39122028
linked to: http://stackoverflow.com/q/8043026
has title: How to display 2 digits numbers of time left [countdown jquery]?
answer count: 2
has answer: http://stackoverflow.com/a/25134415
downvote count: 0
has answer: http://stackoverflow.com/a/25134353
accepted answer: http://stackoverflow.com/a/25134353
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
upvote count: 4
tagged with: css
type: AnsweredQuestion
has body: How to display 2 digits numbers of time left [countdown jquery] ? My code will show 66days7hours6minutes2seconds but I want to display 2 digits number e.g. 66days07hours06minutes02seconds how to do that ? http://jsfiddle.net/D3E9G/
possible better answer: http://stackoverflow.com/a/25134415
type: Question

http://stackoverflow.com/q/25161528
tagged with: javascript
tagged with: jquery
has title: Jquery next() is not working
has comment: http://stackoverflow.com/comment/39172475
score: 0
has answer: http://stackoverflow.com/a/25161642
accepted answer: http://stackoverflow.com/a/25161642
possible better answer: http://stackoverflow.com/a/25161675
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39172456
has answer: http://stackoverflow.com/a/25161776
has answer: http://stackoverflow.com/a/25161675
type: Question
has answer: http://stackoverflow.com/a/25161660
has body: I have and this js $('.prodtable').on('blur','.editok',function(){ var neuanzahl = $(this).val(); $(this).parent('td').text(neuanzahl);//<-- till here works fine $(this).parent('td').next().find('input').val(neuanzahl);//<-- from here, failure $(this).parent('td').next().find('i').addClass('icon-pencil'); }); the editok input was inserted dynamically, thats why i am setting the handler from parent table. my problem is, on blur event, the value of the given input should be put in the next input which is inside the next td with name prodnumger and the should get the class icon-pencil. I am trying for 1 hour now, what a shame.. not a single success. what am I doing wrong here?
has comment: http://stackoverflow.com/comment/39172508

http://stackoverflow.com/q/25097163
tagged with: anchor
has body: I have an overlay div (rb-overlay) that appears when users click on an option on the page. The overlay covers the page 100% and has a close button in the top right hand corner. At the end of the text on this overlay (See code below) I want to place a link to another page in the site. This link doesn't respond presumably because the overlay is in the way. Any ideas? close Make Up and Go £20.00 What's involved Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur hendrerit tempor dui, vel eleifend metus. Pellentesque blandit vestibulum laoreet. Donec dapibus ligula at risus ullamcorper, nec posuere sapien malesuada. Nam tortor nulla, aliquam sit amet aliquet at, malesuada ac sapien. Nam sed diam id velit feugiat egestas vitae non lacus. Duis pulvinar, ligula sit amet rhoncus imperdiet, nisi orci mollis mauris, ut semper nunc magna ut velit. Click here to go to Make Up Services Section
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25097196
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25097256
tagged with: http://stackoverflow.com/tag/html
has title: <a href> tag on overlay div doesn't respond
type: UnansweredQuestion
tagged with: overlay

http://stackoverflow.com/comment/39056325
score: 0
type: AnswerComment
has text: that should be a for loop not a while.
type: Comment
comment on: http://stackoverflow.com/a/25098907

http://stackoverflow.com/comment/39003605
type: Comment
comment on: http://stackoverflow.com/a/25070328
has text: Yes, but how can i add the variable objects to an array? Not as a string.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25203404
type: Question
has comment: http://stackoverflow.com/comment/39250607
answer count: 2
has body: I have a simple site that collects local beach weather data from an xml feed and displays it in a mobile friendly site (rannailm.com) using javascript. Could someone please help me with a simple way to add alphabetical sorting to this list based on "koht" (meaning location) variable. I've messed something up no mater what I've tried. My current script below: &lt;script type="text/javascript"&gt; $(function () { $.getJSON('http://rannailm.com/g4s.json', function (data) { var temperatures = data; var listItems = $.map(temperatures, function (item) { if (!item.IsHidden) { var koht = !item.KohtFixed ? item.Koht : item.KohtFixed; return $('&lt;li class="m-item"&gt;') .append( $('&lt;h3 class="m-header"&gt;').append($('&lt;a&gt;').html(koht + " " + item.Vesi)), $('&lt;div class="m-content"&gt;') .append($('&lt;div class="m-inner-content"&gt;') .append($('&lt;img&gt;').attr("src", getImage(item.Ilm)).attr("alt", item.Ilm).addClass("ilmIkoon")) .append($('&lt;img&gt;').attr("src", getImage(item.Lipp)).attr("alt", item.Lipp).addClass("lipp")) .append($('&lt;p&gt;').html("ÕHK " + item.Temp)) .append($('&lt;p&gt;').html("RAHVAST " + item.Rahvast)) .append($('&lt;h5&gt;').html("Viimati uuendatud " + item.Aeg)))); } }); $('#temp-list').empty().append(listItems); $('.m-bellows').bellows(); }); }); &lt;/script&gt;
tagged with: javascript
tagged with: jquery
tagged with: sorting
has comment: http://stackoverflow.com/comment/39250375
score: 0
linked to: http://stackoverflow.com/q/1129216
has comment: http://stackoverflow.com/comment/39251336
accepted answer: http://stackoverflow.com/a/25203458
has answer: http://stackoverflow.com/a/25203935
possible better answer: http://stackoverflow.com/a/25203935
tagged with: alphabetical-sort
tagged with: alphabetical
has title: Simple abc sorting for javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39250210
has answer: http://stackoverflow.com/a/25203458

http://stackoverflow.com/a/25115076
upvote count: 12
has body: Simply add the disabledattribute to your input. &lt;input disabled type='hidden' value="192" data-init-text='Bla bla' name="input" id="test" style="width:300px;" /&gt; $(document).ready(function() { $('#test').select2({ minimumInputLength: 3, placeholder: "Search", ajax: { url: "http://www.weighttraining.com/sm/search", dataType: 'jsonp', quietMillis: 100, data: function(term, page) { return { types: ["exercise"], limit: -1, term: term }; }, results: function(data, page ) { return { results: data.results.exercise } } }, formatResult: function(exercise) { return "&lt;div class='select2-user-result'&gt;" + exercise.term + "&lt;/div&gt;"; }, formatSelection: function(exercise) { return exercise.term; }, initSelection : function (element, callback) { var elementText = $(element).attr('data-init-text'); callback({"term":elementText}); } }); }); &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/select2/3.2.0/select2.min.js"&gt;&lt;/script&gt; &lt;input disabled type='hidden' value="192" data-init-text='Bla bla' name="input" id="test" style="width:300px;" /&gt;
score: 12
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25114898
accepted answer of: http://stackoverflow.com/q/25114898

http://stackoverflow.com/a/25213097
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25212957
has comment: http://stackoverflow.com/comment/39269543
score: 5
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39269104
type: Answer
has body: First, you have to convert the URL-encoded characters into regular ones, which Jared Farrish has kindly done with a bit of PHP wizardry. If you need to do this in the future, you can try this online URL encoder/decoder. That gives you this JavaScript blob: javascript:var multiURL=""; $('div.titlebox').find('ul.subreddits').find('a').each(function() { multiURL += $(this).text().substr(3) + "+"; }); multiURL = multiURL.substr(0,multiURL.length-1); window.open('http://www.reddit.com/r/'+multiURL);void(0); Formatted and converted to proper JS: var multiURL = ""; $('div.titlebox').find('ul.subreddits').find('a').each(function () { multiURL += $(this).text().substr(3) + "+"; }); multiURL = multiURL.substr(0, multiURL.length - 1); window.open('http://www.reddit.com/r/' + multiURL); Then, all that's left to do is use userscript notation and save it in a file with a name that ends in .user.js (important). // ==UserScript== // @name Author's Name // @namespace Place where file is stored // @include Place(s) where userscript should run // ==/UserScript== var multiURL = ""; $('div.titlebox').find('ul.subreddits').find('a').each(function () { multiURL += $(this).text().substr(3) + "+"; }); multiURL = multiURL.substr(0, multiURL.length - 1); window.open('http://www.reddit.com/r/' + multiURL); It's important to note that this will run at every address listed with @include, so you might want to consider injecting a button or something onto relevant pages so that it doesn't run unnecessarily.
has comment: http://stackoverflow.com/comment/39269654
has comment: http://stackoverflow.com/comment/39269140
answers question: http://stackoverflow.com/q/25212957

http://stackoverflow.com/q/25223832
tagged with: arrays
tagged with: javascript
has title: Searching array of objects not returning desired result
score: 0
has body: I am working on a project of mine where I have this contact list contacts which is an array containing objects. The problem is that my function searchPerson always returns the response for the condition of the searched for person not existing. As soon as I remove the condition and call the function again it returns what was searched for. I don't understand why with the condition it always return no such person found! when that person exists in the contact list! Can anyone help me understand why this is happening? This is my code. var bob = { firstName: "Bob", lastName: "Jones", phoneNumber: "(650) 777-7777", email: "bob.jones@example.com" }; var mary = { firstName: "Mary", lastName: "Johnson", phoneNumber: "(650) 888-8888", email: "mary.johnson@example.com" }; //Here we populate ou array. var contacts = [bob, mary]; function printPerson(person) { console.log(person.firstName + " " + person.lastName); } function searchPerson (lastName) { var contactsLength = contacts.length; for(var i = 0; i &lt; contactsLength; i++){ //set a condition that we only retrieve the last name if it already exists in out contact list if(lastName !== contacts[i].lastName){ return console.log("No such person found!"); } else { printPerson(contacts[i]); } } }
has comment: http://stackoverflow.com/comment/39288988
tagged with: javascript-objects
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25224015
has answer: http://stackoverflow.com/a/25223849
accepted answer: http://stackoverflow.com/a/25223849
type: Question
has answer: http://stackoverflow.com/a/25224015
answer count: 2
tagged with: function

http://stackoverflow.com/comment/39095233
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25119615
type: Comment
has text: What exactly didn't you understand from code of the linked thread? You can use the DOM-Inspector for Firefox to understand what your linked thread talked about. For that create a very simple html page. The DOM-Inspector can show the elements hirachy of your created site.

http://stackoverflow.com/a/25095523
type: Answer
has body: You are initialising values at the time the page is loaded. If you want to use the current contents of the inputs, you need to do that at the time of the click. The simplest option is probably to put it in a function: function getvalues() { var values = new Array(); values[0] = new Array(); values[0][0] = "place"; values[0][1] = document.getElementById("place").value; return values; } then instead of values, use getvalues(): onclick="getfind('folder/nextstep.php',getvalues());"
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25095413
answers question: http://stackoverflow.com/q/25095413
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/a/25221222
downvote count: 1
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/25221186
type: Answer
has body: Best way to do this is to prototype the functions functionon Car(make) { this.make = make; this.noises = ["vroom", "woosh"]; this.addNoise(); } Car.prototype.addNoise = function() { this.noises.push("wham"); } var myCar = new Car("honda"); console.log(myCar.noises[2]);

http://stackoverflow.com/comment/39324138
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25206261
type: Comment
has text: If i need to add more objects or change the shape of the existing objects from a square to any n-sided polygon, what changes do i need to make and where??

http://stackoverflow.com/q/25174724
favorite count: 0
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25174750
upvote count: 1
type: Question
has title: JS Fullcalendar background color not setting
tagged with: javascript
tagged with: fullcalendar
has body: I am trying to set the background color of an event with FullCalendar JS http://arshaw.com/fullcalendar/ Here is my JS: &lt;script&gt; $('#calendar').fullCalendar({ events: [ { title: 'Test', start: '2014-08-07', url: '#', backgroundColor: '#FF0000', editable: true }, ] }); &lt;/script&gt; And here is what that produces Why is it not producing the result I want, the event background colored as red.
accepted answer: http://stackoverflow.com/a/25174750
downvote count: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/a/25080972
has body: I ran into a similar situation for displaying user information a while ago with my ionic app. I don't have my original source code in front of me but I'm pretty sure this is how you need to do it. angular.module('starter.controllers', []) .controller('SettingsCtrl', function($scope, $ionicPlatform) { this.toggle = true; // make sure its defined somewhere $scope.ni_toggle = function() { return this.toggle; } $scope.updateLocalStorage = function() { window.localStorage.setItem( 'has_national_insureance', $scope.ni_toggle ); console.log($scope.ni_toggle); } }); Hope this gets you going in the right direction. EDIT See ExpertSystem's answer. He answered it way better than I could.
type: Answer
answers question: http://stackoverflow.com/q/25080212
score: 0

http://stackoverflow.com/comment/39219140
type: Comment
type: AnswerComment
has text: by adding `if(typeof myView != 'undefined') { myView.refresh(); }` this in else condition resolve the issue thankx
comment on: http://stackoverflow.com/a/25185907
score: 0

http://stackoverflow.com/comment/39286211
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25222267
type: Comment
has text: @runTarm - no, it returns error "TypeError: Cannot read property 'total_rating' of undefined".

http://stackoverflow.com/comment/39277660
type: Comment
comment on: http://stackoverflow.com/q/25217336
has text: You need to use a closure to store the argument.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39047426
has text: Sorry for not explaining. The trouble I am having is that I don't know how to detect the P tag being added (when I hit Enter) in the contenteditable. If I can get access to that tag then I can add in the attribute.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25093883
score: 0

http://stackoverflow.com/comment/39248286
type: QuestionComment
comment on: http://stackoverflow.com/q/25198155
score: 0
has text: Are you referring to clicking a link and having the URL open in a new tab? If so, you can use the `target` attribute of the anchor tag. Simply set the value to `_blank`
type: Comment

http://stackoverflow.com/q/25145592
has comment: http://stackoverflow.com/comment/39143363
type: Question
possible better answer: http://stackoverflow.com/a/25145742
has answer: http://stackoverflow.com/a/25145663
has comment: http://stackoverflow.com/comment/39143917
tagged with: javascript
tagged with: jquery
has title: Call a method every X seconds with different parameters
accepted answer: http://stackoverflow.com/a/25145663
has answer: http://stackoverflow.com/a/25145718
answer count: 4
has comment: http://stackoverflow.com/comment/39143453
has answer: http://stackoverflow.com/a/25145683
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39144077
score: 0
has answer: http://stackoverflow.com/a/25145742
has body: FYI: I know there are many "how can you call a method every X seconds using JavaScript" questions out there; this is slightly different so please don't mark as duplicate unless it truly is. Problem: I have a method move that takes in a direction parameter (i.e. r,l,u,or d). I want to call my move method every X seconds with one parameter, but I want it to "cancel" the current move interval that's running any other parameter. For example, if I'm running move('r') every 1 second, and then I trigger the move('d') event to run every 1 second, I want to cancel the move('r') method. Code: $(document).keydown(function(event) { if(event.which == RIGHT){ window.setInterval(function(){ //CANCEL OTHER CURRENT "MOVES" HERE move('r'); }, 500); } else if (event.which == LEFT) { window.setInterval(function(){ //CANCEL OTHER CURRENT "MOVES" HERE move('l'); }, 500); } else if (event.which == UP){ window.setInterval(function(){ //CANCEL OTHER CURRENT "MOVES" HERE move('u'); }, 500); } else if (event.which == DOWN){ window.setInterval(function(){ //CANCEL OTHER CURRENT "MOVES" HERE move('d'); }, 500); } }); Edit Thanks all for the awesome answers. A slight combination of a few answers below allowed me to finish up my project (well, almost) - http://jsfiddle.net/thomasmclaughlin/8c9ww/ - Thanks again!

http://stackoverflow.com/comment/39283818
comment on: http://stackoverflow.com/a/25220876
score: 0
type: Comment
has text: The result of .set() isn't a promise result is it?
type: AnswerComment

http://stackoverflow.com/a/25160241
has comment: http://stackoverflow.com/comment/39169861
has comment: http://stackoverflow.com/comment/39169764
downvote count: 0
answers question: http://stackoverflow.com/q/25159999
type: Answer
score: 1
upvote count: 1
has body: Use remove() on parent(). here is the Fiddle $(this).parent().remove(); Also, dont use same ID for multiple items, ID is meant to be unique. Hence updated a bit of HTML

http://stackoverflow.com/a/25217521
score: 1
has body: The main issue with the original code, is that the objects dragged transform isn't taken into account when placing the final transform (on mouse up). The simplest quick fix would probably be to do something like add 3 dots '...' to the transform, like this.transform("...t"+(tX)+","+(tY +30)); This would mean translate taking into account previous transformation. Here's a fiddle showing this running. However, the general code feels like it could be simplified as well, like in the fiddle here. The logic seems to be that the object is dragged, then both positions of objects calculated and dragged difference calculated. However, if you already know the object you want it to join, you know its transform, it doesn't actually matter where the dragged object is. It will always end up next to the target object, so no calculations really are needed. This may not quite be correct if this is just part of a larger problem where the original code needs to be in place. I personally would stick to one path essentially cloned or identical (so all have the same starting x,y), however this is a bit of a personal taste thing, and depends on what other problems you may face later. It may be less optimal to have transforms, and flatten the transforms just into the path itself. There's a few bits out there on transforms in general, which I would read up on first, and then once SVG transforms understood (if not already), then look towards Raphael transform strings. The main Raphael transform string info can be found here
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25194243
type: Answer
accepted answer of: http://stackoverflow.com/q/25194243
upvote count: 1
has comment: http://stackoverflow.com/comment/39288337

http://stackoverflow.com/q/25105392
tagged with: c#
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25105429
has title: Using C# expressions in WPF binding
answer count: 1
has comment: http://stackoverflow.com/comment/39074533
favorite count: 0
upvote count: 2
tagged with: mvvm
has comment: http://stackoverflow.com/comment/39095365
tagged with: wpf
has answer: http://stackoverflow.com/a/25105429
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39088398
score: 1
has comment: http://stackoverflow.com/comment/39068249
has comment: http://stackoverflow.com/comment/39074256
downvote count: 1
type: Question
has body: Consider that my ViewModel has the IsBusy propery. Is it possible to have such binding in WPF? &lt;ProgressBar Visiblity="{Binding IsBusy}" ... /&gt; &lt;Button Visiblity="{Binding !IsBusy}" .../&gt; Note that I've bound Button's visibility to !IsBusy (Not Busy). I used to have this on JavaScript MVVM frameworks like knockout. The expression could be more complex like: &lt;Button Text="IsBusy &amp;&amp; !HasError ? true : false"/&gt;

http://stackoverflow.com/q/25094195
type: Question
has comment: http://stackoverflow.com/comment/39048453
tagged with: javascript
has comment: http://stackoverflow.com/comment/39047965
has comment: http://stackoverflow.com/comment/39048262
has comment: http://stackoverflow.com/comment/39048033
downvote count: 0
has comment: http://stackoverflow.com/comment/39050695
has body: I am attempting to create a very simple unit test for an angular controller however I am finding a lot of different information with regards to mocking a service giving different approaches with a majority of the examples revolving around the dependency being $http. I have a very basic service for managing 'bugs' within my app, it essentially provides a basic API for local storage management. My controller looks like: Controller: var app = angular.module('bugTrackerApp.controllers', []); app.controller('App', ['$scope', 'bugsAPI', function ($scope, bugsAPI) { $scope.addBug = function() { bugsAPI.addBug($scope.bug); $scope.setEmptyBug(); } $scope.setEmptyBug = function(){ $scope.bug = {}; $scope.bug.status = 1; $scope.bug.assignee = null; $scope.bug.dateAdded = new Date(); } $scope.setEmptyBug(); }]); The test I have created looks like: describe('Controllers', function(){ var scope, controller, mockBugsAPI; beforeEach(module('bugTrackerApp.controllers', function($provide){ mockBugsAPI = jasmine.createSpyObj('bugsAPI', ['addBug']); $provide.value('bugsAPI', mockBugsAPI); })); describe('App Controller', function () { beforeEach(inject(function ($rootScope, $controller) { scope = $rootScope.$new(); controller = $controller('App', { '$scope': scope }); })); it('should be defined....', function() { expect(controller).toBeDefined(); }); it('should define a bug....', function() { expect(scope.bug).toBeDefined(); }); it('should set defaults on the initialised bug....', function() { expect(scope.bug.status).toBe(1); expect(scope.bug.assignee).toBe(null); expect(scope.bug.dateAdded instanceof Date).toBe(true); }); it('should be able to add a bug....', function() { scope.addBug(scope.bug); expect(mockBugsAPI.addBug).toHaveBeenCalled(); }); }); }); Is this a good approach? I create a spy object of the service and then use $provide to make sure this spy object is injected instead of the real service.
has comment: http://stackoverflow.com/comment/39048312
has comment: http://stackoverflow.com/comment/39051192
score: 1
has comment: http://stackoverflow.com/comment/39048140
tagged with: jasmine
favorite count: 0
has title: Testing an angular controller with a service dependency
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39047994
has comment: http://stackoverflow.com/comment/39048618
answer count: 0
has comment: http://stackoverflow.com/comment/39051270
upvote count: 1
tagged with: unit-testing

http://stackoverflow.com/comment/39121066
score: 0
type: QuestionComment
has text: Have you wrapped your jQuery script with $(document).ready(function() { /* code here */ }); ?
type: Comment
comment on: http://stackoverflow.com/q/25133690

http://stackoverflow.com/a/25211360
downvote count: 0
has body: From Meteor docs When declaring functions, keep in mind that function x () {} is just shorthard for var x = function () {} in JavaScript. Which means that you are scoping your functions to the file, rather than the app. Try this instead. Welcome = function () { console.log("main"); }; Ups = function () { this.query = {}; this.creteria = {sort: {JB_owner: 0}, limit: 500, skip: 0, fields: {ClusterId: 0}}; console.log("UPS"); };
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39330279
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25210870
score: 2
accepted answer of: http://stackoverflow.com/q/25210870

http://stackoverflow.com/q/25141869
tagged with: ng-bind
tagged with: angularjs
score: 2
type: AnsweredQuestion
has body: Think I'm missing something simple here but here's my issue: Doesn't work - if ng-bind replaces the content inside the tag, then would I have to use the {{}} syntax instead? Like so, {{example.heading}} I like the idea of the brackets not flashing up briefly so I picked ng-bind. Is there another way around this?
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25141911
possible better answer: http://stackoverflow.com/a/25142007
has answer: http://stackoverflow.com/a/25142007
has title: AngularJS nested ng-bind on elements
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25141911

http://stackoverflow.com/comment/39132938
score: 1
comment on: http://stackoverflow.com/a/25139554
type: AnswerComment
has text: @exantas the reason this got downvoted is because it's a bad practice to do this ánd, as can be read in the comments on AJM's response :-) Putting a nail into a wall with your head doesn't make it a hammer... it makes it very sore. **But it does work!**
type: Comment

http://stackoverflow.com/comment/69426429
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25191003
has text: Try touch start and touch end events.
score: 0

http://stackoverflow.com/q/25178718
has comment: http://stackoverflow.com/comment/39204246
score: 0
has answer: http://stackoverflow.com/a/25179135
has answer: http://stackoverflow.com/a/25178821
has answer: http://stackoverflow.com/a/25178769
has body: I am trying to create some sort of menu. I have managed to create "collapsing" ul elements, but can't figure out how to set ul elements to be hidden on load Displayed Hidden Hidden jquery $(".error").click(function () { $(this).next("ul").toggle("slow");}); here is my sample with collapsing ul elements http://jsbin.com/povafivu/1/edit?html,js,output Thanks
tagged with: http://stackoverflow.com/tag/html
answer count: 4
possible better answer: http://stackoverflow.com/a/25178769
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39204264
type: Question
accepted answer: http://stackoverflow.com/a/25178817
tagged with: javascript
tagged with: jquery
has title: Hidden ul elements on load, display on click
has comment: http://stackoverflow.com/comment/39204252
has answer: http://stackoverflow.com/a/25178817

http://stackoverflow.com/a/25109355
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25109312
answers question: http://stackoverflow.com/q/25109312
has body: You wouldn't be able to use prop as a key-variable for the object you're passing to .css(). In this case, it would translate to a literal string 'prop'. Instead, you'd have to do something like: jQuery(target).css(prop,value); Note: be careful about that trailing comma in that hash (after value). Some browsers will error at that point.
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39282701
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25220231
has text: Ummm, so I replicated your setup here: http://jsfiddle.net/xf1dhorw/ and when I click the button, the page successfully submit to example.com. This seems like the correct behavior. What were you expecting?

http://stackoverflow.com/comment/39053798
comment on: http://stackoverflow.com/a/25097269
score: 0
type: AnswerComment
type: Comment
has text: Hmm...it logs exactly what it should be returning. `$('.frame').html2canvas({ onrendered: function (canvas) { //Set hidden field's value to image data (base-64 string) $('#img_val').val(canvas.toDataURL('image/png')); //Submit the form manually document.getElementById('myForm').submit(); } });`

http://stackoverflow.com/q/25164768
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/25164997
has comment: http://stackoverflow.com/comment/39179655
tagged with: internet-explorer-8
tagged with: javascript
has comment: http://stackoverflow.com/comment/39179717
has comment: http://stackoverflow.com/comment/39179129
has body: To start, I have never had this issue before, and I am baffled by this. I have searched, but this 'Object expected' error refers to a lot of different things. I am only getting this error in IE8, not in Chrome or Firefox, however I have not tried any previous or later versions of IE. Here is the start of my code: Company Acronym List var ACRONYM_CSV_LIST = '/acronyms/acronyms.csv'; var globalAcronymList = []; console.log ('Initiating script'); function xmlGet ( url, callback ) { console.log ('Inside the Get method'); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if ( xmlhttp.readyState==4 && xmlhttp.status==200 ) { callback( xmlhttp.responseText ); } } xmlhttp.open("GET", url, true); xmlhttp.send( ); } function commit () { console.log('Commit started'); var acronymSpan = document.getElementById('acronym-span'); acronymSpan.style.color = '#eee'; initLoadAcronymCsvList (); } function initLoadAcronymCsvList () { console.log ('Starting the XML Get'); xmlGet( ACRONYM_CSV_LIST, acronymCsvListCallback ); } I am getting the 'Error: Object expected' message right at the var xmlhttp = ... line. In fact, IE8 points right to the 'v' in the var keyword as being the error. Why!? For sanity's sake, I even added some console tracing. The commit() function is placed in the tag, so when the page loads, I see the following console trace: Initiating script Commit started Starting the XML Get Inside the Get method And then boom! Just by using the var keyword I get an IE8 error. I tried changing the name of the variable too ... and nothing! I checked for semicolons and everything, and from the code snippet above, you should be able to see the code flow from where execution starts to where it fails. I even broke the script out into its own separate file. Is there a known issue I can refer to solve this?
has title: IE8 Getting Object expected error - occurring on var keyword declaring XMLHttpRequest object
upvote count: 1
has comment: http://stackoverflow.com/comment/39179590
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/2363212
type: UnansweredQuestion

http://stackoverflow.com/q/25136503
tagged with: authentication
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: google-plus
has answer: http://stackoverflow.com/a/25137805
has body: My website asks for Google+ authentication as follows - However, I would like to make it look like to stack overflow - There are two things to do - 1) Change This app to My App Name 2) I only want to have View your email address and View your basic profile info I am using Google Plus Sign In with following scopes - https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email I learned from https://developers.google.com/+/web/signin/
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Google Authentication with Custom App Name

http://stackoverflow.com/q/25103796
tagged with: php
linked to: http://stackoverflow.com/q/4897276
has body: I'm new to websockets and I'm facing a problem that I can't manage to fix. I've downloaded server and client from the web and modified it to have it working my way. The problem is I want to store users' data(e.g. name,color, whatever) on the serverside. When I want to spread the message from one user to all other users it sometimes works and sometimes it doesn't. Funny thing is that it reads user's id perfectly every time but sometimes it looses name or color, which all are, in fact, the fields of the same class and I don't see the difference... Please help. Server: <?php /** * Simple server class which manage WebSocket protocols * @author Sann-Remy Chea <http://srchea.com> * @license This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. * @version 0.1 */ class Server { /** * The address of the server * @var String */ private $address; /** * The port for the master socket * @var int */ private $port; /** * The master socket * @var Resource */ private $master; /** * The array of sockets (1 socket = 1 client) * @var Array of resource */ private $sockets; /** * The array of connected clients * @var Array of clients */ private $clients; /** * If true, the server will print messages to the terminal * @var Boolean */ private $verboseMode; private $maxConnections = 3; /** * Server constructor * @param $address The address IP or hostname of the server (default: 127.0.0.1). * @param $port The port for the master socket (default: 50…
has title: php websocket looses user's data only sometimes
type: Question
tagged with: javascript
score: 0
answer count: 1
tagged with: websocket
has answer: http://stackoverflow.com/a/25103920
type: UnansweredQuestion
tagged with: sockets

http://stackoverflow.com/comment/39285672
comment on: http://stackoverflow.com/q/25221872
score: 0
type: Comment
has text: Nevermind, I just figured out the resize. Thanks for the help, Jon!
type: QuestionComment

http://stackoverflow.com/comment/39123952
score: 0
type: Comment
has text: @yuvraj - sure - take a look here for a good introduction: http://bost.ocks.org/mike/bar/ . You can also get the content of Scott Murray's 'Interactive Data Visualization For the Web' freely online on his blog - http://alignedleft.com/tutorials/d3/adding-elements
type: AnswerComment
comment on: http://stackoverflow.com/a/25133187

http://stackoverflow.com/a/25204710
has comment: http://stackoverflow.com/comment/39253331
has comment: http://stackoverflow.com/comment/39328784
has body: The children of a SelectElement are OptionElements. Therefore you need to give in OptionElements. void onDropDownLoaded(String response) { SelectElement dropDown = querySelector("#asset"); Map jsonObject = JSON.decode(response) as Map; List<Map> dropDownList = jsonObject["serviceResponseValue"] as List<Map>; for(Map d in dropDownList) { dropDown.children.add(new OptionElement(data: d['displayName'], value: d['id'])); } } The code, takes every object out of the parsed JSON objects "serviceResponseValue" and creates a new OptionElement where the data that is shown to the user is the text behind the key "displayName", which in your example turns out to be Domains registered during the last 36 hours, and for the value, which you use to identify an option from the others, I have chosen the "id" text, which will give you in your html an option that will look like: Domains registered during the last 36 hours
score: 2
answers question: http://stackoverflow.com/q/25203920
has comment: http://stackoverflow.com/comment/39329384
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39328197
accepted answer of: http://stackoverflow.com/q/25203920
type: Answer
upvote count: 2

http://stackoverflow.com/comment/39119813
type: AnswerComment
has text: Thanks! I used to think running selenium would be like running "thinapp" version of each browsers without vmware like environment.
type: Comment
comment on: http://stackoverflow.com/a/25130827
score: 0

http://stackoverflow.com/comment/39082962
type: Comment
has text: Use Robby's method then, or use the Lodash library's [Filter](http://lodash.com/docs#filter) function.
comment on: http://stackoverflow.com/a/25092772
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39180182
type: QuestionComment
has text: hmmm ok. Can you point me in the right direction on where i can find out how to do that? I did some searching, and from the looks of it, i need to create an object, but im still not sure if this is what you are suggesting I do.
score: 0
comment on: http://stackoverflow.com/q/25153516
type: Comment

http://stackoverflow.com/q/25085103
has comment: http://stackoverflow.com/comment/39030977
has comment: http://stackoverflow.com/comment/39075650
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/34200248
tagged with: parse-platform
upvote count: 2
type: UnansweredQuestion
has body: I have a simple collection of contacts within on a table in parse.com, first name, last name and date of birth. I am trying to access the actual date of birth in the cloud code as I wish to do some amending on it and pass a result back based on what it is, I want to convert it into seconds. Parse.Cloud.define("getNewestContact", function(request, response) { var currentdate = new Date(); var query = new Parse.Query("contact"); query.descending("createdAt"); query.limit(1); query.find({ success: function(results) { // results is an array of Parse.Object. for (var i = 0; i &lt; results.length; i++) { var contact = results[i]; console.log(contact); console.log(contact.get("dateOfBirth")); } response.success(results); }, error: function(error) { // error is an instance of Parse.Error. response.error(error); } }); }); console.log(contact) returns: {"FirstName":"Joe","dateOfBirth":{"__type":"Date","iso":"2011-08-03T16:38:00.000Z"},"lastName":"Smith","status":"N","objectId":"xxxxxxxxx","createdAt":"2014-08-01T13:21:10.728Z","updatedAt":"2014-08-01T16:38:18.631Z","__type":"Object","className":"contact"} console.log(contact.get("dateOfBirth")) returns: {"__type":"Date","iso":"2014-08-01T17:21:00.000Z"} So this is getting close, but how do I get access to just the iso value '2014-08-01T17:21:00.000Z' I have tried: contact.get("iso") contact.get("dateOfBirth").get("iso") contact.get("dateOfBirth")["iso"] contact.get("dateOfBirth").iso These all give blank results, one of these things which should be really obvious but much much time later is not proving to be :(
tagged with: object
score: 2
has comment: http://stackoverflow.com/comment/39038664
linked to: http://stackoverflow.com/q/24493745
type: Question
tagged with: cloud
tagged with: javascript
has comment: http://stackoverflow.com/comment/39042127
has title: parse.com cloud code access sub object _type

http://stackoverflow.com/comment/39217905
has text: As a general idea, what I veliece you want to do is `document.getSelection` or `window.getSelection` (based on the browser) to get the selection on the page. Next iterate through each of the selected node's parent nodes until you find a common parent node among all of the nodes that were selected. And if I understand you correctly you also want to make sure the common parent has a `nodeType = 1`.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25185786
type: Comment

http://stackoverflow.com/q/25219871
tagged with: sql
type: UnansweredQuestion
has title: Binary rating system with PHP and SQL without logging in
tagged with: php
has comment: http://stackoverflow.com/comment/39282545
answer count: 0
has comment: http://stackoverflow.com/comment/39284150
has comment: http://stackoverflow.com/comment/39283528
has comment: http://stackoverflow.com/comment/39282474
type: Question
tagged with: javascript
tagged with: jquery
has body: I am working on a simple Content Management System featuring posts that can be rated up or down, with a score and appearance similar to Reddit's system. The rating arrows trigger a javascript function like this: rateQuote(postID, value, this); PostID being the identifier of the referenced post, value being 1 for Up / 0 for Down and 'this' for jQuery DOM access. rateQuote() looks like this: function rateQuote(quoteId, rateValue, triggerElement) { if (localStorage.getItem(quoteId)) { return false; }; var scoreContainer = $(triggerElement).closest('.qcntscore').children('.qcntscore-span'); var scoreNumber = Number(scoreContainer.text()); if (rateValue == 1) { scoreNumber++; } else if (rateValue == 0) { scoreNumber--; }; scoreContainer.text(scoreNumber); localStorage.setItem(quoteId, rateValue); $(triggerElement).addClass('rating-active'); $.ajax({ url: "../rate.php", data: {quote: quoteId, ratevalue: rateValue}, datatype: "json", type: "POST", success: function(data) { if(data) {console.log(data);} } }); } So this is doing three things: Write to and read from HTML5 localStorage to block multiple votes Target the element (there can be multiple on one page), change the visuals and the score number respectively Trigger an AJAX request to rate.php, transmitting postIDand the value of the vote to it via POST. rate.php looks like this: &lt;?php include_once('parts/includer.php'); if(isset($_POST['quote'], $_POST['ratevalue'])) { $post = (int)$_POST['quote']; $rating = (int)$_POST['ratevalue']; if(in_array($rating, array(1, 0))) { //Is Rating valid? (0 or 1) if($rating == 0) { $rating = -1; } global $pdo; $query = $pdo-&gt;prepare("SELECT id FROM posts WHERE id = ?"); $query-&gt;bindValue(1, $post); $query-&gt;execute(); //Does the post exist? if($query-&gt;rowCount() &gt; 0) { //It does. echo 'Post Exists - '; //Check if Post is already mentioned. $query = $pdo-&gt;prepare("SELECT post_id FROM post_ratings WHERE post_id = ?"); $query-&gt;bindValue(1, $post); $query-&gt;execu…
tagged with: ajax
has comment: http://stackoverflow.com/comment/39284116
score: 0

http://stackoverflow.com/comment/39262176
has text: Appears, that `json_encode` passes string and not array. Tried to change to jquery array. Added `var data = $.parseJSON( data );` and now in drop down menu see correct number of numbers. But expected to see letters.
type: Comment
comment on: http://stackoverflow.com/a/25209010
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39073028
type: QuestionComment
has text: I know its not the correct regex expression, I tried various things but can't think of the right expression.
comment on: http://stackoverflow.com/q/25107905
score: 0
type: Comment

http://stackoverflow.com/comment/39013772
has text: what do you mean by list, is it string `"Dog\nCat\nHamster"`?
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25076300

http://stackoverflow.com/comment/39020378
comment on: http://stackoverflow.com/q/25079387
score: 0
type: Comment
type: QuestionComment
has text: That's interesting. I wonder if it's just a matter of ID lookups being very, very fast, or if the browser optimizes the query somehow.

http://stackoverflow.com/comment/39262382
comment on: http://stackoverflow.com/q/25209485
score: 0
type: Comment
type: QuestionComment
has text: Sounds like you need a RESTful data service...

http://stackoverflow.com/comment/39092303
has text: how can I know that particular observable name in the viewmodel?
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25118251

http://stackoverflow.com/q/25134435
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25136268
has title: High Charts Stacked column with drilldown not working properly
tagged with: highcharts
tagged with: javascript
type: AnsweredQuestion
has body: I am working on a highcharts stacked column with column drilldown graph. I based what I am doing in this example: http://jsfiddle.net/NULTY/753/ var chart; $(document).ready(function() { var colors = Highcharts.getOptions().colors, categories = ['MSIE', 'Firefox', 'Chrome', 'Safari', 'Opera'], name = 'Browser brands', level = 0, data = [{ y: 55.11, color: colors[0], drilldown: { type: 'pie', name: 'MSIE versions', categories: ['MSIE 8.0', 'MSIE 6.0', 'MSIE 7.0', 'MSIE 9.0'], level: 1, data: [11,10.85, 7.35, 2.41], color: colors[0] } }, { y: 21.63, color: colors[1], drilldown: { type: 'pie', name: 'Firefox versions', categories: ['Firefox 3.6', 'Firefox 4.0', 'Firefox 3.5', 'Firefox 3.0', 'Firefox 2.0'], data: [13.52, 5.43, 1.58, 0.83, 0.20], color: colors[1] } }, { y: 11.94, color: colors[2], drilldown: { type: 'pie', name: 'Chrome versions', categories: ['Chrome 10.0', 'Chrome 11.0', 'Chrome 8.0', 'Chrome 9.0', 'Chrome 12.0', 'Chrome 6.0', 'Chrome 5.0', 'Chrome 7.0'], data: [9.91, 0.50, 0.36, 0.32, 0.22, 0.19, 0.12, 0.12], color: colors[2] } }, { y: 7.15, color: colors[3], drilldown: { type: 'pie', name: 'Safari versions', categories: ['Safari 5.0', 'Safari 4.0', 'Safari Win 5.0', 'Safari 4.1', 'Safari/Maxthon', 'Safari 3.1', 'Safari 41'], data: [4.55, 1.42, 0.23, 0.21, 0.20, 0.19, 0.14], color: colors[3] } }, { y: 2.14, color: colors[4], drilldown: { type: 'pie', name: 'Opera versions', categories: ['Opera 11.x', 'Opera 10.x', 'Opera 9.x'], data: [1.65, 0.37, 0.12], color: colors[4] } }], data2 = [{ y: 21.63, color: colors[1], drilldown: { name: 'Firefox versions', categories: ['Firefox 3.6', 'Firefox 4.0', 'Firefox 3.5', 'Firefox 3.0', 'Firefox 2.0'], data: [13.52, 5.43, 1.58, 0.83, 0.20], color: colors[1] } }, { y: 11.94, color: colors[2], drilldown: { name: 'Chrome versions', categories: ['Chrome 10.0', 'Chrome 11.0', 'Chrome 8.0', 'Chrome 9.0', 'Chrome 12.0', 'Chrome 6.0', 'Chrome 5.0', 'Chrome 7.0'], data: [9.91, 0.50, 0.36, 0.32, 0.22, 0.19, 0.12, 0.12], col…
type: Question
has answer: http://stackoverflow.com/a/25136268

http://stackoverflow.com/comment/39249239
has text: I need to remove from the variable what I wrote: "http://example.com/ || https://example.com"
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25202827

http://stackoverflow.com/q/25208218
tagged with: http://stackoverflow.com/tag/html
has title: jQuery.fileuploadui, doesn't show thumbnail preview in ie9
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25388887
tagged with: internet-explorer
tagged with: javascript
score: 0
has body: I have been referring to this post about showing the preview image using jquery file upload. I have the same code using URL.createObjectURL, but its not working in IE9. I need to support ie9 for file upload. Is there a fix or workaround for IE9 that can show the image preview using this plugin? Thanks in advance, appreciate any help :)
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25388887

http://stackoverflow.com/comment/39239989
type: Comment
type: QuestionComment
score: 0
has text: I understand that, I just meant that including all the backend stuff in the code in your question makes it much harder to read for anyone trying to help you! If you replace the php code with the actual rendered HTML, think will be a lot clearer
comment on: http://stackoverflow.com/q/25197301

http://stackoverflow.com/a/25202720
type: Answer
has body: Firstly. No need for anything other than just jQuery. Secondly: Personally, I would default all the tabs to being hidden, and only showing them when the "active" class is on them. Also, you might want to add some actual class names to the tabs and the tab-content so you have better control. ".tab" for the tabs, and ".tab-content" for the content. The javascript code is then fairly simple and understandable: $(function() { $(".tab").click(function(e) { e.preventDefault(); $(".tab.active, .tab-content.active").removeClass("active"); $(this).addClass("active"); var tabtitle = $(this).attr("title"); $('#tab'+tabtitle).addClass("active"); }); }); JSFiddle with new class names
score: 0
answers question: http://stackoverflow.com/q/25201522

http://stackoverflow.com/comment/39682497
comment on: http://stackoverflow.com/a/25213195
has text: Sorted :) sorry for the delay and thank you very much
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25145873
type: Question
has answer: http://stackoverflow.com/a/25146042
tagged with: http://stackoverflow.com/tag/html
has title: Add middle click to fade out function
linked to: http://stackoverflow.com/q/1206203
tagged with: onclick
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39143829
has answer: http://stackoverflow.com/a/25145951
tagged with: javascript
type: UnansweredQuestion
has body: This is the code I'm using as this moment for the fade out effect on all links with the class "link" $('.link').click(function() { event.preventDefault(); newLocation = this.href; $('body').fadeOut(700, newpage); }); The problem is that the middle click and/or open in a new tab doesn't work. Is there a way I can change this code so that my users both can right-click and/or middle click on these links?
tagged with: jquery

http://stackoverflow.com/q/25094927
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39049106
tagged with: javascript
has comment: http://stackoverflow.com/comment/39048803
score: -1
has body: Hello fellow programmers! I'm fairly new to PHP/JavaScript and have to admit it is quite the learning experience, but I am enjoying it quite a bit. I have a bit of a problem when I'm saving to a Database using Ajax however. The save works perfectly fine, but instead of falling into my "success" code it falls into the "error" section and gives me a Status of 200. I'm not sure what the status 200 means and am confused because it does actually save to the Database correctly. Eventually what I want to do is use a JavaScript function to updated fields (when successfully saving to the DB), but right now I'm just trying to display a message to the user. Also, in the JavaScript code I have to have the single quotes (') around the ajax variables (i.e. url, type, dataType, etc.) for it to work. I've tried adding the single quotes around success and error and their associated functions to no avail. Thanks! Javascript: function SaveUserBlankAnswer(form) { if (form.Answer.value != "") { var answer = form.Answer.value; var contentID = form.ContentID.value; var userID = form.UserID.value; $.ajax({ 'url': 'Database/SaveUserBlankAnswer_db.php', 'type': 'POST', 'dataType': 'json', 'data': { ContentID: contentID, UserID: userID, Answer: answer }, success: function(){ alert('BOOSH!'); }, error: function(data){ alert(data.status); } }); } } PHP: &lt;?php session_start(); include("DBConnection.php"); $duplicateCheck = "SELECT UserID FROM BlankAnswer WHERE ContentID = " . $_POST[ContentID] . " AND UserID = " . $_POST[UserID]; if ($duplicateResult = $mysqli-&gt;query($duplicateCheck)) { $rowCount = $duplicateResult-&gt;num_rows; if ($rowCount == 0) { $SQL = "INSERT INTO BlankAnswer (UserID, ContentID, Answer) VALUES('$_POST[UserID]', '$_POST[ContentID]', '$_POST[Answer]');"; } else { $SQL = "UPDATE BlankAnswer SET Answer = '" . $_POST[Answer] . "' WHERE ContentID = '" . $_POST[ContentID] . "' AND UserID = '" . $_POST[UserID] . "'"; } $mysqli-&gt;query($SQL); } $mysqli-&gt;close(); ?&gt;
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39048926
favorite count: 0
has comment: http://stackoverflow.com/comment/39048875
has comment: http://stackoverflow.com/comment/39048889
type: UnansweredQuestion
has title: Saving to DB works...but an error is thrown
tagged with: php
has answer: http://stackoverflow.com/a/25095157
has comment: http://stackoverflow.com/comment/39048817
has comment: http://stackoverflow.com/comment/39048939

performance
tags question: http://stackoverflow.com/q/25130409
tags question: http://stackoverflow.com/q/25122673
tags question: http://stackoverflow.com/q/25098095
tags question: http://stackoverflow.com/q/25138666
tags question: http://stackoverflow.com/q/25090163
tags question: http://stackoverflow.com/q/25106832
tags question: http://stackoverflow.com/q/25071687
tags question: http://stackoverflow.com/q/25166051
tags question: http://stackoverflow.com/q/25142615
tags question: http://stackoverflow.com/q/25189652
tags question: http://stackoverflow.com/q/25161672
tags question: http://stackoverflow.com/q/25069907
tags question: http://stackoverflow.com/q/25169143
tags question: http://stackoverflow.com/q/25079387
tags question: http://stackoverflow.com/q/25108941
tag name: performance
tags question: http://stackoverflow.com/q/25191855
tags question: http://stackoverflow.com/q/25146506
type: Tag
tags question: http://stackoverflow.com/q/25079469

http://stackoverflow.com/a/25216574
answers question: http://stackoverflow.com/q/25216533
score: 0
has body: You had spelling mistake.Try this Testing jQuery hope it helps.
type: Answer

http://stackoverflow.com/q/25136561
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39126312
tagged with: jquery
has answer: http://stackoverflow.com/a/25136752
favorite count: 0
has answer: http://stackoverflow.com/a/25136688
has comment: http://stackoverflow.com/comment/39126109
has answer: http://stackoverflow.com/a/25136703
type: Question
has body: So I made a little script for a clock, and used setInterval to make it live. It works fine, but the problem is it freezes my browser after a minute or so. I'm a little stuck as I don't know how to solve this. Can someone help please? Here is the code: $(function liveClock(){ var dt = new Date(); var hh = dt.getHours(); var mm = dt.getMinutes(); var ss = dt.getSeconds(); var ampm = ""; if (ss &lt;= 9){ ss = "0"+dt.getSeconds() } if (mm &lt;= 9){ mm = "0"+dt.getMinutes() } if (hh &gt; 12){ hh = hh - 12; ampm = "pm"; }else{ ampm = "am"; } $("p").html( hh + ":" + mm + ":" + ss + " " + ampm ); setInterval(function(){ liveClock(); }, 1000); }); Thanks in advance
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39126223
has title: jQuery live clock works but freezes browser?
upvote count: 2
has comment: http://stackoverflow.com/comment/39126196
answer count: 3
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39126357

http://stackoverflow.com/a/25793839
has comment: http://stackoverflow.com/comment/40383027
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40345165
has body: I had the same problem and spent the last couple of hours trying to figure out a solution. Apparently, the clip-path operates on the object prior to transformation. So I tried to reverse-transform the clip object when performing the zoom transformation, and this worked ! It is something in the spirit of: var clip_orig_x = 100, clip_orig_y = 100; function zoomed() { var t = d3.event.translate; var s = d3.event.scale; // standard zoom transformation: container.attr("transform", "translate(" + t +")scale(" + s + ")"); // the trick: reverse transform the clip object! clip.attr("transform", "scale(" + 1/s + ")") .attr("x", clip_orig_x - t[0]) .attr("y", clip_orig_y - t[1]); } where clip is the rectangle in the clipPath. Because of interactions between zooming and translation, you need to set "x" and "y" explicitly instead of using transform. I am sure experienced d3 programmers out there will come up with a better solution, but this works !
answers question: http://stackoverflow.com/q/25142240
type: Answer
accepted answer of: http://stackoverflow.com/q/25142240
score: 4
upvote count: 4

http://stackoverflow.com/comment/39140227
score: 0
type: Comment
type: QuestionComment
has text: If you're still saying `var $that = $('.delete');`, you're selecting all of those buttons. You want `var $that = $(this);` to get just the one that was clicked.
comment on: http://stackoverflow.com/q/25143978

http://stackoverflow.com/comment/126203175
type: AnswerComment
comment on: http://stackoverflow.com/a/25209180
type: Comment
score: 1
has text: I would also add the octothorpe/pound/number symbol # to the regular expression, as this character makes the file unlinkable by some encoders

http://stackoverflow.com/q/25149318
tagged with: http://stackoverflow.com/tag/html
has body: I am building a tumblr theme from scratch and I'm using masonry. Although, sometimes it overlaps pictures, it doesn't add any gutter, calculates top wrong, and I'm not sure of what's happening. I tried adding imagesloaded library but I don't think it's woking since it's still overlapping pictures, etc, sometimes. Images width and height are defined on the CSS since they're all the same width but different heights. HTML {block:Posts} {block:Photo} {/block:Photo} {/block:Posts} JS var container = document.querySelector('#content'); var msnry; imagesLoaded( container, function() { msnry = new Masonry( container ); });
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25149913
score: 0
possible better answer: http://stackoverflow.com/a/29348197
tagged with: jquery-masonry
answer count: 2
has answer: http://stackoverflow.com/a/29348197
has title: Images loaded JavaScript - Using jQuery Masonry
tagged with: javascript
has answer: http://stackoverflow.com/a/25149913

http://stackoverflow.com/comment/126857129
has text: Beware `date.split("T")[0]`. The output may vary depending on the time portion of the Date. Ex: https://stackoverflow.com/a/71773898/101095
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25159330

http://stackoverflow.com/comment/39118571
type: QuestionComment
has text: post your code, what did you try
score: 0
comment on: http://stackoverflow.com/q/25132348
type: Comment

http://stackoverflow.com/comment/39070270
comment on: http://stackoverflow.com/a/25084590
has text: Thanks Kiril - works like a charm. And yes, I have to work with IE9. I appreciate the help...!!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25142862
linked to: http://stackoverflow.com/q/3287114
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25143151
score: 1
tagged with: java
upvote count: 1
has title: Is it a good practice to use JSTL inside a script (javascript) tag?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39137829
tagged with: jstl
has answer: http://stackoverflow.com/a/25143151
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm developing a web app using JSTL and Javascript in Eclipse Juno. I've been reading questions like How to set the JSTL variable value in javascript? and my code works good even if I have error in eclipse: But... Is it a good practice to use JSTL and Javascript like this? Does it cause a low performance in the time of rendering the webpage? Can this be done in other way?

http://stackoverflow.com/a/25192088
accepted answer of: http://stackoverflow.com/q/25191959
downvote count: 0
score: 1
has body: As mentioned in the comments, you could use myID instead of this. Another way is to export a bound version of the function: myID.login_process = function () { // ... }.bind(myID);
type: AcceptedAnswer
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25191959

http://stackoverflow.com/comment/54895504
score: 6
has text: This does work, just wanted to note that in the new select2, "a_key" is "text" in a standard select2 object. so: {id: 100, text: 'Lorem Ipsum'}
type: AnswerComment
comment on: http://stackoverflow.com/a/25217310
type: Comment

http://stackoverflow.com/comment/39060055
score: 0
type: AnswerComment
type: Comment
has text: hi, yes i attached to slick. Removing position:relative didn't help either :(
comment on: http://stackoverflow.com/a/25099958

http://stackoverflow.com/q/25127379
tagged with: javascript
has body: If I enter the array identifiers manually it will work, however using the parameters in the function it won't work. I know where the problem is, but not what I can replace ".key" with, so that it'll use the parameters value. var stuff = [ { "name": "Alex", "food": "Pizza"}, { "name": "Karl", "food": "Lasagne"}, { "name": "Franz", "food": "Potato salad"} ] function getSpecificValue(key, value, getkey, arr) { for (var i=arr.length;i--;) { if (arr[i].key == value) { //this should use the parameter "key" ("name") return arr[i].getkey; //this should use the parameter "getkey" ("food") } } } alert( getSpecificValue('name', 'Alex', 'food', stuff) ); //alert "Pizza"
has title: Use variable/parameter as array identifier
score: 0
has comment: http://stackoverflow.com/comment/39109748
accepted answer: http://stackoverflow.com/a/25127454
has comment: http://stackoverflow.com/comment/39109892
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25127454
type: Question
tagged with: arrays
answer count: 1

http://stackoverflow.com/comment/39158738
type: Comment
has text: If I remove preventdefault form reloads (but without ajax)
comment on: http://stackoverflow.com/a/25154018
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39069009
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25105813
has text: It'll also help if you include some of your attempts to solve this (even if the code doesn't work).
type: Comment

http://stackoverflow.com/a/25093186
type: Answer
answers question: http://stackoverflow.com/q/25092929
score: 2
has body: It's not quite one line, but using just inbuilt Javascript, the most concise I can come up with is: var user = users.filter(function (element) { return element.email == myEmail &amp;&amp; element.password == myPassword; })[0]; Here's a working jsFiddle: http://jsfiddle.net/dqMLG/
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39150602
type: Comment
comment on: http://stackoverflow.com/q/25149388
type: QuestionComment
score: 3
has text: I think the problem is that you "post" your data but you use the superglobal `$_GET` in your PHP... you should use `$_POST` instead

http://stackoverflow.com/q/25125265
favorite count: 0
has answer: http://stackoverflow.com/a/25125337
type: AnsweredQuestion
upvote count: 3
accepted answer: http://stackoverflow.com/a/25125337
tagged with: excel
type: Question
has body: First post. No idea how to do this. Never retrieved data from a website before. Can navigate through VBA to a page with options to open reports, but at this point everything goes from html to Javascript to open reports. How would I go about opening the report? No problems in navigating to the page or pulling down the data from the table finish Report start Report control report data start Report How would i navigate to the control report for example? Any help appreciated, thankyou
tagged with: javascript
has title: VBA navigating IE javascript link
score: 3
answer count: 1
downvote count: 0
tagged with: vba

http://stackoverflow.com/comment/39205635
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25179376
type: AnswerComment
has text: Thanks. I still don't quite understand the use of controllers completely, but this gives me a much more solid base to work off.

http://stackoverflow.com/comment/39250325
comment on: http://stackoverflow.com/q/25203108
score: 0
type: QuestionComment
type: Comment
has text: @hjpotter92: Is that vanilla JavaScript or jQuery? I can only seem to find the jQuery `.data()` method.

http://stackoverflow.com/comment/111916035
type: AnswerComment
score: 0
type: Comment
has text: video tutorial is quite useful
comment on: http://stackoverflow.com/a/41687892

http://stackoverflow.com/comment/39058579
comment on: http://stackoverflow.com/a/25100109
has text: Sidenote: The syntax Vilvas is `header("Location: http://www.example.com");` or `header('Location: http://www.example.com');` - your first quote is misplaced. ;)
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25095610
has comment: http://stackoverflow.com/comment/39050155
accepted answer: http://stackoverflow.com/a/25095639
type: AnsweredQuestion
has title: Getting a Choose Country to work
has answer: http://stackoverflow.com/a/25095639
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39050061
has body: I want to make it possible such that when a person as soon as he clicks his country he will get redirected to a subdomain of my website. You can see it at www.test.answercup.com , but when I choose the country nothing happens. I want to make it so that when he clicks his country that page gets redirected to the respective subdomain. How do I do that? The code that I used - Select country Sri Lanka Pakistan
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39051809
tagged with: css

http://stackoverflow.com/comment/39114510
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25129714
score: 1
has text: If to answer you we *must* go to another website, then perhaps you should try narrowing scope of your question and be more specific…

http://stackoverflow.com/a/25118131
answers question: http://stackoverflow.com/q/25118074
has body: You should first multiply the result by 10^(number of decimals), then round the number, than divide this number by 10^(number of decimals). In this case: Math.round((newCostDiff/2)*100) / 100;
type: Answer
upvote count: 1
downvote count: 1
score: 0

http://stackoverflow.com/comment/39287185
has text: And no, `html` and `newList` are strings, not objects.
type: AnswerComment
comment on: http://stackoverflow.com/a/25222915
score: 0
type: Comment

http://stackoverflow.com/a/25088394
type: Answer
has body: use a setter function so you never manipulate it directly, and then you can generate a custom event for it. If it has to trigger even when "something else" changes the value, you need to use something more powerful like mutation observing
accepted answer of: http://stackoverflow.com/q/25088336
score: 0
has comment: http://stackoverflow.com/comment/39041060
answers question: http://stackoverflow.com/q/25088336
type: AcceptedAnswer

http://stackoverflow.com/comment/39185124
has text: This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25167041
type: Comment

http://stackoverflow.com/q/25174369
accepted answer: http://stackoverflow.com/a/25174414
type: AnsweredQuestion
tagged with: onclick
score: -2
possible better answer: http://stackoverflow.com/a/25174416
has answer: http://stackoverflow.com/a/25174481
has answer: http://stackoverflow.com/a/25174416
has body: I am wondering if I can use jquery so that when I click on a fixed div it adds padding to another div. For the example below, I would like to add 40px of padding to the top of div2 once I click div1, and when clicked again I would like to revert to the original amount of padding (20px). Here's a fiddle: http://jsfiddle.net/pauljackson/p9LfkLsd/1/ html: The Pusher Push me down! css: #div1{ position:fixed; background-color:red; color:white; width:100px; cursor:pointer; } #div2{ padding-top:20px; background-color:blue; color:white; width:100px } Thanks for your help!
upvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Click div to add padding to another div with jquery
has answer: http://stackoverflow.com/a/25174414
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
downvote count: 2
has answer: http://stackoverflow.com/a/25174730
type: Question

http://stackoverflow.com/comment/39036506
type: QuestionComment
comment on: http://stackoverflow.com/q/25088039
type: Comment
has text: Not a specialist in javascript but wouldn't `window.onload` need a anonymous function... something like `window.onload = function(){//code goes here}`
score: 0

http://stackoverflow.com/comment/39260918
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25208482
has text: @Michael_B yeh that was a typo.. revised accordingly
score: 0

http://stackoverflow.com/comment/39162211
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25155859
has text: @andrew slaughter You could upvote my answer as well if it solve your problem

http://stackoverflow.com/comment/39162429
type: Comment
comment on: http://stackoverflow.com/a/25153803
type: AnswerComment
has text: "string v" is a server side var. You can create a js var with the server content and access it in the func without passing it as a param.
score: 0

http://stackoverflow.com/a/25191166
has body: If I understand well, you're missing to pass through the e argument to the model method. Inside the TodoView, the method toggleStatus should be like this: toggleStatus: function (e) { this.model.toggleStatus(e); },
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25190977
type: Answer
accepted answer of: http://stackoverflow.com/q/25190977

http://stackoverflow.com/comment/39219581
comment on: http://stackoverflow.com/a/25182058
type: Comment
score: 0
has text: I'm not wrong, we're just not agreeing. http://yuiblog.com/blog/2006/06/01/global-domination/
type: AnswerComment

http://stackoverflow.com/a/25159446
answers question: http://stackoverflow.com/q/25116613
downvote count: 0
has body: Use SP.AppCatalog.getAppInstances Method to retrieve AppInstance objects installed on an instance of SharePoint: var ctx = SP.ClientContext.get_current(); var web = ctx.get_web(); var appInstances = SP.AppCatalog.getAppInstances(ctx, web); ctx.load(appInstances); ctx.executeQueryAsync( function () { //iterate apps for(var i = 0; i &lt; appInstances.get_count();i++) { //... } } , function (sender, args) { console.log(JSON.stringify(args)); });
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/39215132
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25184495
has text: @ZlatinZlatev please don't "fix" code in the question, when doing so might render the question meaningless. Your edits definitely make sense as an answer; as an edit, the original code and your explanation will be invisible to almost everyone.
type: Comment

http://stackoverflow.com/a/25167910
has body: You can try this solution, it uses underscores range to create a pair of arrays to use as iterators, though their values don't matter. Play around with the randomizer function to get an even distribution of 'y's JSBIN: http://jsbin.com/yaletape/1/ var rows = _.range(0, 10, 0); var columns = _.range(0, 10, 0); function randomizer(mult){ return Math.floor((Math.random()*mult)+1); } var y_count = 0; var matrix = _.map(rows, function(){ return _.map(columns, function(v, i){ var value; var y_allowed = randomizer(3); var current_y_count = 0; if(y_count &lt; 20 &amp;&amp; current_y_count &lt; y_allowed){ var rand = randomizer(5); if(rand &gt; 4){ value = 'y'; current_y_count++; y_count++; } } if(!value){ value = 'n'; } return value; }); }); //The above could be simplified to var matrix = _.range(0,10,0).map(function(){ return _.range(0,10,0).map(function(){ //put the logic code from above here }); });
upvote count: 1
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25167066
type: Answer

http://stackoverflow.com/q/25127054
tagged with: javascript
has answer: http://stackoverflow.com/a/25127098
has answer: http://stackoverflow.com/a/55961849
favorite count: 0
answer count: 9
tagged with: regex
has answer: http://stackoverflow.com/a/72171926
has answer: http://stackoverflow.com/a/25127753
has answer: http://stackoverflow.com/a/43933010
score: 19
has title: regex format string number with commas and 2 decimals in javascript
type: AnsweredQuestion
upvote count: 19
has body: I have a string n which is a number. The following adds the commas where needed, but I also want to change the number of decimals. It should also round where appropriate. var parts = n.split("."); var num = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (parts[1] ? "." + parts[1] : ""); This turns a number like 1234.567 in to 1,234.567. But I need my number to look like: 1,234.57 I tried taking parts[1] and converting to a Number, then rounding, then concatenating it back; but that is error prone. How can I get this result by altering my regex? Thanks.
has answer: http://stackoverflow.com/a/58001165
accepted answer: http://stackoverflow.com/a/25127753
has answer: http://stackoverflow.com/a/46865703
type: Question
possible better answer: http://stackoverflow.com/a/25127336
has answer: http://stackoverflow.com/a/54248535
has answer: http://stackoverflow.com/a/25127336
downvote count: 0

http://stackoverflow.com/a/25133766
type: Answer
has comment: http://stackoverflow.com/comment/39121743
has comment: http://stackoverflow.com/comment/39121205
accepted answer of: http://stackoverflow.com/q/25133690
has comment: http://stackoverflow.com/comment/39123916
answers question: http://stackoverflow.com/q/25133690
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39121345
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39123761
upvote count: 2
has body: I don’t think you can call .select() on contenteditables, but try using execCommand instead when the element is focused: document.execCommand('selectAll', false, null); Demo: http://jsfiddle.net/F65D3/

http://stackoverflow.com/comment/39232197
type: Comment
has text: `.is()` doesn't return a collection, it returns `true` or `false`, so `.length` won't return anything useful for that. And your `if` seems to be doing exactly what `.toggle()` does.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25193022

http://stackoverflow.com/comment/39022810
comment on: http://stackoverflow.com/a/25080909
score: 1
type: AnswerComment
has text: Very well, just saying that there really isn't any need for using jQuery validation anymore over HTML.
type: Comment

http://stackoverflow.com/q/25219346
has answer: http://stackoverflow.com/a/38391983
score: 30
has answer: http://stackoverflow.com/a/57010135
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25252731
downvote count: 0
accepted answer: http://stackoverflow.com/a/25252731
has answer: http://stackoverflow.com/a/25254236
upvote count: 30
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/32784450
has answer: http://stackoverflow.com/a/25220338
tagged with: google-maps-api-3
has title: How to convert from (x, y) screen coordinates to LatLng (Google Maps)
tagged with: google-maps
answer count: 7
has comment: http://stackoverflow.com/comment/39280652
favorite count: 0
has answer: http://stackoverflow.com/a/76776135
possible better answer: http://stackoverflow.com/a/32784450
has body: I am implementing an application using Google Maps and Leap Motion and what I want right now, and I am a bit stuck, is a way to convert (x, y) screen coordinates into a Google Maps LatLng object. I want to achieve this in order to start, for example, a panorama (Street View) at the point where the user is pointing with the Leap Motion. I know about the presence of fromPointToLatLng function, but I have no clue what is the right approach in using it and how can I translate my x and y coordinates into lat lng variables. Can you please help me with this?

http://stackoverflow.com/comment/39306029
type: Comment
comment on: http://stackoverflow.com/a/25160607
score: 0
type: AnswerComment
has text: I wanted to apply a more dynamic approach something like max-width: 1024 > 50%, 1014 > 51%, 1000 > 52%.....so increasing the percentage as it gets smaller, same for the top absolute position.

http://stackoverflow.com/comment/39260958
comment on: http://stackoverflow.com/q/25208833
score: 0
has text: Are you asking how to replicate the code that already works on one field to the other 2?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39100361
type: Comment
has text: Those options are enabled by default in the library. As I've stated in the answer, your question is not clear and needs broader explanation.
comment on: http://stackoverflow.com/a/25122124
type: AnswerComment
score: 0

http://stackoverflow.com/q/25096728
has comment: http://stackoverflow.com/comment/39052233
has body: I want to change all the background-color of all divs with the class Liregion2. I just want to change the div background color, not li. My code only changes one div element, though! How can I make it affect all of them? Here is my HTML5 code: 1號線 2號線 3號線 4號線 And here is the JQuery: $('#FirstLine').click(function(){ $('.Liregion2').each(function( index , element ){ $(element).css("background-color" , "transparent"); }); event.stopPropagation(); });
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25096841
accepted answer: http://stackoverflow.com/a/25096841
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/39052372
has answer: http://stackoverflow.com/a/25096778
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25096773
has answer: http://stackoverflow.com/a/25096773
has answer: http://stackoverflow.com/a/25096780
has comment: http://stackoverflow.com/comment/39052480
type: Question
has title: Use JQuery to change all element's css style in same class
linked to: http://stackoverflow.com/q/10999990
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39052223
score: 0

http://stackoverflow.com/comment/39022475
has text: @UndefinedVariable As an alternative to `setInterval` or `setTimeout` with AJAX you might consider using [`WebSockets`](http://www.html5rocks.com/en/tutorials/websockets/basics/) as it allows you to open a persistent connection between the client and the server. That way, whenever there is new log information available, the server can automatically push it to the client. This avoids the somewhat inefficient pinging every set interval approach that you're currently using.
score: 0
comment on: http://stackoverflow.com/q/25080627
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39068098
type: Comment
type: QuestionComment
has text: I'm not familiar with express but you need to call `render` somewhere, right? Can you also share that part of code?
comment on: http://stackoverflow.com/q/25103476
score: 0

http://stackoverflow.com/comment/39055043
score: 1
comment on: http://stackoverflow.com/q/25097804
has text: This question is not much more interesting than understanding the JS statement `var a = b + c;`. The correct answer would likely be "I guess you don't know `==` is an operator, go look it up."
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25090290
answers question: http://stackoverflow.com/q/25088067
type: Answer
score: 0
has body: As discussed in the comments, you can simply stick the code somewhere where the browser won't treat it as code, and later (ab)use eval() on it. For example, using a string literal: if(window.browser != 'bad') { eval("ColorSpace.singletons = {\ get gray() { //get is not correctly parse in <ie8\ return shadow(this, 'gray', new DeviceGrayCS());\ },\ get rgb() {\ return shadow(this, 'rgb', new DeviceRgbCS());\ },\ get cmyk() {\ return shadow(this, 'cmyk', new DeviceCmykCS());\ }\ };"); } To avoid the awkward backslash-escaping of newlines and quotes, can also use a // ... and much, much later: window.browser != 'bad' && document.getElementById('customScript').src="path/to/my/script.js"; Here's a short fiddle showing this: http://jsfiddle.net/4mBBL/ eval has several major drawbacks: debugging it is a nightmare, readability even more so, and overall usefulness of your code drastically decreases with each eval() call, so avoid it whenever possible. Despite this we see it used w̶h̶e̶n̶ ̶w̶r̶i̶t̶i̶n̶g̶ ̶f̶o̶r̶ ̶I̶E̶<̶9̶ all around the interwebs

http://stackoverflow.com/q/25122713
downvote count: 1
has comment: http://stackoverflow.com/comment/39199127
type: Question
has answer: http://stackoverflow.com/a/25123019
has title: How to open the phone dialer?
score: 10
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25123019
has body: I am trying to launch the phone dialer in my worklight 6.2 hybrid application when clicking on a button and/or an anchor tag. Below is the code I am using. button: Tel anchor tag: (800) 111-1111 When we click on button/anchor tag below is the behavior in android and iOS. In android: Displays a pop up window with the message Application Error net::ERR_UNKNOWN_URL_SCHEME (TEL:+18001111111) In iOS: The click event doesn't respond.
answer count: 3
has answer: http://stackoverflow.com/a/58470583
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/48941632
upvote count: 11
has answer: http://stackoverflow.com/a/48941632
tagged with: ibm-mobilefirst
type: AnsweredQuestion
tagged with: cordova

http://stackoverflow.com/a/25184971
type: Answer
score: 2
upvote count: 2
has body: You need to use: var a = new RegExp("^[A-Za-z]+[A-Za-z\\s]+$"); OR: var a = /^[A-Za-z]+[A-Za-z\s]+$/; So no delimiters if you are using new RegExp and new RegExp also needs double escaping.
answers question: http://stackoverflow.com/q/25184936
downvote count: 0

http://stackoverflow.com/comment/39069092
score: 0
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58572/discussion-between-fredyc-and-sifriday).
comment on: http://stackoverflow.com/a/25105589
type: AnswerComment

http://stackoverflow.com/q/25179995
tagged with: javascript
has title: Prevent page title from auto-updating in Joomla 1.5?
tagged with: title
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39206945
answer count: 1
tagged with: joomla1.5
has comment: http://stackoverflow.com/comment/39207111
accepted answer: http://stackoverflow.com/a/25180622
has comment: http://stackoverflow.com/comment/39207422
tagged with: joomla
has comment: http://stackoverflow.com/comment/39206881
has answer: http://stackoverflow.com/a/25180622
has comment: http://stackoverflow.com/comment/39206577
type: AnsweredQuestion
has body: I'm working on a messed up project of Joomla where most of the things are made in core, like passing option=com_admn&amp;view=displayUsers. We've a blog page where all the blogs are listed. As I can clearly see, the title of the page is set to Blogs list- ProjectName while the document is loading but as soon as the page is loaded completely, the title is over riden and is set to ProjectName. When I checked the same in FireBug, I found that title was being updated every 2 secs, I guess, by javascript. I've tried changing global as well as article and menu settings but that doesn't seem to help. Please enlighten me by pointing out the issue and the solution.
tagged with: overriding

http://stackoverflow.com/q/25222151
has answer: http://stackoverflow.com/a/25251272
score: 0
tagged with: gsp
type: Question
accepted answer: http://stackoverflow.com/a/25251272
tagged with: javascript
has title: How do you reference javascript files from a grails plugin within a different grails app?
tagged with: grails
linked to: http://stackoverflow.com/q/4890491
answer count: 1
tagged with: angularjs
tagged with: grails-resources-plugin
type: AnsweredQuestion
has body: I have a custom plugin which supplies several Grails controllers and several Grails domain objects. In addition there are a few UI components that have been written with AnagularJS that I would like to make use of in several other projects. The following files in the web-app directory: js/directives/directivea/directivea.js js/directives/directivea/directivea.html js/services/restapi/restapi.js In the plugin itself i have an index.html & index.js file that i use to run the plugin as a stand-alone app. I have no need for the functionality GSPs provide, all my controllers provide a strictly JSON ReST api that the AngularJS services communicate with. In the plugin if I reference these files within the index.html file using a link to their path within the web-app directory (for example: js/services/restapi/restapi.js) everything works just fine. However; once I pull the plugin into one of my downstream projects, the controllers and domain objects are working wonderfully but I can't seem to determine how to reference the javascript from the plugin. I'm open to switching to utilizing GSPs rather than static HTML files which opens the door for using the Resources plugin but i can't seem to get that to work either.. I've created the file PluginNameResources.groovy in the grails-app/conf folder of the plugin with the contents: modules = { directivea { defaultBundle 'ui' resource url: 'js/directives/directivea/directivea.js' resource url: 'js/servicces/restapis.js' } } This is in the index.gsp of the plugin: Grails Plugin A <r:require module="hierarchyviewer"/> <directiveA /> web-app/js/index.jsp contains: var app = angular.module('grailsPluginAApp', ['RestAPIs','DirectiveAModuleName']); All of this results in some strange javascript errors: Uncaught object angular.js:36 (anonymous function) angular.js:36 (anonymous function) I should add that I've looked into this question about someone trying to create a similar structure and I've tried to replicate the results with the sam…

http://stackoverflow.com/q/25117458
has comment: http://stackoverflow.com/comment/39090780
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25117634
has body: I am not able to move on to the next section since i could not understand how this works. For reference I will post the link. http://eloquentjavascript.net/1st_edition/chapter7.html var roads = {}; function makeRoad(from, to, length) { function addRoad(from, to) { if (!(from in roads)) roads[from] = []; roads[from].push({to: to, distance: length}); } addRoad(from, to); addRoad(to, from); } I am totally lost to get the basic idea of this function. Anyone who is generous to help. Thank you in advance. you are always help me to unlock many concepts.
has title: JavaScript function
tagged with: function
has comment: http://stackoverflow.com/comment/39090854
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/39090786
has comment: http://stackoverflow.com/comment/39090771
has comment: http://stackoverflow.com/comment/39090954
downvote count: 1
type: Question

http://stackoverflow.com/comment/39175923
has text: I did notice that. That portion of the code works. I think I accidentaly errased the "m" when I posted this.
score: 0
comment on: http://stackoverflow.com/q/25162929
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39182549
type: Comment
has text: If you want to only display the answers themselves loop through the answers to create a string and then display them e.g. `var aString = "";` `Object.keys(anserFor1st).forEach(function (k) {aString += anserFor1st[k] + " ";});` `Object.keys(anserFor2nd).forEach(function (k) {aString += anserFor2nd[k] + " ";});` `document.getElementById("content").innerHTML = aString;` Also it's polite to accept an answer if you think it's correct :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25148787

http://stackoverflow.com/comment/39248705
has text: Can't you just edit your question? I cannot get your image (access denied from here). Or better, create a fiddle
score: 0
comment on: http://stackoverflow.com/q/25202077
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25222519
has answer: http://stackoverflow.com/a/51862009
has comment: http://stackoverflow.com/comment/39286613
type: Question
has answer: http://stackoverflow.com/a/63388679
downvote count: 0
tagged with: javascript
favorite count: 0
has title: Error: Cannot find module 'ansi-styles' in AngularJS with Yeoman generator
has answer: http://stackoverflow.com/a/77721157
tagged with: yeoman
tagged with: yeoman-generator
answer count: 4
has answer: http://stackoverflow.com/a/25884689
accepted answer: http://stackoverflow.com/a/25884689
has comment: http://stackoverflow.com/comment/39287756
tagged with: angularjs
tagged with: npm
upvote count: 3
possible better answer: http://stackoverflow.com/a/51862009
has comment: http://stackoverflow.com/comment/39287203
has body: My code was working previously before, but seems to have stopped working. I tried yo angular:route api but this error was returned: Error: Cannot find module 'ansi-styles' 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; (/usr/local/lib/node_modules/generator-angular/node_modules/chalk/index.js:2:12) 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 Module.require (module.js:364:17) I have added all the dependencies required to my package file, update npm (which is now on 2.0.0alpha), all npm packages, and ran npm install. The site still works when I grunt serve.
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/39296277
type: AnswerComment
has text: The problem is that directive can not see transactions controller scope also i have to update categories controller the same problem will appear
comment on: http://stackoverflow.com/a/25227781
score: 0
type: Comment

http://stackoverflow.com/comment/39104556
has text: Then you need to check what do you have in arrayFocal[ 2 ]. You can use console.log(arrayFocal[ 2 ]) and see it on broswer console. Becuase it seems you have nothing in arrayFocal[ 2 ].
score: 0
comment on: http://stackoverflow.com/a/25124654
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39107416
comment on: http://stackoverflow.com/a/25083608
score: 1
has text: There's an example here: https://github.com/square/crossfilter/wiki/API-Reference#group_order The ordering part is probably irrelevant to you, but it tracks both a count and a total.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25112057
has body: Google has completely changed analytics, ga.js has been replaced by analytics.js and non of the old methods listed below work anymore: Method1: &lt;body onLoad="javascript:pageTracker._setVar('test_value');"&gt; Method2: &lt;body onLoad="javascript:_gaq.push(['_setVar','test_value']);"&gt; Method3: &lt;script type="text/javascript"&gt; var _gaq = _gaq || []; _gaq.push(['_setVar', 'exclude_me']); _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']); _gaq.push(['_trackPageview']); // etc... &lt;/script&gt; The new GA snipplet looks like this: &lt;script&gt; (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXX-Y'); // Creates a tracker. ga('send', 'pageview'); // Sends a pageview. &lt;/script&gt; I checked the documentation but I couldn't figure out how to set a variable that can be used in the filter, to exlude internal traffic from Google Analytics. Any ideas?
score: 0
has answer: http://stackoverflow.com/a/25114934
has answer: http://stackoverflow.com/a/25122052
answer count: 4
possible better answer: http://stackoverflow.com/a/25122052
has answer: http://stackoverflow.com/a/27346505
has answer: http://stackoverflow.com/a/25112235
type: Question
linked to: http://stackoverflow.com/q/29267940
tagged with: google-analytics
type: AnsweredQuestion
tagged with: cookies
accepted answer: http://stackoverflow.com/a/25114934
has title: How to exclude yourself from NEW (2014) Google Analytics traffic using cookies?
tagged with: javascript

http://stackoverflow.com/q/25081237
possible better answer: http://stackoverflow.com/a/25081448
answer count: 3
has title: How can I .slidetoggle a div the .length of a string in another div
tagged with: css
has answer: http://stackoverflow.com/a/25081448
type: AnsweredQuestion
has body: I have a label where if you hover over it, it should expand the length of the text inside. I would like to slide the div next to it the width of the label (depending on the length of the word). Here is the JS Fiddle: http://jsfiddle.net/5s69j/1/ I want to use the .length to slide the div next to it because I don't want to hardcode it. I ultimately want to have the title div visible at all times if there is a label or not. If there IS a label then I want the title to be to the right of the label at all times. If there ISN'T a label then I don't want space before the title, which is why I'm not using margin. Here I'm trying to set a hover function on the labels to slide the title the length of label. And I think that I need something to calculate the length of a string. Let me know if I'm missing something obvious. $(function(){ var stuff = $(".labels").length; $('.labels').hover(function{ $(".title").slideToggle(stuff, function() { }); }); }); Thank you so much!
accepted answer: http://stackoverflow.com/a/25081830
type: Question
score: 0
has answer: http://stackoverflow.com/a/25081454
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25081830

http://stackoverflow.com/comment/39289162
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25223996
has text: That looks promising and works as intended. Of course, I guess there's no easy way to prevent fade in/out effect from breaking when someone starts to move the cursor crazily over the whole screen. Anyway, thanks!
type: AnswerComment

http://stackoverflow.com/comment/39074031
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25104841
has text: @Barmar I've updated my question, I hope it's a bit clearer now.

http://stackoverflow.com/comment/39243537
type: Comment
comment on: http://stackoverflow.com/a/25197553
score: 8
type: AnswerComment
has text: Thank you for the response, how do I know if 'update' event was activated on 'room1'? My problem arises when a socket is in 2 rooms and needs to distinguish between 'update' on one of those rooms

http://stackoverflow.com/comment/39069175
type: Comment
has text: sir, i ain't talking about the php file , am just talking about the script i have posted here in my question ......how to write all indexes and values of AllItem array to the browser console using console.log ?
type: AnswerComment
comment on: http://stackoverflow.com/a/25103382
score: 0

http://stackoverflow.com/comment/39097376
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25113743
score: 3
has text: You should keep ILayers in a dictionary and fetch them by the ID. Then use that object in addLayer/removeLayer calls.

http://stackoverflow.com/a/35228785
answers question: http://stackoverflow.com/q/25217365
type: Answer
score: 0
has body: You are loading the scripts in the wrong order! first u loads the library and then you load the script that has its code to be opening the camera! getting that order below ..

http://stackoverflow.com/a/25223415
has body: You don't need jQuery for this. Just type: element.innerHTML = result;
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25223169
type: Answer
upvote count: 1

http://stackoverflow.com/comment/132273265
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25110166
has text: Possible duplicate of https://stackoverflow.com/questions/23913111/firefox-browser-rejected-fullscreen-change

http://stackoverflow.com/comment/39134230
score: 2
type: Comment
has text: I don't think it's an either or type question, there is a sweet spot. You have to also consider network latency, loading many files may not be faster than loading a single or a couple large files.
type: AnswerComment
comment on: http://stackoverflow.com/a/25140616

http://stackoverflow.com/comment/84107631
type: Comment
score: 3
type: AnswerComment
has text: This is not a semanticlly correct solution - the only valid child of a UL is an LI - if anything the form tags should be inside the li tags - but that may not allwo the desired action - either way a ul > form > li is not correct markup
comment on: http://stackoverflow.com/a/34216265

concurrency
tag name: concurrency
tags question: http://stackoverflow.com/q/25211434
tags question: http://stackoverflow.com/q/25126887
tags question: http://stackoverflow.com/q/25098022
tags question: http://stackoverflow.com/q/25077844
type: Tag

http://stackoverflow.com/comment/39223438
type: AnswerComment
has text: I cleared my browser cache after setting your values and it works now, this is embarrassing. Thanks for the help Tony!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25187580

http://stackoverflow.com/a/25193447
downvote count: 2
answers question: http://stackoverflow.com/q/25193360
type: Answer
upvote count: 0
has body: Try this instead: d3.select('#mydat') instead of this d3.select('body').select('#mydat')
has comment: http://stackoverflow.com/comment/39232397
score: -2

http://stackoverflow.com/a/25099136
answers question: http://stackoverflow.com/q/25099095
type: Answer
score: 2
upvote count: 2
downvote count: 0
has body: what you need is the wrap function: $('#inner').wrap('&lt;div id="outer"&gt;&lt;/div&gt;'); $('#inner').before(' - this element was appended with jQuery');

http://stackoverflow.com/comment/39272728
has text: Very interesting! The .chanage(function) is in form.js file. Can we use erb (<% %>) in .js file?
comment on: http://stackoverflow.com/a/25214965
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39201012
has text: @DoXicK - I can't do that, because it says no need for html and meta tags, but I need those! The cause of bad div size is ` ` and ` ` those needed, but can't be inserted.
type: Comment
comment on: http://stackoverflow.com/q/25119868
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39140823
comment on: http://stackoverflow.com/q/25143684
has text: can post method be used instead of get?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25130446
has answer: http://stackoverflow.com/a/25131101
type: Question
has comment: http://stackoverflow.com/comment/39115334
has answer: http://stackoverflow.com/a/25130488
accepted answer: http://stackoverflow.com/a/25130488
tagged with: javascript
tagged with: jquery
tagged with: replace
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/9309278
possible better answer: http://stackoverflow.com/a/25131101
has title: Regex - javascript Replace all non-numerics
tagged with: regex
has answer: http://stackoverflow.com/a/25131063
type: AnsweredQuestion
has body: I've seen this question asked a few times (here for example), and despite my best attempts to replicate, and reading up on regex, this doesn't seem to work: $("#button").click(function () { new_number = $("#the_input").val(); new_number = new_number.replace(/[^0-9]+/g, '') // also doesn't work: (/\D/g, '') $("#result").html(new_number); }); jsfiddle here The Goal: On button click, collect value from input, remove NON-NUMBERS and output string inside a div. The Result: When I put a number in, it comes out fine. When I put a NON-NUMBER &amp; a NUMBER, or anything but a number it comes out blank. It seems to replace the whole string, and not just the matched characters. Help?

http://stackoverflow.com/a/25217136
has comment: http://stackoverflow.com/comment/39277057
accepted answer of: http://stackoverflow.com/q/25217054
answers question: http://stackoverflow.com/q/25217054
has body: fiddle http://jsfiddle.net/Drea/28h0L6eb/ html changed id "addScnt" to class - you should avoid using same id multiple times js $('.addScnt').on('click', function (event) { event.preventDefault(); $(this).closest('.row').append(createInput($('#Ivrgroupzbase_grpzWelcomeNotes p').length + 1), ''); });
has comment: http://stackoverflow.com/comment/39277068
type: Answer
has comment: http://stackoverflow.com/comment/39277079
has comment: http://stackoverflow.com/comment/39277395
upvote count: 2
has comment: http://stackoverflow.com/comment/39277032
has comment: http://stackoverflow.com/comment/39276874
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39291143
comment on: http://stackoverflow.com/a/25224521
score: 0
type: Comment
has text: I don't believe this is the wisest advice is it? If he is doing actions on dom elements i'd expect that they occur after the dom is fully loaded. The location if its the head or not is irrelevant in this matter. He could easily have code in the head that is called when the dom is loaded.
type: AnswerComment

jquery-templates
type: Tag
tags question: http://stackoverflow.com/q/25159385
tag name: jquery-templates

http://stackoverflow.com/comment/39099922
score: 1
type: Comment
has text: That's going to be tricky using this method - Take a look at TIME_DAY but I'm fairly sure that returns the day of the month, i.e. 0 - 31.
comment on: http://stackoverflow.com/a/25121547
type: AnswerComment

http://stackoverflow.com/comment/45960036
has text: Not all readers could get the same idea. Better to give other way of explaining it for them to understand clearly.
type: Comment
comment on: http://stackoverflow.com/a/28845445
score: 1
type: AnswerComment

http://stackoverflow.com/q/25184464
tagged with: html5-canvas
answer count: 1
has title: Canvas rotate resets scale
accepted answer: http://stackoverflow.com/a/25420415
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25420415
tagged with: javascript
tagged with: html5-video
score: 0
has body: I have video and canvas which has transformed video: &lt;video id="v" controls loop autoplay="autoplay"&gt; &lt;source src="file:///clip01-sound.mp4" type=video/mp4&gt; Canvas received images from video: function draw(video, context, w, h) { if (video.paused || video.ended) return false; context.drawImage(video, 0, 0, w, h); setTimeout(function () { draw(video, context, w, h); }, 0); } I have 2 button: rotate and scale here's code: function makeRotate() { var canvas = document.getElementById('c'); var oldW = canvas.width; var oldH = canvas.height; canvas.width = oldH; canvas.height = oldW; var ctx = canvas.getContext('2d'); ctx.translate(canvas.width, 0); ctx.rotate(Math.PI / 2); } function makeScale() { var canvas = document.getElementById('c'); var ctx = canvas.getContext('2d'); ctx.scale(1.5, 1.5); } If I click rotate button and scale then everything is OK. But if I press scale which works OK but then rotate I receive rotated video but scale is reseted to 1. What's wrong with my code or it's default behavior of rotate function. If yes how can I change it? Thanks

http://stackoverflow.com/a/25209929
answers question: http://stackoverflow.com/q/25209590
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25209590
type: Answer
downvote count: 0
score: 2
has body: Temporarily manually setting the cursor to move seems to work. As soon as the mouse is moved again, the JS-applied CSS is cleared + normal behavior takes over. http://jsfiddle.net/x0nbvt25/2/ $(document).ready(function(){ $("body").on("click", function(c){ $(".drag").offset({ top: c.pageY-8, left: c.pageX-25 }); $("body").css("cursor", "move"); $("body").mousemove(function(){ $("body").css("cursor", ''); }); }); });
has comment: http://stackoverflow.com/comment/39262970

http://stackoverflow.com/comment/39131006
type: AnswerComment
comment on: http://stackoverflow.com/a/25138781
score: 0
type: Comment
has text: @injecteer: `str` is fastest actually. PS: oh, only now noticed you asked about a change to `!=`. It should not change anything actually.

http://stackoverflow.com/q/25148846
answer count: 1
accepted answer: http://stackoverflow.com/a/25148907
has title: Javascript Obfuscation error- get request
tagged with: obfuscation
type: AnsweredQuestion
has body: I'm making a chrome extension and i'm currently trying to obfuscate one of my scripts so users cannot view the source. For the purpose of the question, say I have this simple get request: $.get( "http://www.roblox.com/User.aspx?ID=13416513", function (data){ alert($(data).find(".UserBlurb").html()); } ); If you were to run that in console on roblox.com, you would receive an alert of the user's description. Now, if I run this code in the background page of my extension, I will receive the same result (The user's description). But I want to obfuscate this code in the background page. Running the obfuscated code in the background page wasn't working BUT if you ran the obfuscated code in console at roblox.com, it works. This has me completely confused. This is the obfuscator I was using- www.atasoyweb.net/Javascript_Encrypter
has answer: http://stackoverflow.com/a/25148907
type: Question
linked to: http://stackoverflow.com/q/194397
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/25173294
upvote count: 2
has body: I'm not using Selenium to automate testing, but to automate saving AJAX pages that inject content, even if they require prior authentication to access. I tried tl;dr: I tried multiple tools for downloading sites with AJAX and gave up because they were hard to work with or simply didn't work. I'm resorting to using Selenium after trying out WebHTTrack (whose GUI wasn't able to start up on my Ubuntu machine + was a headache to provide authentication with in interactive-terminal mode), wget (which didn't download any of the scripts of stylesheets included on my page, see the bottom for what I tried with wget)... and then I finally gave up after a promising post on using a Mozilla XULRunner AJAX scraper called Crowbar simply seg-faulted on me. So... ended up making my own broken thing in NodeJS and Selenium-WebdriverJS My NodeJS script uses selenium-webdriver npm module which is "officially supported by the main project" to: provide login information + do necessary button-clicking &amp; typing for authentication download all JS and CSS referenced on target page download target page with original JS/CSS file links change to local file paths Now when I view my test page locally I see double of many page elements because the target site loads HTML snippets into the page each time it's loaded. I use this to download my target page right now: var $; var getTarget = function () { driver.getPageSource().then(function (source) { $ = cheerio.load(source.toString()); }); }; var targetHtmlDest = 'test.html'; var writeTarget = function () { fs.writeFile(targetHtmlDest, $.html()); } driver.get(targetSite) .then(authenticate) .then(getRoot) .then(downloadResources) .then(writeRoot); driver.quit(); The problem is that the page source I get is the already modified page source, instead of the original one. Trying to run alert("x");window.stop(); within driver.executeAsyncScript() and driver.executeScript() does nothing.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39243219
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
tagged with: selenium-webdriver
score: 1
tagged with: selenium
downvote count: 1
has title: How do I prevent Javascript from mutating a page in Selenium? How do I download the original page source?
type: Question
has answer: http://stackoverflow.com/a/27154824
linked to: http://stackoverflow.com/q/6050805
tagged with: javascript
has comment: http://stackoverflow.com/comment/39226430
duplicate of: http://stackoverflow.com/q/6050805
linked to: http://stackoverflow.com/q/18539491
has comment: http://stackoverflow.com/comment/39196107
answer count: 1
has comment: http://stackoverflow.com/comment/39428552
has comment: http://stackoverflow.com/comment/39224402
favorite count: 0

http://stackoverflow.com/q/25130752
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39115940
tagged with: angularjs
has body: My angularjs application basically loads in 4 steps: main HTML all scripts and CSS files $templateCache, let's call it template.html images I guess, I should bypass the $templateCache when loading the starting page. But for now, I'd like to start fetching template.html ASAP, i.e., at the same time as the scripts get loaded. The possibly relevant piece of my code looks like Here, my.js contains all my scripts and gets loaded at the same time as angular. Is there something allowing me to fetch template.html in the same way, so it gets put into the browser's cache? Update I've tried two prefetching possibilities, both failed: and The first gets cancelled and the second comes too late to be effective.
score: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39116578
tagged with: caching
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25319550
has title: Prefetching $templateCache
has comment: http://stackoverflow.com/comment/39116004
accepted answer: http://stackoverflow.com/a/25319550

http://stackoverflow.com/comment/39011574
type: Comment
has text: as far as I know, yes. Mustache does not have any support to literate through objects
type: AnswerComment
comment on: http://stackoverflow.com/a/25075028
score: 0

webgl
tags question: http://stackoverflow.com/q/25224031
tags question: http://stackoverflow.com/q/25106352
tags question: http://stackoverflow.com/q/25088896
tags question: http://stackoverflow.com/q/25176566
tags question: http://stackoverflow.com/q/25158014
tags question: http://stackoverflow.com/q/25222397
tag name: webgl
type: Tag
tags question: http://stackoverflow.com/q/25115214

http://stackoverflow.com/a/25229920
score: 1
answers question: http://stackoverflow.com/q/25229872
downvote count: 0
has body: $_POST is an array and if you try to access an array location which doesn't exists php will throw an error, also you are open to sql injection. You can use this to provide a default value to the $images variable: $image1 = isset($_POST['image_1']) ? $_POST['image_1'] : "null"; $image2 = isset($_POST['image_2']) ? $_POST['image_2'] : "null"; $image3 = isset($_POST['image_3']) ? $_POST['image_3'] : "null"; $image4 = isset($_POST['image_4']) ? $_POST['image_4'] : "null"; Take a look at ternary operator here. Also as CBroe noted your form field as type file, you have to access them via the $_FILES global: $image1 = isset($_FILES['image_1']) ? $_FILES['image_1'] : "some default"; $image2 = isset($_FILES['image_2']) ? $_FILES['image_2'] : "some default"; $image3 = isset($_FILES['image_3']) ? $_FILES['image_3'] : "some default"; $image4 = isset($_FILES['image_4']) ? $_FILES['image_4'] : "some default";
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25229872
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39300383

http://stackoverflow.com/a/25078705
accepted answer of: http://stackoverflow.com/q/25078541
answers question: http://stackoverflow.com/q/25078541
score: 0
type: AcceptedAnswer
has body: I would use this CSS to visually disable a link: .disable { position: relative; } .disable:before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; } .disable a { color: gray; cursor: default; } Then in order to disable a link you would put a class disable on corresponding li: Download What it does is basically overlays a link with transparent pseudo element :before. Another solution could be using pointer-events: none rule but it's not well supported in IE. Demo: http://jsfiddle.net/LPz2Z/1/
type: Answer

http://stackoverflow.com/comment/39163093
type: QuestionComment
has text: Oh, I was not paying attention. the mistake was in view t = loader.get_template("arhive_ajax.html") , I corrected it, now t = loader.get_template("archive_ajax.html") Now when I click to link I see in the place where might be posts: {"content": " \n \u0430\u0432\u0442\u043e\u0440: \n \n \n", "status": 200, "statusText": "OK"}
comment on: http://stackoverflow.com/q/25155955
score: 0
type: Comment

http://stackoverflow.com/comment/39231773
has text: @adeneo That was soo Cool and Thanks
score: 0
comment on: http://stackoverflow.com/q/25193211
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25193022
has comment: http://stackoverflow.com/comment/39232904
has comment: http://stackoverflow.com/comment/39232197
upvote count: 1
has comment: http://stackoverflow.com/comment/39233049
has comment: http://stackoverflow.com/comment/39231758
downvote count: 0
has body: Instead of going from the child up to the parent, use the jQuery :has selector to filter elements based on descendents. $(tableObj).find('tr:has(td.RedCell)').hide(); In addition, you'll probably want to hide all of the cells only if none are already hidden. If any are hidden, you'll want to show those and keep the rest visible. Here's an example of that... var rows = $(tableObj).find('tr:gt(0)'); // Skips the first row if(rows.is(':hidden')) { // Contains elements which are hidden rows.show(); } else { rows.hide(); } The result would be: function expandCollapseTable(tableObj, which) { var rows = $(tableObj).find('tr:gt(0)'); if(which == 'RED') { // First snippet rows.has('td.RedCell').hide(); } else if(which == 'ALL') { // Second snippet if(rows.is(':hidden')) { rows.show(); } else { rows.hide(); } } } http://codepen.io/anon/pen/xlmcK Extra programming candy: The second snippet could be reduced to rows[rows.is(':hidden')?'show':'hide']();
has comment: http://stackoverflow.com/comment/39231884
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25192078
score: 1
answers question: http://stackoverflow.com/q/25192078
has comment: http://stackoverflow.com/comment/39232239
type: Answer
has comment: http://stackoverflow.com/comment/39255740

http://stackoverflow.com/a/25095465
has comment: http://stackoverflow.com/comment/39081631
has body: You have to give position from bottom to your carousel-caption class. like following: .carousel-caption { bottom:-95px; } For showing the caption outside the carousel-inner class, you have to set padding bottom into that class otherwise the caption will not appear. It will hide due to overflow .carousel-inner { padding-bottom:95px; }
score: 5
upvote count: 5
downvote count: 0
answers question: http://stackoverflow.com/q/25095260
type: Answer
has comment: http://stackoverflow.com/comment/104143670

http://stackoverflow.com/comment/39185204
has text: Just pass `.sort()` a custom sorting function. You can access the `index` property of the objects and use to determine order. http://www.javascriptkit.com/javatutors/arraysort.shtml
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25168086

http://stackoverflow.com/q/25152070
has title: Checkbox functionality not working when parent has a click event
has answer: http://stackoverflow.com/a/25152199
type: Question
has answer: http://stackoverflow.com/a/25152098
tagged with: javascript
upvote count: 2
has answer: http://stackoverflow.com/a/25152223
answer count: 3
downvote count: 0
tagged with: jquery
has body: I have a checkbox inside a div which has a click event attached to it. But the checking and unchecking the checkbox directly doesn't work. Item function select(e) { var elm = $(e); var chkBox = elm.find('input'); console.log(chkBox.is(':checked')); if(chkBox.is(':checked')) { chkBox.prop("checked", false); }else{ chkBox.prop("checked", true); } } Demo : http://jsfiddle.net/h45A5/
favorite count: 0
possible better answer: http://stackoverflow.com/a/25152098
accepted answer: http://stackoverflow.com/a/25152199
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25153626
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40548858
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40547814
has comment: http://stackoverflow.com/comment/40549879
tagged with: jquery-plugins
answer count: 3
has comment: http://stackoverflow.com/comment/40549502
has comment: http://stackoverflow.com/comment/40550224
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has title: Dynamically added elements don't wrap
linked to: http://stackoverflow.com/q/25122514
has body: In my plug-in I need to wrapp all sidebar's children in a div to let them overflow but if those elements are loaded dynamically the function does not work and I don't know either how to make it work. The code is: &lt;div class="sidebar"&gt; &lt;/div&gt; var $sidebar = $( '.sidebar' ); $sidebar.load( 'external-page.ext' ); $sidebar.MyPlugin(); $.fn.MyPlugin = function() { this.wrapInner( '&lt;div /&gt;' ); }); If those elements are not loaded dynamically there is no problem. Firstly the code was: $sidebar.wrapInner( '&lt;div/&gt;' ); and this just works fine if elemens are not loaded dynamically, so I tried this way: var children = $sidebar.children(); $( document ).on( 'load', children, function() { $( this ).wrapAll( '&lt;div /&gt;' ); }); but, of course it does not work. Can you please help me? I thought that this rule would have worked this time too but it didn't. What did I mistake? You can find the whole code here. And a demo here MORE DETAILS I want to handle this issue from the inside, not from the outside! I don't know if users will load content dinamically or not. that's the point. So there is a way to handle this issue inside the plugin and not outside?
has comment: http://stackoverflow.com/comment/40758073
has answer: http://stackoverflow.com/a/25905612
has answer: http://stackoverflow.com/a/25909746
has answer: http://stackoverflow.com/a/25966820
upvote count: 2

http://stackoverflow.com/q/25114206
tagged with: arrays
favorite count: 0
type: UnansweredQuestion
tagged with: php
has title: How to plot all the latitudes and longitudes on google map using javascript
has body: foreach ($arrResults['statuses'] as $arrSearchResult) { $geocode = file_get_contents('http://maps.google.com/maps/api/geocode/json? address='.str_replace(" ","+", urlencode($address)).'&amp;sensor=false'); $output = json_decode($geocode); if($output-&gt;status == 'OK') { echo "Latitude : ".$latitude = $output-&gt;results[0]-&gt;geometry-&gt;location-&gt;lat; echo "&lt;br/&gt;"; echo "Longitude : ".$longitude = $output-&gt;results[0]-&gt;geometry-&gt;location-&gt;lng; } and my script is: $(document).ready(function () { var latitude = parseFloat ("&lt;?php echo $latitude; ?&gt;"); var longitude = parseFloat ("&lt;?php echo $longitude; ?&gt;"); var latlngPos = new google.maps.LatLng (latitude, longitude); // Set up options for the Google map var myOptions = { zoom: 14, center: latlngPos, mapTypeId: google.maps.MapTypeId.ROADMAP, zoomControlOptions: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.LARGE } }; // Define the map map = new google.maps.Map(document.getElementById("map"), myOptions); // Add the marker var marker = new google.maps.Marker({ position: latlngPos, map: map, title: "Your Location" }); }); &lt;/script&gt; as this script is showing only last value of longitude and latitude,but i want to display all the previous locations also.... when i use echo it displays all the latitudes and longitudes.....pls help me
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39196956
type: Question
has comment: http://stackoverflow.com/comment/39120254
has comment: http://stackoverflow.com/comment/39128778
tagged with: javascript
tagged with: google-maps
upvote count: 1
has comment: http://stackoverflow.com/comment/39130077

http://stackoverflow.com/a/25143390
score: 27
has comment: http://stackoverflow.com/comment/75727821
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25142594
has body: Awkwardly enough, I found the answer moments after posting this but I thought anyone who comes across the same problem as me will find solace in this answer; It seems downloading the latest version of Internet Explorer is not enough and you must explicitly specify the version of IE to use by adding a new registry key. HTML fix; &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt; ... other headers &lt;/head&gt; &lt;body&gt; ... content &lt;/body&gt; &lt;/html&gt; Via registry; Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION for 64-bit or 32-bit only machines. Or go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION for 32-bit on 64-bit systems (It cannot hurt to add keys to both locations if you have them. If you do not have them, you can make the folders yourself). Create a new DWORD key and name it the name of your application e.g. "myapp.exe" and then edit the value of the key. There are many different values you can add depending on the IE version you want to emulate. I entered 11001 (as a decimal value - 0x2AF9 in HEX) which emulates IE 11 (many more values located at: http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation). If you're using Visual Studio like I am, you'll notice that this method might not even work. However, it does work. You need to manually open the .exe file using Explorer or terminal rather than run the project on Visual Studio. If you wish to run the program on Visual Studio then consider adding a key for "myapp.vshost.exe" as this is used for debugging. More information and source is from; http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version. I hope this helps anyone with any issue regarding your Web Browser perhaps using the wrong IE version as a wrapper or functions are not working as inte…
upvote count: 27
downvote count: 0
answers question: http://stackoverflow.com/q/25142594

http://stackoverflow.com/q/25103915
accepted answer: http://stackoverflow.com/a/25105441
tagged with: java
tagged with: eclipse
type: Question
has comment: http://stackoverflow.com/comment/39065566
tagged with: javascript
has title: Browser.evaluate() method showing error
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39065422
has comment: http://stackoverflow.com/comment/39065501
has comment: http://stackoverflow.com/comment/39065394
tagged with: swt
has answer: http://stackoverflow.com/a/25105441
has body: I have written a simple Java program using the SWT API. I have instantiated a browser in the app and trying to use the browser.evaluate() method . But It shows me the following error The method evaluate(String) is undefined for the type Browser Here is my complete programe import java.awt.event.MouseEvent; import org.eclipse.swt.SWT; import org.eclipse.swt.SWTError; import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.custom.CTabItem; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.swt.browser.*; import org.eclipse.swt.printing.*; import org.eclipse.swt.events.*; public class example { public static void main(String args[]) { final Display display = new Display(); final Shell shell=new Shell(display); shell.setText("Informatica Business Glossary Desktop"); final Browser browser = new Browser(shell,SWT.NONE); final String SCRIPT01 = "var html = \"\";"+ "if (typeof window.getSelection != \"undefined\") {"+ "var sel = window.getSelection();"+ "if (sel.rangeCount) {"+ "var container = document.createElement(\"div\");"+ "for (var i = 0, len = sel.rangeCount; i &lt; len; ++i) {"+ "container.appendChild(sel.getRangeAt(i).cloneContents());"+ "}"+ "html = container.innerHTML;"+ "}"+ "} else if (typeof document.selection != \"undefined\") {"+ "if (document.selection.type == \"Text\") {"+ "html = document.selection.createRange().htmlText;"+ "}" + "}" + "return html"; //final Browser browser; if(browser!=null) { browser.setUrl("https://www.google.com"); } browser.addMouseListener(new MouseListener(){ @Override public void mouseDoubleClick(org.eclipse.swt.events.MouseEvent e) { String selection = (String)browser .evaluate(SCRIPT01); // TODO Auto-generated method stub } @Override public void mouseDown(org.eclipse.swt.events.MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseUp(org.eclipse.swt.events.MouseEvent…
has comment: http://stackoverflow.com/comment/39065572
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39065551

http://stackoverflow.com/comment/39539177
has text: @NaingLinAung: This is default behavior in iOS 7, the search icon will be centralized initially and when we tap on the search field given, the search icon will go to the left and keyboard will come up. You may check the contacts app in iOS 7. Still you want to keep the search icon in center you have to create customized search field in your own way.
comment on: http://stackoverflow.com/q/25174402
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39264303
score: 0
type: AnswerComment
type: Comment
has text: I agree that he should not rely only on JS, but I guess his goal is to reduce the load of the server by skipping the upload of images that will be deleted on the server.
comment on: http://stackoverflow.com/a/25210647

http://stackoverflow.com/comment/39030971
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25085142
has text: nope, not gonna answer this question...
type: Comment

http://stackoverflow.com/a/25097375
accepted answer of: http://stackoverflow.com/q/25097342
upvote count: 3
has body: You need to put the JavaScript behind the div. Otherwise the JavaScript will not find the div you want because it isn't existing yet. If this is the case, you have 3 options: Move the JavaScript under the div Move the div above the javaScript Use window.onload in your JavaScript
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25097342
type: Answer
score: 3

http://stackoverflow.com/q/25149560
has answer: http://stackoverflow.com/a/25149808
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25149808
tagged with: angularjs-scope
type: Question
has body: i'm new in AngularJs (started an couple hours ago) and i'm trying to complete the AngularJs in 60 minutes'ish tutorial. But i got stucked on the first controllers example. This is my code: Angular Js {{name}} {{ cust.name}} - {{cust.city}} This is the error i got from the ChromeDev Console: Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify th...<omitted>...2) angular.js:78 (anonymous function) angular.js:78 (anonymous function) angular.js:4003 forEach angular.js:328 loadModules angular.js:3964 createInjector angular.js:3904 doBootstrap angular.js:1500 bootstrap angular.js:1515 angularInit angular.js:1427 (anonymous function) angular.js:23362 trigger angular.js:2653 (anonymous function) angular.js:2933 forEach angular.js:328 eventHandler angular.js:2932 As a newbie, I dont want to get into injector or modules and stuff. Since the tutorial is get to work only with this piece of code. Thanks!
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25149646
score: 0
has title: AngularJs Injector Module Error
has answer: http://stackoverflow.com/a/25149646
answer count: 3
has answer: http://stackoverflow.com/a/25149828
tagged with: angularjs-ng-repeat
favorite count: 0
tagged with: angularjs
upvote count: 1

http://stackoverflow.com/a/25082594
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39097429
has comment: http://stackoverflow.com/comment/39099244
has body: One solution would be to pop up a loading image. Keep the image up until the DB finishes it job and then hide that image. Here is a link to one I found after a quick Google search. Loading image
answers question: http://stackoverflow.com/q/25081535

http://stackoverflow.com/q/25188429
has comment: http://stackoverflow.com/comment/39222772
has comment: http://stackoverflow.com/comment/39222557
type: UnansweredQuestion
tagged with: timezone
has answer: http://stackoverflow.com/a/25188551
has answer: http://stackoverflow.com/a/25188697
linked to: http://stackoverflow.com/q/15141762
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: date
answer count: 2
has body: So to clarify why I want to do this: I need to send push notifications to users when it's 7pm in their timezone. For each registered device, I have a timezone string, like "Europe/Paris". I'm creating a background job which will run every hour. It should fetch the list of users for which it's 7pm, and send them a notification. So the question I'd like to answer is: "Where in the world is it 7pm now" Edit The important thing is to get the timezone, even if it's not formatted like "Europe/Paris", I can do that conversion manually with an array.
has comment: http://stackoverflow.com/comment/39224799
downvote count: 0
has comment: http://stackoverflow.com/comment/39222591
has title: For a given hour, how to get the timezone where the hour is
favorite count: 0

http://stackoverflow.com/q/25081078
tagged with: grunt-exec
tagged with: node.js
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25301502
type: Question
downvote count: 0
tagged with: javascript
tagged with: gruntjs
possible better answer: http://stackoverflow.com/a/25147122
answer count: 3
has title: executing linkchecker.exe with grunt-exec and powershell
has answer: http://stackoverflow.com/a/25147122
accepted answer: http://stackoverflow.com/a/25301502
favorite count: 0
has body: I want to include my linkchecker test into grunt. I can execute it just fine with powershell &amp; 'C:\Program Files (x86)\LinkChecker\linkchecker.exe' http://localhost:3000 This is my Gruntfile: module.exports = function (grunt) { //load plugins [ 'grunt-cafe-mocha', 'grunt-contrib-jshint', 'grunt-exec', ].forEach( function(task){ grunt.loadNpmTasks(task); } ); //configure plugins grunt.initConfig( { /* cafemocha: { all: { src: 'qa/tests-*.js', options: { ui: 'tdd', } } },*/ jshint: { app: [ 'meadowlark.js', 'public/js/**/*.js', 'lib/**/*.js', ], qa: [ 'Gruntfile.js', 'public/qa/**/*.js', 'qa/**/*.js,' ] }, exec: { linkchecker: { cmd: '\&amp; \'C:\\Program Files (x86)\\LinkChecker\\linkchecker.exe\' http://localhost:3000' } }, } ); //register tasks grunt.registerTask( 'default', [/*'cafemocha',*/ 'jshint', 'exec'] ); }; I'm getting a real headache integrating that call to linkchecker into grunt. I have tried several calls for line 39: 1.Escaping everything with full path: cmd: '&amp; \'C:\\Program Files (x86)\\LinkChecker\\linkchecker.exe\' http://localhost:3000' Result: "&amp;" kann syntaktisch an dieser Stelle nicht verarbeitet werden. Exited with code: 1. Translation: Can't handle the &amp; 2.Escaping everything and the &amp;with full path: cmd: '\&amp; \'C:\\Program Files (x86)\\LinkChecker\\linkchecker.exe\' http://localhost:3000' Result: ^ [W044] Bad or unnecessary escaping. 3.Setting up a local variable for the path to linkchecker.exe: cmd: '$env:linkchecker http://localhost:3000' Result: Die Syntax f�r den Dateinamen, Verzeichnisnamen oder die Datentr�gerbezeichnung ist falsch. Exited with code: 1. Translation: The local variable $env:linkchecker didn't get resolved 4.Outsourcing the call to a script. cmd: '.\\qa\\linkchecker.ps1' Result: linkchecker.ps1 gets openend in a editor. I have also tried grunt-shell. The problem seems to be that grunt has to pass on the &amp; to the shell. It can't handle the &amp;, and escaping it with \&amp; doesn't help either.
has answer: http://stackoverflow.com/a/25257742
upvote count: 1

http://stackoverflow.com/comment/82325984
has text: @EnginÜstün i tried your example it's working fine on change event. but not working for drag and drop throwing error **Cannot assign to 'files' because it is a constant or a read-only property.** . I am using angular 4.
comment on: http://stackoverflow.com/a/25093356
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25158132
has comment: http://stackoverflow.com/comment/39168188
answer count: 0
has comment: http://stackoverflow.com/comment/39169274
type: UnansweredQuestion
has title: Animate images from a image menu screen off screen when other image is pressed. css amd jquery
type: Question
score: 0
tagged with: javascript
tagged with: jquery
has body: I'm working on trying to have a menu with images at 100% of the screen but only showing 25% of the image. When a image is clicked the other images transition off the screen to reveal the whole image below. When I try to stick a transition on the screen it only does the transition on the image itself. I want it to affect the other images and move them off screen. I've got jquery adding classes to the sibling images on click. The classes move the image off the screen and display the main image fine they just don't animate nicely. When I put a transition on it shows the image resizing rather then the other images moving. jsfiddle of it is here: http://jsfiddle.net/539Y9/3/ jquery: $(".imageMenuItem").click( function(event) { event.preventDefault(); $(event.currentTarget).addClass('imageMenuItemOpen'); $(event.currentTarget).nextAll().addClass('imageMenuItemClosedRight'); $(event.currentTarget).prevAll().addClass('imageMenuItemClosedLeft'); } ); HTML: CSS: .imageMenu { height: 80px; overflow: hidden; } .imageMenu ul { list-style: none; padding: 0; margin: 0; } .imageMenu li { text-decoration: none; float: left; width: 25%; overflow: hidden; transition: all 1.0s ease; } .imageMenu li:first-child .imageMenuImage { left 0; } .imageMenu li:nth-child(2) .imageMenuImage { left: -25vw; } .imageMenu li:nth-child(3) .imageMenuImage { left: -50vw; } .imageMenu li:nth-child(4) .imageMenuImage { left: -75vw; } .imageMenuImage { position: relative; width: 100vw; } .imageMenuItemOpen { width:100% !important; } .imageMenuItemOpen .imageMenuImage { width:100%; min-width: 100%; height: auto; left: 0 !important; } .imageMenuItemClosedLeft .imageMenuImage { left: -100vw !important; position: absolute; z-index: 2; } .imageMenuItemClosedRight .imageMenuImage { left: 100vw !important; position: absolute; z-index: 2; }
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/39192701
type: AnswerComment
has text: what do u mean? I don't see a url for the pop up
type: Comment
comment on: http://stackoverflow.com/a/25172025
score: 0

http://stackoverflow.com/comment/39147433
comment on: http://stackoverflow.com/q/25147601
type: Comment
type: QuestionComment
has text: Have you tried using recursion ?
score: 0

http://stackoverflow.com/comment/39200789
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25164832
has text: Bobik does look like something I need, but their website is down... Are there other alternatives? Or do you know some workaround?

http://stackoverflow.com/q/25222156
has comment: http://stackoverflow.com/comment/39285888
has answer: http://stackoverflow.com/a/25222639
has answer: http://stackoverflow.com/a/25222944
tagged with: php
has answer: http://stackoverflow.com/a/25222313
type: UnansweredQuestion
has body: I have this problem on how I could automatically update my webpage without refreshing. Could someone suggest and explain to me what would be the best way to solve my problem? Thanks in advance add.php file In this php file, I will just ask for the name of the user. &lt;form id="form1" name="form1" method="post" action="save.php"&gt; &lt;input type="text" name="firstname" id="firstname"/&gt; &lt;input type="text" name="lastname" id="lastname"/&gt; &lt;input type="submit" name="add" id="add" value="add"/&gt; &lt;/form&gt; save.php In this file, I will just save the value into the database. $firstname=isset($_POST['firstname'])? $_POST['firstname'] : ''; $lastname=isset($_POST['lastname'])? $_POST['lastname'] : ''; $sql="Insert into student (sno,firstname,lastname) values ('','$firstname','$lastname')"; $sql=$db-&gt;prepare($sql); $sql-&gt;execute(); studentlist.php In this file, i want to display the name I enter $sql="Select firstname, lastname from student"; $sql=$db-&gt;prepare($sql); $sql-&gt;execute(); $output="The List of students &lt;br&gt;&lt;/br&gt;"; while($result=$sql-&gt;fetch(PDO::FETCH_ASSOC)) { $output.="".$result['firstname']." ".$result['lastname']."&lt;br&gt;&lt;/br&gt;"; } Problem When the two pages is open, I need to refresh the studentlist.php before i can see the recently added data. thanks :D
tagged with: mysql
has comment: http://stackoverflow.com/comment/39286358
has comment: http://stackoverflow.com/comment/39286087
type: Question
has title: Automatically update another page without refreshing
tagged with: javascript
score: 0
answer count: 3
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/39109039
type: Comment
type: QuestionComment
has text: I assume since you get there empty values when you print `firstName` you get nothing (e.g if you print one of the boolean attributes you will get false). I would say check again if you return the correct information from the API. Or create a jsbin.
comment on: http://stackoverflow.com/q/25126436
score: 0

http://stackoverflow.com/comment/59358579
type: Comment
has text: @GünterZöchbauer that's interesting; the [31 Jan 2016 draft](https://drafts.csswg.org/css-scoping/#shadow-dom) of the Scoping Module still includes `::shadow` and `>>>` though they're marked with "issues".
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25211321

http://stackoverflow.com/comment/39276136
type: Comment
has text: @user3809706 `.html()` Processes the string as HTML whereas `.text()` Processes the content as text.
comment on: http://stackoverflow.com/a/25216576
score: 0
type: AnswerComment

http://stackoverflow.com/q/25073707
has answer: http://stackoverflow.com/a/25074148
has comment: http://stackoverflow.com/comment/39009328
type: UnansweredQuestion
has body: I'm newbea to java and i want to know is there anything similar functionality as javascript bind in java. ex : function x(bindedArg, arg1, arg2){ } x.bind(this, 'bindedArg'); x('arg1', 'arg2'); Update: A good example would be in event's callback function. What if i need an object / argument available in the actual event callBack context, that was previously available at the time of setting a callback to an event.
has comment: http://stackoverflow.com/comment/39009070
has answer: http://stackoverflow.com/a/25074079
has comment: http://stackoverflow.com/comment/39009478
upvote count: 2
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39009435
tagged with: java
tagged with: javascript
has comment: http://stackoverflow.com/comment/39009106
answer count: 2
has comment: http://stackoverflow.com/comment/39009558
score: 1
has title: Is there a javascript bind like function in java
favorite count: 0

http://stackoverflow.com/comment/39150974
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25148246
score: 0
has text: If you downvote at least explain the reason behind that.

http://stackoverflow.com/comment/39013941
has text: How are they delimited ? Comma? space? Line Feed?
comment on: http://stackoverflow.com/q/25076300
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25210042
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39263966
has body: please note, for this code, you need jquery library str = "ball, apple, mouse, kindle"; str_arr = str.split(','); for (i = 0; i &lt; str_arr.length; i++) { if($.trim(str_arr[i]) === "apple"){ alert('yiha i found an apple here. here it is: ' + str_arr[i]); } }
upvote count: 1
answers question: http://stackoverflow.com/q/25209979

http://stackoverflow.com/comment/39058660
type: Comment
has text: The typical place to put them is inside a ` ` tag at the bottom of your ` `. Make sure they appear after the `video.js` and `ContextJS` scripts.
type: AnswerComment
comment on: http://stackoverflow.com/a/25097024
score: 0

http://stackoverflow.com/comment/39267237
comment on: http://stackoverflow.com/a/25193236
type: AnswerComment
has text: the problem that in my case the the content of the array is is available only after the "$(document).ready(function () "
score: 0
type: Comment

http://stackoverflow.com/comment/39286849
type: Comment
has text: Which ` ` do you want to get?
type: QuestionComment
comment on: http://stackoverflow.com/q/25222572
score: 0

http://stackoverflow.com/comment/39052616
type: Comment
comment on: http://stackoverflow.com/a/25096629
has text: You are not getting ids on delete_user.php file ?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39294612
type: Comment
comment on: http://stackoverflow.com/q/25226850
has text: can you post your `html.erb` file?
score: 0
type: QuestionComment

http://stackoverflow.com/a/25203403
has comment: http://stackoverflow.com/comment/39250901
has comment: http://stackoverflow.com/comment/39251568
type: Answer
has comment: http://stackoverflow.com/comment/39250211
score: 2
has body: To find the invalid characters, just take the ^ off from your regex. The carret is the negative of everything that is inside the brackets. data-val-regex-pattern="[|&lt;&gt;:\?'\*\[\]\=%\$\+,;~&amp;\{\}]*" This will return the undesired characters so you can replace them. Also, as you want to take off a lot of non-word characters, you could try a simpler regex. If you want only word characters and spaces, you could use something like this: data-val-regex-pattern="[\W\S]*"
upvote count: 2
answers question: http://stackoverflow.com/q/25203108
has comment: http://stackoverflow.com/comment/39250696
has comment: http://stackoverflow.com/comment/39251188
has comment: http://stackoverflow.com/comment/39250670
downvote count: 0
has comment: http://stackoverflow.com/comment/39251141
has comment: http://stackoverflow.com/comment/39251101

http://stackoverflow.com/comment/107527371
type: Comment
has text: Put your entire ` ` inside ` `
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/34216265

http://stackoverflow.com/q/25125613
answer count: 1
tagged with: ruby-on-rails-3
accepted answer: http://stackoverflow.com/a/25126222
has body: In my Rails app, I'm trying to ask the user in the footer which country he'd like to see (France/United States/Germany...) and then store this in session and reload the page he's currently on. Note that: I just want the current page to reload but I don't want to add a params in the URLs of my app(ie I don't want example.com/browser_country=France). I want them to stay as they are (example.com). How can I do that? This is my code below but it's not working (i'm a Rails newbie): MySuper Website "location.href = '#{current_path}'" > Select Country France United States Here if the controller that loads the page (homepage)on /app/controllers/static_pages_controller.rb class StaticPagesController < ApplicationController def home end def set_country_into_session session[:country] = :browser_country # i'm putting in session the country selected in the dropdown end end
has answer: http://stackoverflow.com/a/25126222
tagged with: ruby
tagged with: ruby-on-rails
type: AnsweredQuestion
tagged with: javascript
type: Question
score: 0
has title: Pass value of selected country (dropdown) in session and then reload current page (Rails 4)

http://stackoverflow.com/a/25081271
type: Answer
has body: use classes and then iterate through them, so instead of accessing objects with their ID you use the jquery class selector aka $(".CLASS_NAME"); make your input have a class and select via that class lets say your input has class="duplicated_input" then you select and iterate like this. var _inputs = $(".duplicated_input"); for(var i = 0; i &lt; _inputs.length; i++) { var _input = _inputs[i]; //do your logic here. } example JSFIDDLE
has comment: http://stackoverflow.com/comment/39023822
answers question: http://stackoverflow.com/q/25081161
has comment: http://stackoverflow.com/comment/39025665
score: 0

http://stackoverflow.com/comment/109203832
type: AnswerComment
comment on: http://stackoverflow.com/a/25150793
type: Comment
has text: @integrater Is `end` in your code a Moment instance? Try wrapping it with `moment()` to convert it. `.diff()` is a MomentJS method only available on Moment objects, not native JS Date objects.
score: 2

http://stackoverflow.com/comment/82128385
has text: Possible duplicate of [How to display whole PDF (not only one page) with PDF.JS?](https://stackoverflow.com/questions/16480469/how-to-display-whole-pdf-not-only-one-page-with-pdf-js)
comment on: http://stackoverflow.com/q/25162554
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39269961
score: 0
has text: @elzi is there some standard which states what key codes can be used? The space bar seems to be the common one, but will this be universally true?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25213459

http://stackoverflow.com/a/25153133
has body: I'm not sure I understand you correctly, but this may be what you want: var optInFieldIsVisible = false; var optInField = jQuery( 'input[name*="email"]' ); jQuery("*").find('input').bind('input propertychange', function() { if (/.ca$|canada|canadian/i.test( jQuery(this).val() &amp;&amp; !optInFieldIsVisible ) ) { optInFieldIsVisible = true; optInField.closest( '.formField' ).show(); // show special form field because reference to canada is present } else if (optInFieldIsVisible){ optInFieldIsVisible = false; optInField.closest( '.formField' ).hide(); // hide special form field because reference to canada is removed } });
has comment: http://stackoverflow.com/comment/39184654
has comment: http://stackoverflow.com/comment/39184828
answers question: http://stackoverflow.com/q/25152867
score: 0
has comment: http://stackoverflow.com/comment/39190886
has comment: http://stackoverflow.com/comment/39239897
type: Answer
has comment: http://stackoverflow.com/comment/39225364

http://stackoverflow.com/comment/39054560
score: 1
has text: this http://jsfiddle.net/JT93H/ yields a `ReferenceError: togglevisibility is not defined {"error": "Please use POST request"}` when clicking on show, but works on clicking on display.
comment on: http://stackoverflow.com/q/25097737
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39150582
type: AnswerComment
score: 0
has text: @sywester can we do that only one popover open atone time
type: Comment
comment on: http://stackoverflow.com/a/25149212

http://stackoverflow.com/a/25237105
upvote count: 1
answers question: http://stackoverflow.com/q/25143082
downvote count: 0
has body: You can use optionAfterRender property for adding more functionality to your select. Consider this example Show selection function Option(id, name){ var self = this; self.Id = id; self.Name = name; } function ViewModel(){ var self = this; self.options = ko.observableArray([ new Option(0, "NormalText"), new Option(1, "AnotherText"), new Option(2, "WaaaaaaaaaaaaaaaayTooLongText") ]); self.selectedOption = ko.observable(); self.showSelectedOptions = function(){ console.log(self.selectedOption()); } self.setTitle = function(option, item) { option.title = item.Name // other properties } } ko.applyBindings(new ViewModel()); SQL Fiddle Demo Make sure you have version 3.1.0
type: Answer
score: 1

http://stackoverflow.com/comment/39110271
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25114866
has text: You'll have to find a suitable tolerance(note that the tolerance is defined in degrees not in meters). `0.01` should be a good value http://jsfiddle.net/doktormolle/5h64f/
type: AnswerComment

http://stackoverflow.com/q/25229138
tagged with: jquery
has comment: http://stackoverflow.com/comment/39299120
has comment: http://stackoverflow.com/comment/39298966
has answer: http://stackoverflow.com/a/25229946
tagged with: carousel
tagged with: css
has body: Have such problem. I try create custom slider editing bxslider. I set classes to active, next and prev &lt;li&gt; and I would want that by clicking on the .next-caption and the .prev-caption li slider did the same thing as clicking on .bx-next and .bx-prev, that is twisted slider. Here my js $('.bxslider').bxSlider({ minSlides: 3, maxSlides: 3, slideWidth: 350, slideMargin: 0, moveSlides: 1, pager: false, // auto: true, speed: 3000, pause: 8000, // autoHover: true, onSlideBefore: function (currentSlideNumber, totalSlideQty, currentSlideHtmlObject) { console.log(currentSlideHtmlObject); $('.active-caption').removeClass('active-caption'); $('.bxslider&gt;li').eq(currentSlideHtmlObject + 4).addClass('active-caption'); $('.prev-caption').removeClass('prev-caption'); $('.bxslider&gt;li').eq(currentSlideHtmlObject + 3).addClass('prev-caption'); $('.next-caption').removeClass('next-caption'); $('.bxslider&gt;li').eq(currentSlideHtmlObject + 5).addClass('next-caption') }, onSliderLoad: function () { $('.bxslider&gt;li').eq(4).addClass('active-caption'); $('.bxslider&gt;li').eq(3).addClass('prev-caption'); $('.bxslider&gt;li').eq(5).addClass('next-caption') }, }); Thanks for any help! See JsFiddle DEMO
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25554128
has answer: http://stackoverflow.com/a/25554128
tagged with: bxslider
type: Question
accepted answer: http://stackoverflow.com/a/25229946
has title: bxslider bind .next button to next slide in carousel
tagged with: javascript
has comment: http://stackoverflow.com/comment/39299151
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39298903

http://stackoverflow.com/q/25218684
has body: I know about this subject is repeated but I don't know what I'm doing wrong... See my code: alert(CKEDITOR.instances.MyToolbar.getData()); // i see this alert... if (CKEDITOR.instances.MyToolbar.getData() == 0) { document.getElementById('wystaw_s3').classList.add("red"); document.getElementById('MyToolbar').classList.add("redborder"); return false; } else { document.getElementById('wystaw_s3').classList.remove("red"); document.getElementById('MyToolbar').classList.remove("redborder"); } Any clue? THX!
type: Question
tagged with: javascript
tagged with: ckeditor
has answer: http://stackoverflow.com/a/25228033
score: 0
answer count: 1
has title: Javascript validate CKEditor
type: UnansweredQuestion

http://stackoverflow.com/comment/39207922
type: AnswerComment
type: Comment
score: 0
has text: if everything is already in em then you can just concentrate on the layout to convert it to % .. rest is all hit and try :) no fixed solution can be provided for these situations
comment on: http://stackoverflow.com/a/25176343

http://stackoverflow.com/a/25244823
type: Answer
answers question: http://stackoverflow.com/q/25229992
has body: There are a couple of ways of doing it. 1) Loading a gradient image and applying it to the material,as mentioned in the comments by @GuyGood the code will be something like this: var circleGeometry = new THREE.CircleGeometry(200, 200, 32); var texture = THREE.ImageUtils.loadTexture('image/shadow.png');// replace with appropriate URL texture.anisotropy = renderer.getMaxAnisotropy(); var material = new THREE.MeshBasicMaterial({ map: texture, color:0xFFFFFF }); mesh = new THREE.Mesh(circleGeometry, material); scene.add(mesh); 2) The other method I would specially mention here is , we can create a canvas element and draw anything on it(in your case it is a circle with gradient on it,but it can be anything), and create a texture of it and apply to the material. The code will be something like this var circleGeometry = new THREE.CircleGeometry(100, 100, 100); // create a texture on canvas and apply it on material var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); var x = 150, y = 75, // Radii of the black glow. innerRadius = 0, outerRadius = 200, // Radius of the entire circle. radius = 200; var gradient = ctx.createRadialGradient(x, y, innerRadius, x, y, outerRadius); gradient.addColorStop(0, 'black'); gradient.addColorStop(1, 'white'); ctx.arc(x, y, radius, 0, 2 * Math.PI); ctx.fillStyle = gradient; ctx.fill(); var shadowTexture = new THREE.Texture(canvas); shadowTexture.needsUpdate = true; var material = new THREE.MeshBasicMaterial({ map: shadowTexture, side: THREE.DoubleSide }); mesh = new THREE.Mesh(circleGeometry, material); scene.add(mesh); JSfiddle for method 2
accepted answer of: http://stackoverflow.com/q/25229992
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/39236205
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25195539
type: Comment
has text: #xdazz thank you. i realize how addEventListener to be created. i stills need straight answer. to use new loop like usual function. `loop(5){documentwrite(i)}`

http://stackoverflow.com/q/25193787
has comment: http://stackoverflow.com/comment/39233668
type: Question
has comment: http://stackoverflow.com/comment/39232793
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
score: 0
has comment: http://stackoverflow.com/comment/39232761
answer count: 1
has comment: http://stackoverflow.com/comment/39234520
has answer: http://stackoverflow.com/a/25194016
has comment: http://stackoverflow.com/comment/39232751
has body: I need to create a html structure as follows: Root node 1 Child node 1 Child node 2 Child node 3 Root node 2 Child node 4 Child node 5 My issue is that i am unable to generate the id indexes. i need to do this using angularjs. can someone please help? I am very new to angularjs.
has title: Generate tag id from angularjs
tagged with: javascript
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/19126905

http://stackoverflow.com/q/25208624
has body: Im writing an app that has a ton of locations, all with coordinates, I want the app to be able to search for the locations by name, or by which one is closest. I know how to determine the distance between two coordinates via the haversine formula. However I want my app to go through each object(location) in an array and add a new element to that object called distance and distance should be the distance to the location from my location. I have the following code that I think should work but it doesn't. Does anyone have any ideas? function GetLocation(location) { myLat = location.coords.latitude; myLon = location.coords.longitude; angular.forEach($scope.ASiteLocs, function(object, location) { location.Point.coordinates = location.Point.coordinates.substring(0, clength - 2).split(","); Lat = location.Point.coordinates[0]; Lon = location.Point.coordinates[1]; function getCoordDistance() { Number.prototype.toRad = function() { return this * Math.PI / 180; } var lat2 = myLat; var lon2 = myLon; var lat1 = Lat; var lon1 = Lon; var R = 3959; // Radius in miles //has a problem with the .toRad() method below. var x1 = lat2 - lat1; var dLat = x1.toRad(); var x2 = lon2 - lon1; var dLon = x2.toRad(); var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; } object.distance = d; }); } Here is what the locations look like(just a few of them): "name": "502 Nelson St, Greenville, MS 38701", "visibility": "0", "description": "502 Nelson St, Greenville, MS 38701", "styleUrl": "#waypoint", "Point": { "coordinates": "-91.05636,33.415485,0" } }, { "name": "242 Blackhawk Trace, Galena, IL 61036", "visibility": "0", "description": "242 Blackhawk Trace, Galena, IL 61036", "styleUrl": "#waypoint", "Point": { "coordinates": "-90.319778,42.390862,0" } }, { "name": "3747 Ocean Dr, Vero Beach, FL 32963", "visibility": "0", "description": "374…
type: Question
accepted answer: http://stackoverflow.com/a/25209569
has comment: http://stackoverflow.com/comment/39261022
has comment: http://stackoverflow.com/comment/39261708
tagged with: javascript
possible better answer: http://stackoverflow.com/a/50382022
has answer: http://stackoverflow.com/a/25209569
has answer: http://stackoverflow.com/a/50382022
score: 0
answer count: 2
tagged with: arrays
tagged with: angularjs
has title: AngularJS Getting distance between multiple coordinates
tagged with: haversine
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39261500
has comment: http://stackoverflow.com/comment/39261555
tagged with: coordinates

http://stackoverflow.com/a/25071190
has body: Try to use .attr() method instead of .src. Something like: $('#image1').attr('src', 'images/img01.jpg')
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39004788
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25071168

http://stackoverflow.com/comment/39206454
has text: @sevdah animation is applying of last ul but we can't see it because of first is not completed. We can use callback for this solution in in this [DEMO](http://jsbin.com/povafivu/12/edit)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25178817

http://stackoverflow.com/comment/39248964
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25202705
score: 1
has text: Your `.+` is greedy so it's grabbing everything between the first `[` it encounters and the last `]` it encounters. If you change it to `.+?` it won't be greedy any more and it should work.

http://stackoverflow.com/a/25102559
has body: I was going to just delete this since my answer isn't exactly what I was looking for in this question, but I can't delete it so: I was able to create the desired functionality through the following function(s): (Here is a Working Example: http://jsfiddle.net/7vH6T/ ) var creditcards = { list:[ { brand: 'American Express', image: '/images/creditcards/american-express.png', verification: '^3[47][0-9]', separation: '^([0-9]{4})([0-9]{6})?(?:([0-9]{6})([0-9]{5}))?$', hidden: '**** ****** *[0-9][0-9][0-9][0-9]', accepted: true, length: 15 }, { brand: 'MasterCard', image: '/images/creditcards/mastercard.png', verification: '^5[1-5][0-9]', separation: '^([0-9]{4})([0-9]{4})?([0-9]{4})?([0-9]{4})?$', hidden: '**** **** **** [0-9][0-9][0-9][0-9]', accepted: true, length: 16 }, { brand: 'Visa', image: '/images/creditcards/visa.png', verification: '^4[0-9]', separation: '^([0-9]{4})([0-9]{4})?([0-9]{4})?([0-9]{4})?$', hidden: '**** **** **** [0-9][0-9][0-9][0-9]', accepted: true, length: 16 }, { brand: 'Discover', image: '/images/creditcards/discover.png', verification: '^6(?:011|5[0-9]{2})[0-9]', separation: '^([0-9]{4})([0-9]{4})?([0-9]{4})?([0-9]{4})?$', hidden: '**** **** **** [0-9][0-9][0-9][0-9]', accepted: false, length: 16 }, { brand: 'Diners Club', image: '/images/creditcards/diners-club-international.png', verification: '^3(?:0[0-5]|[68][0-9])[0-9]', separation: '^([0-9]{4})([0-9]{4})?([0-9]{4})?(?:([0-9]{4})([0-9]{4})([0-9]{2}))?$', hidden: '**** **** **[0-9][0-9] [0-9][0-9]', accepted: false, length: 14 }, { brand: 'JCB', image: '/images/creditcards/jcb.png', verification: '^(?:2131|1800|35[0-9]{3})[0-9]', separation: '^([0-9]{4})([0-9]{4})?([0-9]{4})?([0-9]{4})?$', hidden: '**** **** **** [0-9][0-9][0-9][0-9]', accepted: false, length: 16 } ], active:null }; //On Keydown $('input[name="creditcard"]').keydown(function(e){ //Preset Data var card = $(this).val().replace(/[^0-9]/g,''), trim = $.trim( $(this).val().slice(0,-1) ); //Find the Credit Card for( var i=0; i&…
type: Answer
accepted answer of: http://stackoverflow.com/q/25101781
upvote count: 10
type: AcceptedAnswer
downvote count: 0
score: 10
answers question: http://stackoverflow.com/q/25101781

http://stackoverflow.com/q/25078219
has answer: http://stackoverflow.com/a/25078307
has comment: http://stackoverflow.com/comment/39021649
tagged with: flot
has comment: http://stackoverflow.com/comment/39021615
linked to: http://stackoverflow.com/q/7642442
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I am using the flot library for producing plots. The examples given on the website all have their javascript code written like this: &lt;script&gt; $(function() { ... ... ... plot ... }); &lt;/script&gt; http://www.flotcharts.org/flot/examples/realtime/index.html What does $(function() {}) bit mean?
linked to: http://stackoverflow.com/q/2662778
has comment: http://stackoverflow.com/comment/39025279
answer count: 4
has answer: http://stackoverflow.com/a/25078279
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25078307
has comment: http://stackoverflow.com/comment/39022274
has comment: http://stackoverflow.com/comment/39021072
type: Question
linked to: http://stackoverflow.com/q/6587939
has answer: http://stackoverflow.com/a/25078238
score: 1
upvote count: 5
has answer: http://stackoverflow.com/a/25078314
linked to: http://stackoverflow.com/q/2937227
has title: What does $(function() {}) mean in javascript
possible better answer: http://stackoverflow.com/a/25078238
duplicate of: http://stackoverflow.com/q/7642442
downvote count: 4

http://stackoverflow.com/q/25072453
downvote count: 1
has answer: http://stackoverflow.com/a/25073314
type: Question
has answer: http://stackoverflow.com/a/25072879
tagged with: javascript
has comment: http://stackoverflow.com/comment/39006867
has title: Passing javascript array tojava servlet
tagged with: servlets
has comment: http://stackoverflow.com/comment/39007201
has comment: http://stackoverflow.com/comment/39007474
answer count: 3
has comment: http://stackoverflow.com/comment/39006901
has answer: http://stackoverflow.com/a/25072548
tagged with: jsp
favorite count: 0
type: UnansweredQuestion
has body: I have found other question regarding on this, but still im having a problem,When i check getParamerterValues, its always return null, and i think im having trouble redirecting it to my controller.Bare with me, in new to web app. arr = []; $(document).on("click","#idhere",function(){ $.post("servlet.html","ids="+arr+"",function(response){ }); }); or is there something like converting array of javascript to JSON of array in JSP so i can pass it to my servlet? String arr [] = request.getParameterValues("ids"); if(arr != null){//this line doesnt return true even my array contains item}
score: 0
tagged with: java
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39007223
upvote count: 1

http://stackoverflow.com/a/77987981
type: Answer
answers question: http://stackoverflow.com/q/25159330
has body: You can also use a package like Luxon. With this you can parse the full ISO date (fromISO) and to with it what you want, for example output to a date only ISO (toISODate). const isoDate = DateTime.fromISO('2013-03-10T02:00:00Z').toISODate() // 2013-03-10
score: 0

http://stackoverflow.com/q/25186821
tagged with: javascript
has body: This is a follow up question on my previous one. The app is javascript/php. In Javascript, I'm getting the local timestamp and timezone offset: var timestamp = new Date().getTime(); var tzoffset = new Date().getTimezoneOffset(); I am testing this from London and the time I am passing in represents 15:30:00 GMT. I then pass these to a php script on the server, which needs to format this timestamp as H:MM:SS (i.e., php's format('h:i:s', $time). I started in PHP with this code: $dt = new DateTime(); $dt-&gt;setTimestamp($timestamp / 1000); //javascript includes milliseconds, php doesn't echo $dt-&gt;format('h:i:s'); This produced output of 07:30:00 - which is the same point in time but using the server's timezone (server is in California). I then used the trick from this question to get the timezone and set that timezone $tz = timezone_name_from_abbr(null, $tzoffset * 60, true); //javascript's offset is in seconds if($tz === false) $tz = timezone_name_from_abbr('', $tzoffset * 60, false); $dt = new DateTime(null, new DateTimeZone($tz)); $dt-&gt;setTimestamp($timestamp / 1000); echo $dt-&gt;format('h:i:s'); This produced a rather strange result of 02:30:00. I then changed the above to simply have: $dt = new DateTime(null, new DateTimeZone('Europe/London')); $dt-&gt;setTimestamp($timestamp / 1000); echo $dt-&gt;format('h:i:s'); This produced the result 03:30:00. How do I get the server to output 15:30:00 based on the information the client supplies? EDIT: Thanks, @MarkM, this was rather stupid of me - however this still doesn't completely solve the problem, as this code: $tz = timezone_name_from_abbr(null, $tzoffset * 60, true); //javascript's offset is in seconds if($tz === false) $tz = timezone_name_from_abbr('', $tzoffset * 60, false); $dt = new DateTime(null, new DateTimeZone($tz)); $dt-&gt;setTimestamp($timestamp / 1000); echo $dt-&gt;format('h:i:s'); now produces 14:30:00, that is, it doesn't take into account DST. Any ideas how to solve this? EDIT 2: I forgot that…
favorite count: 0
has title: Strange behaviour with DateTime and DateTimeZone
linked to: http://stackoverflow.com/q/25182756
tagged with: datetime
has answer: http://stackoverflow.com/a/25187327
tagged with: timezone
score: 1
linked to: http://stackoverflow.com/q/11820718
has comment: http://stackoverflow.com/comment/39219496
upvote count: 1
tagged with: php
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25187327
has comment: http://stackoverflow.com/comment/39219714
has comment: http://stackoverflow.com/comment/39219975
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25100921
has comment: http://stackoverflow.com/comment/39060278
type: Question
has comment: http://stackoverflow.com/comment/39060353
has comment: http://stackoverflow.com/comment/39060383
has body: I've THIS site: Test Site. I'm trying to get a URL for the "section.more", so I can connect to a URL like http:// ... .es/example/#more and I get loaded automatically on #more. The problem is that if I try to surround "section.more" with an anchor, I get the URL, but the animation get broken and I can't load directly on the second section by writing its URL in the browser bar. How can I do this? Codes: HTML: CSS style and jQuery scrolling test page Go Top Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porta at leo sed viverra. Donec gravida nisi massa, sit amet interdum quam laoreet et. Etiam a lorem lectus. Praesent in cursus urna. Proin sollicitudin eget ante vitae sodales. Aliquam luctus vulputate ipsum, nec gravida odio placerat sed. Nunc at metus scelerisque, consectetur tortor et, facilisis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porta at leo sed viverra. Donec gravida nisi massa, sit amet interdum quam laoreet et. Etiam a lorem lectus. Praesent in cursus urna. Proin sollicitudin eget ante vitae sodales. Aliquam luctus vulputate ipsum, nec gravida odio placerat sed. Nunc at metus scelerisque, consectetur tortor et, facilisis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. CSS .more { background: #3B383B; position: absolute; top:100%; left:0; right:0; bottom:0; display: none; } .more nav { background-color: #f0f0f0; position: fixed; top: 0; left: 0; right: 0; height: 50px; box-shadow: 0px 0px 5px black; display: none; z-index: 99; } .more #back { position: fixed; top: 51px; background: transparent; border-left: 3px solid #2083cc; border-right: 3px solid #2083cc; border-bottom: 3px solid #2083cc; border-radius: 0 0 5px 5px; width: 150px; height: 25px; padding-top: 3px; text-align: center; font-family: 'Raleway'; font-weight: 200; left: 46%; cursor: pointer; } .mo…
score: 0
has comment: http://stackoverflow.com/comment/39060330
has comment: http://stackoverflow.com/comment/39060300
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39060450
has comment: http://stackoverflow.com/comment/39060113
has comment: http://stackoverflow.com/comment/39060399
has comment: http://stackoverflow.com/comment/39060138
has title: Showing a with URL
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39060200
has comment: http://stackoverflow.com/comment/39060536

http://stackoverflow.com/q/25150562
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39152769
answer count: 1
has title: Understanding this and constructors in JavaScript
favorite count: 0
has comment: http://stackoverflow.com/comment/39152850
has body: I have a Java background and looking to understanding constructors and the this keyword in JavaScript. I came across this code which seems to be pretty straightforward var Mediator = ( function( window, undefined ) { function Mediator() { this._topics = {}; } Mediator.prototype.subscribe = function mediatorSubscribe( topic, callback ) { if( ! this._topics.hasOwnProperty( topic ) ) { this._topics[ topic ] = []; } this._topics[ topic ].push( callback ); return true; }; Mediator.prototype.unsubscribe = function mediatorUnsubscrive( topic, callback ) { if( ! this._topics.hasOwnProperty( topic ) ) { return false; } for( var i = 0, len = this._topics[ topic ].length; i &lt; len; i++ ) { if( this._topics[ topic ][ i ] === callback ) { this._topics[ topic ].splice( i, 1 ); return true; } } return false; }; Mediator.prototype.publish = function mediatorPublish() { var args = Array.prototype.slice.call( arguments ); var topic = args.shift(); if( ! this._topics.hasOwnProperty( topic ) ) { return false; } for( var i = 0, len = this._topics[ topic ].length; i &lt; len; i++ ) { this._topics[ topic ][ i ].apply( undefined, args ); } return true; }; return Mediator; } )( window ); // example subscriber function var Subscriber = function ExampleSubscriber( myVariable ) { console.log( myVariable ); }; // example usages var myMediator = new Mediator(); myMediator.subscribe( 'some event', Subscriber ); myMediator.publish( 'some event', 'foo bar' ); // console logs "foo bar" I see that the constructor sets a property in the object called _topics I tried to replicate the same logic in a simple version abstracting away only the constructor to see the behavior. var x=(function(){function x(){console.log('asdf')} return x;})(); var y=new x() And I get an error that undefined is not a function. I am returning x in the IIFE so what's going wrong. Thanks in advance
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39152846
upvote count: 0
has answer: http://stackoverflow.com/a/25150625
has comment: http://stackoverflow.com/comment/39152722
downvote count: 1
type: Question

http://stackoverflow.com/comment/39019620
score: 0
type: Comment
type: QuestionComment
has text: @Daan, maybe if you told us *why* then we would have some clue as to the constraints?
comment on: http://stackoverflow.com/q/25079293

http://stackoverflow.com/q/25180163
upvote count: 1
type: AnsweredQuestion
tagged with: rhino
score: 1
has answer: http://stackoverflow.com/a/25181656
accepted answer: http://stackoverflow.com/a/25181656
type: Question
has body: I am using the Rhino version (see title of this post), the log function should work I wonder if I have the right version. Was the log.* object deprecated? Error: java org.mozilla.javascript.tools.shell.Main js&gt; log.info('hello world') js: uncaught JavaScript runtime exception: ReferenceError: "log" is not defined. I've checked console.log('hello world') as well. But it doesn't seem to be defined either.
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Mozilla Rhino 1_7r4 reference error

http://stackoverflow.com/comment/39230395
score: 1
has text: I'm actually taking the picture from google, so this causing the error. I'll have to change how I look the picture, put it locally. Thank you very much,
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25190571

http://stackoverflow.com/comment/39290517
score: 0
type: Comment
type: QuestionComment
has text: Right. it triggers only on submit of the form. assuming that `bookselect` is the form id
comment on: http://stackoverflow.com/q/25224120

http://stackoverflow.com/comment/39156887
type: QuestionComment
score: 1
has text: in a view @scripts { } and etc.
comment on: http://stackoverflow.com/q/25152902
type: Comment

http://stackoverflow.com/q/25210494
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39266517
type: UnansweredQuestion
downvote count: 2
has title: how to get the idle time in JavaScript
has body: I have a program which uses eventStart: new Date.getTime(); when the document is loaded and when user completes some section and click continue to go to next section I have setup the function to track the end time getting the eventEnd: new Date.getTime(); now I fall in to a unique situation to track the idle Time for so I can properly calculate the total time taken by the user to finish the section. Any help or documentation regarding this would be appreciated. Thanks.
type: Question
has comment: http://stackoverflow.com/comment/39264175
score: -2
has answer: http://stackoverflow.com/a/25210662
linked to: http://stackoverflow.com/q/1060008
upvote count: 0

http://stackoverflow.com/comment/39028721
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25083878
has text: This does not hide the `div` (which I gather is the aim). It hides individual `LI`s instead.

http://stackoverflow.com/comment/39035363
type: Comment
has text: Do you have a reason to support these old browsers?
type: QuestionComment
comment on: http://stackoverflow.com/q/25087450
score: 0

http://stackoverflow.com/comment/39257159
score: 3
comment on: http://stackoverflow.com/q/25206804
type: Comment
type: QuestionComment
has text: You have to pre-increment `i += i + ++i;` it works :)

file
type: Tag
tags question: http://stackoverflow.com/q/25131200
tags question: http://stackoverflow.com/q/25124854
tag name: file
tags question: http://stackoverflow.com/q/25210181
tags question: http://stackoverflow.com/q/25189290
tags question: http://stackoverflow.com/q/25107197
tags question: http://stackoverflow.com/q/25127247

http://stackoverflow.com/comment/129782828
has text: @FrankThoeny Please read carefully the requirement! I don't need the dropdown to close, but I need other behavious to keep working (such as carousel slides, tabs navigation, ... whatever )
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25196101

http://stackoverflow.com/comment/39040939
type: QuestionComment
has text: There's an outstanding chrome bug which prevents content scripts from registering custom elements: https://code.google.com/p/chromium/issues/detail?id=390807
score: 6
comment on: http://stackoverflow.com/q/25089832
type: Comment

http://stackoverflow.com/a/25094302
has comment: http://stackoverflow.com/comment/39082413
type: Answer
has body: From the jQuery documentation on delegated events Event handlers are bound only to the currently selected elements; they must exist on the page at the time your code makes the call to .on() To do something like this, you attach the event handler on a parent element to the element being added/removed. For example: $( "#aParentSelector" ).on( "click", "#showPrevious", function() { // $.ajax({ ... }) etc });
has comment: http://stackoverflow.com/comment/39075408
answers question: http://stackoverflow.com/q/25094228
accepted answer of: http://stackoverflow.com/q/25094228
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39279916
has text: Hi, thanks for the answer, but how can save the object value in the array?
comment on: http://stackoverflow.com/a/25218883
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25129060
score: 0
has comment: http://stackoverflow.com/comment/39113109
type: Answer
answers question: http://stackoverflow.com/q/25128863
has comment: http://stackoverflow.com/comment/39113240
has body: Here is what you want: query = window.location.search; // "?f=23&amp;id=1" query.replace( /(f=).*(&amp;)/, '$1'+ '2' +'$2' ); &gt; "?f=2&amp;id=1" query.replace( /(f=).*(&amp;)/, '$1'+ 'something' +'$2' ); &gt; "?f=something&amp;id=1"

http://stackoverflow.com/a/25084950
upvote count: 1
answers question: http://stackoverflow.com/q/25083041
type: AcceptedAnswer
has body: Use the below JQUERY extension with existing code: $.fn.clickOutsideThisElement = function (callback) { return this.each(function () { var self = this; $(document).click(function (e) { if (!$(e.target).closest(self).length) { callback.call(self, e) } }) }); }; And call the function like this : $("#mobile-toggle").clickOutsideThisElement(function() { $("#mobile-menu").animate({ left: "0px", opacity: 0 }, 1000); }).click(function() { //Click inside menu $("#mobile-menu").animate({ left: "-200px", opacity: 1.0 }, 1000); }); DEMO HERE >>
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25083041

http://stackoverflow.com/a/25209235
type: Answer
accepted answer of: http://stackoverflow.com/q/25205947
score: 1
has body: There many ways to go about this. You can set the results directly with analytics.js tracking object or you can use the data import feature to map an anonymous user id and the responses. Either way you will first need to create a user scoped custom dimension in which you store the user categories. And you can either send in the custom dimension with the hit information ga('send', 'pageview', { 'dimension1': 'low' }); Where dimension1 maps to the index of the user scoped custom dimension you created. To set the user id and upload a user category you can set the user id in the tracker creation step. ga('create', 'UA-XXXX-Y', { 'userId': 'USER_ID' }); ga('send', 'pageview'); And then upload a file maps the user id to the response. ga:userId,ga:dimension1 1234,'low' 1235,'high' 1236,'low' 1237,'medium' Again where ga:dimension1 maps the user scoped custom dimensions you created to represent the category and the ga:userId maps to the user id you set in the tracker creation step. This article on importing CRM user information to create AdWords remarketing lists spells out yet another approach if you need to map many "user" representations to any number of categories.
upvote count: 1
answers question: http://stackoverflow.com/q/25205947
has comment: http://stackoverflow.com/comment/39328084
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39108061
type: QuestionComment
has text: possible duplicate of [JavaScript - Count duplicates within an Array of Objects](http://stackoverflow.com/questions/10541068/javascript-count-duplicates-within-an-array-of-objects)
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25126054

http://stackoverflow.com/a/25072272
has comment: http://stackoverflow.com/comment/39006863
type: Answer
has body: Just define the array outside var translate =[ 'translate3d(0, ' + (win.height/2+10) + 'px, 0)', 'translate3d(-' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(' + (win.width/2+10) + 'px, 0, 0)', 'translate3d(0, -' + (win.height/2+10) + 'px, 0)', ]; BoxesFx.prototype._setTransforms = function() { this.transforms = { 'effect-1' : { 'next' : translate, 'prev' : translate }}} The two arrays you have aren't the same, but I'm assuming they could be, as you can't reference an array twice and get two completely different arrays ? If you need an actual new copy of the array each time, you can do 'next' : translate.slice(0) instead
has comment: http://stackoverflow.com/comment/39006899
has comment: http://stackoverflow.com/comment/39006760
score: 0
answers question: http://stackoverflow.com/q/25072220
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25072220

http://stackoverflow.com/comment/39135640
type: AnswerComment
has text: Well, the way I see it, this has nothing to do with `href` vs `ng-href` at all, but with the fact that `` tags need content to show up in the page (and I think strictly speaking they must not be self closing according to HTML specs). The documentation seems to be a bit misleading here.
comment on: http://stackoverflow.com/a/25141462
type: Comment
score: 0

http://stackoverflow.com/a/25168393
has comment: http://stackoverflow.com/comment/39186039
upvote count: 1
has body: Try this $(document).ready(function() { $("#btnRight").click(function(){ $('#carousel ul').animate({marginLeft:'-=810px'}, 1000, function(){ $(this).find("li:last").after($(this).find("li:first")); $(this).css({marginLeft:0}); }); }); $("#btnLeft").click(function(){ $('#carousel ul li:first').before($("#carousel ul").find("li:last")); $('#carousel ul').css({"margin-left":"-810px"}); $('#carousel ul').animate({marginLeft:'+=810px'}, 1000, function(){ $(this).css({marginLeft:0}); }); }); });
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25167814
type: Answer
accepted answer of: http://stackoverflow.com/q/25167814
score: 1

http://stackoverflow.com/q/25227032
has answer: http://stackoverflow.com/a/25227068
has answer: http://stackoverflow.com/a/25227085
tagged with: jquery
has answer: http://stackoverflow.com/a/25227158
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has body: I have a very strange problem, on my site I have a list that according to the user choice updates the values in another list : HI-TEC Food Industry Marketing QA Food inspectur Selles man as I add the jQuery links : It stops working. Any suggestions? I still want to keep the jQuery style.
has answer: http://stackoverflow.com/a/25227080
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39295508
linked to: http://stackoverflow.com/q/19252664
accepted answer: http://stackoverflow.com/a/25227158
type: Question
has title: jQuery script and drop down lists
has answer: http://stackoverflow.com/a/25227106
duplicate of: http://stackoverflow.com/q/19252664
tagged with: jquery-mobile
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25227068
score: 0

http://stackoverflow.com/a/25125550
has comment: http://stackoverflow.com/comment/39106757
has body: ('td').textContent on line 5 of the fiddle is undefined. You'll need to change cells[c].innerHTML = blinkme to something like cells[c].innerHTML = '&lt;blink&gt;' + cells[c].textContent + '&lt;/blink&gt;'; In the blinkIt method, you can use querySelectorAll to gather the blink tags like this: var blinkTags = document.querySelectorAll('blink'); for (i = 0; i &lt; blinkTags.length; i++) { s = blinkTags[i]; s.style.visibility = (s.style.visibility == 'visible') ? 'hidden' : 'visible'; } Also in the fiddle, the blinkIt method is undefined at the time of the body's onload event. You'll have to set the interval when the blinkIt function is defined. I'll leave that one up to you.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39106780
answers question: http://stackoverflow.com/q/25125170
type: Answer
accepted answer of: http://stackoverflow.com/q/25125170
score: 1
upvote count: 1

http://stackoverflow.com/q/25198656
score: 2
type: Question
has title: How to get response status from in dojo xhr
has body: I want to retrieve a response code from response header, var xhrArgs = { url: "/cgi-bin/cgi.py", postData: { }, handleAs: "json", load: function (data, ioargs) { console.log(ioargs.xhr.getAllResponseHeaders()); }, error: function (error) {} }; dojo.xhrPost(xhrArgs); console.log(ioargs.xhr.getAllResponseHeaders()); // How do I get response code out here?? Should I parse the string or is there any other way to deal with it?
tagged with: javascript
has answer: http://stackoverflow.com/a/25200463
upvote count: 2
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: dojo

http://stackoverflow.com/comment/39252656
type: Comment
type: QuestionComment
score: 0
has text: @NejcGalof Good, glad to know that. You can post it as your own answer and accept it when Stack let's you, *cheers*
comment on: http://stackoverflow.com/q/25198219

http://stackoverflow.com/a/25113288
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/39109314
accepted answer of: http://stackoverflow.com/q/25112950
has body: If you just want the difference between all of the functions here is the difference. First difference between funcA, funcB and funcX, funcY. Whatever we have inside return statement will be accessible by someModule. So we can do both of these below someModule.funcX(); someModule.funcY(); But we cannot do someModule.funcA() or someModule.funcB(). To understand why that we can do this is to understand how () this behaves. Whatever expression is put inside brackets is executed and result is returned there. So in this example we have put a function inside these brackets, so an anonymous function will be created inside memory and it object will be returned here. Now we have put one more pair of brackets after function declaration. So, what happens here is (returned function object)(). So this function will be called immediately and an object containing two properties funcX and funcY whose value are function will be returned. Now moving to second part that is inside the function. Here the difference between funcA and funcB is that funcA is same as someModule i.e. it is also an IIFE and depending upon the body of funcA, it will be decided that if we are returning function object from inside the body of funcA, then it will also be a function otherwise it will contain whatever we return from inside of body of funcA. Apart from that all other are simple functions. Also, not related to what was asked. We can access funcA and funcB inside funcX and funcY, and even after containing function is executed then also we will still be able to access both of these function. For more details on this behavior look for closure in JavaScript. Happy learning JavaScript. :)
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25112950
type: Answer

http://stackoverflow.com/a/25109739
answers question: http://stackoverflow.com/q/25102453
type: Answer
has body: I ended up giving up accessing numeral this way and for this one page I included the entire js file in a script tag like such: script(src='/javascripts/numeral.min.js') And then: proceeds = numeral(myresult).format('$0.00'); Not sure this is ideal but it works.
score: 0

http://stackoverflow.com/q/25220155
has comment: http://stackoverflow.com/comment/39282228
type: Question
has body: If I add this above my JavaScript, my whole document won't work. If it's inside of a function it does work. var items = document.getElementById('list').getElementsByTagName('LI'); Example: http://jsfiddle.net/sozhuqL1/1/
has comment: http://stackoverflow.com/comment/39282281
has answer: http://stackoverflow.com/a/25233607
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39282284
has comment: http://stackoverflow.com/comment/39282258
upvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39282240
downvote count: 3
score: -3
has title: Global variable causes script crash

http://stackoverflow.com/comment/39215463
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25184696
type: AnswerComment
has text: If he get the error `undefined method for this.showPics`, it probably mean that his code is fine, else it would be `Unexpected token {`. He just didn't paste it well in the question. Even with your good fix, he'll still get the undefined error. Anyway, that's just my 2 cents!

http://stackoverflow.com/comment/58386763
type: Comment
has text: how to set by text rather than val
comment on: http://stackoverflow.com/a/27596224
score: 3
type: AnswerComment

http://stackoverflow.com/comment/39263289
score: 3
comment on: http://stackoverflow.com/q/25210121
has text: That's an awfully complex regex. I think you want this: `/\b#[a-z0-9]+/i`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25175166
type: Question
has answer: http://stackoverflow.com/a/25203106
downvote count: 0
possible better answer: http://stackoverflow.com/a/25175313
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I've made a popup and placed a youtube video in it. I set video to autoplay. But the problem is video plays when i open the page. It is auto play in global and i want it to autoplay when popup shows. I did not find any solution for it. Currently, It playing like i have background ghost saying something. Can anyone help? Video Html Calling popup Popup Content JS Foundation.libs.reveal = { name: "reveal", version: "4.2.2", locked: !1, settings: { animation: "fadeAndPop", animationSpeed: 250, closeOnBackgroundClick: !0, closeOnEsc: !0, dismissModalClass: "close-reveal-modal", bgClass: "reveal-modal-bg", open: function() {}, opened: function() {}, close: function() {}, closed: function() {}, bg: a(".reveal-modal-bg"), css: { open: { opacity: 0, visibility: "visible", display: "block" }, close: { opacity: 1, visibility: "hidden", display: "none" } } }, init: function(b, c, d) { return Foundation.inherit(this, "data_options delay"), "object" == typeof c ? a.extend(!0, this.settings, c) : "undefined" != typeof d && a.extend(!0, this.settings, d), "string" != typeof c ? (this.events(), this.settings.init) : this[c].call(this, d); }, events: function() { var b = this; return a(this.scope).off(".fndtn.reveal").on("click.fndtn.reveal", "[data-reveal-id]", function(c) { c.preventDefault(); if (!b.locked) { var d = a(this), e = d.data("reveal-ajax"); b.locked = !0; if ("undefined" == typeof e) b.open.call(b, d); else { var f = e === !0 ? d.attr("href") : e; b.open.call(b, d, { url: f }); } } }).on("click.fndtn.reveal", this.close_targets(), function(c) { c.preventDefault(); if (!b.locked) { var d = a.extend({}, b.settings, b.data_options(a(".reveal-modal.open"))); if (a(c.target)[0] === a("." + d.bgClass)[0] && !d.closeOnBackgroundClick) return; b.locked = !0, b.close.call(b, a(this).closest(".reveal-modal")); } }).on("open.fndtn.reveal", ".reveal-modal", this.settings.open).on("opened.fndtn.reveal", ".reveal-modal", this.settings.opened).on("opened.fndtn.reveal", ".reveal-modal…
tagged with: css
answer count: 4
upvote count: 11
accepted answer: http://stackoverflow.com/a/25203106
score: 11
tagged with: youtube
type: AnsweredQuestion
has title: Youtube Video Autoplay in popup
has answer: http://stackoverflow.com/a/40997167
has answer: http://stackoverflow.com/a/25175313
has answer: http://stackoverflow.com/a/39596875

http://stackoverflow.com/q/25191457
has title: jQuery Plugin Function Returning Undefined For The Value
type: Question
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25191650
accepted answer: http://stackoverflow.com/a/25192310
has body: I created a jQuery plugin to do various things with cookies. The trouble I am having is the function I created to read the cookie and return the value. No matter what I do, when I call the function as so from the main page test = $.cookie({ action:'get', cookie_name:LOGIN_COOKIE_NAME }); the return is ALWAYS undefined. Console output is as follows: Value found is => 10 Returned => undefined I'm at my wit's end trying to figure out what's going on here. I've tried everything I know to do and spent literally hours Googling this with no solution. Below is the code in my jQuery plugin: // Get the value of the sought after cookie function get_cookie(){ var value = ''; // Get the name to search for var name = settings.cookie_name; // Divide the cookie string into an array var ca = document.cookie.split(';'); // Loop through each element in the main array we just created match_found = false; for(var i=0; i<ca.length; i++){ // Clear the whitespace from the ends to prevent mismatches and split each > element into the cookie name and value var temp = ca[i].trim().split('='); // Now check to see if this is the cookie we are looking for if(temp[0] == name && !match_found){ match_found = true; // If it is, then return the cookie's value cookie_value = temp[1]+''; if(settings.action != 'check'){ value = cookie_value; }else{ value = true; } } } if(!match_found && settings.action == 'check'){ return false; }else if(!match_found && settings.action != 'check'){ return 'dooby'; }else{ console.log('Value found is => '+value); return value; } } Does anyone have any insight into what's causing this and how it can be corrected? Here is the entire code of my jQuery plugin (function($){ $.cookie = function(options) { // Default Settings var settings = $.extend({ action : 'check', // create or delete cookie_name : 'cookie', cookie_value : 'default', expiration : 'Sun, 31 Dec 2017 12:00:00 GMT', path : '/' }, options); switch(settings.action){ case "create": create_cookie(); break; case "dele…
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25192310
has answer: http://stackoverflow.com/a/25192154
has answer: http://stackoverflow.com/a/25191650

http://stackoverflow.com/comment/39143633
type: AnswerComment
score: 0
type: Comment
has text: Thank you very much, I have just noticed that:) I even don't understand why people use GET because POST does the same thing and it's secure.
comment on: http://stackoverflow.com/a/25145156

http://stackoverflow.com/q/25120058
type: Question
tagged with: recursion
score: 3
has comment: http://stackoverflow.com/comment/39134827
has comment: http://stackoverflow.com/comment/39096947
answer count: 2
has answer: http://stackoverflow.com/a/25120427
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/11854514
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39095760
has body: I tried to implement a recursively nested directive in angularjs. I simply made a &lt;tree-dir&gt; directive and obtained this jsFiddle. In my tree_item_renderer.html template, if I replace the ng-include by the &lt;tree-dir&gt;, angular will enter in an infinite loop when compiling (be careful if you try it, it will slow down or stop your browser for a while). Source: this question about recursive trees in angular.
has answer: http://stackoverflow.com/a/25120422
has title: Recursively nested directives in angularjs
upvote count: 3
type: UnansweredQuestion

http://stackoverflow.com/q/25193788
downvote count: 0
has answer: http://stackoverflow.com/a/25206596
accepted answer: http://stackoverflow.com/a/25206596
type: Question
has title: How to isolate or debug issues specific to IE 10 and 11?
tagged with: internet-explorer
tagged with: internet-explorer-11
tagged with: javascript
upvote count: 2
has comment: http://stackoverflow.com/comment/39232875
has comment: http://stackoverflow.com/comment/39232839
answer count: 1
has comment: http://stackoverflow.com/comment/39232806
favorite count: 0
has body: I put together a web app that looks great in Chrome, Firefox and Safari, but when it comes to IE 10 and 11, it just falls apart. As a matter of fact, it works worse in IE 11 than 10. In IE 11, a &lt;canvas&gt; element won't even show up, and some &lt;div&gt; elements look really strange and don't have a border-radius, even though I specified it in the CSS. Unfortunately, there are no errors in the console and frankly I'm not seeing where the problems are coming in to play within the CSS and JS. What would one do in such a situation where you don't really see any good starting point to debug IE? I was hoping that running things through W3C Validator and JSHint / lint would help, but even those are entirely clean. It would be nice to find some tool to make this a cleaner process as well aside from these noted, but so far I'm shooting blanks.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 2
type: AnsweredQuestion

http://stackoverflow.com/q/25135446
tagged with: knockout.js
score: 0
answer count: 2
upvote count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39125372
has comment: http://stackoverflow.com/comment/39583030
has comment: http://stackoverflow.com/comment/39124379
has body: In a binding handler, if I have a binding like below: &lt;div data-bind="someHandler { value : valueOnModel }"&gt;&lt;/div&gt; And the following code for my binding handler: class someHandler : KnockoutBindingHandler { init(element, valueAccessor, allBindingsAccessor, data, context) { var va = valueAccessor(); var value = va.value; //How to get "valueOnModel" here?? var valuePropertyName : string; var isVisible = data[valuePropertyName + "_isVisible"]; } } The above is what I want to achieve, however I do not know how set valuePropertyName with the above? Any help appreciated :)
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25116043
has answer: http://stackoverflow.com/a/25137890
has title: Get name of property as string instead of property value?
type: Question
tagged with: typescript
has answer: http://stackoverflow.com/a/25136842

http://stackoverflow.com/q/25127613
score: 0
has comment: http://stackoverflow.com/comment/39797684
tagged with: coffeescript
accepted answer: http://stackoverflow.com/a/25520975
type: Question
tagged with: javascript
has title: Node fibers/future callbacks hell
linked to: http://stackoverflow.com/q/25442470
answer count: 1
tagged with: wait
has comment: http://stackoverflow.com/comment/39814437
has answer: http://stackoverflow.com/a/25520975
has body: I've tried to use the wait.for.js library in my node.js project and I fail to get database data from a query. Here is the exemple (We are in a Database Class in coffeescript) : execute: (sqlOrder) -&gt; resultSet = "" this.connection.query(sqlOrder,(err,results,fields) =&gt; resultSet = results; ) console.log results But in fact this can't work with callback process Then I used "Wait.for" and tried to follow the database exemple "https://github.com/luciotato/waitfor" but there is a problem, where is the wait.launchFiber(); line ? So I tried... But not working query2 : ( sql, callback ) =&gt; wait.for(@connection.query(sql,(err, result, field)-&gt; data = {results:result, fields:field} callback(err,data) )) back : (err,data) -&gt; @result = data console.log("I'm in back") prepare: (strOrder) =&gt; wait.launchFiber(@query2,strOrder,@back); console.log(@result) The problem is, there is an instance of a Class "A" which call the method execute("Select * from my_table"), and the Class "B" with its method "execute(strOrder)" return an array or an object of the results. Please, anyone can help me to find the solution ?
tagged with: node.js
type: AnsweredQuestion
tagged with: node-fibers

http://stackoverflow.com/comment/52132630
has text: I tried your solution though it doesn't seem to be working for the following entities: &10073;&9664;&11035;&9654;&10074;&9193;&9654; (# symbol removed to keep the site from parsing them).
type: AnswerComment
comment on: http://stackoverflow.com/a/25070124
score: 0
type: Comment

http://stackoverflow.com/q/25224714
answer count: 1
has title: Google Apps Script does not parse variable as int in array coordinate
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25224835
type: AnsweredQuestion
has body: I'm attempting to change the font color in an entire row based on the content in column B matching some pre-defined strings. Works just fine although the index is off by 1 and I need to account for this: values[row][1] Error: "TypeError: Cannot read property "1" from undefined.": values[row+1][1] Attempting also throws the same error: values[1+Number(row)][1] Here is the entire codeblock: function colorRow(){ var sheet = SpreadsheetApp.getActiveSheet(); var range=sheet.getDataRange(); var values = range.getValues(); for (var row in values){ var result; if(values[1+Number(row)][1].toString()=="stalker"){ result = sheet.getRange(row,1,1,range.getLastRow()) result.setFontColor("purple"); }else if(values[1+Number(row)][1].toString() == "engineer"){ result = sheet.getRange(row,1,1,range.getLastRow()) result.setFontColor("yellow"); }else if(values[1+Number(row)][1].toString() == "warrior"){ result = sheet.getRange(row,1,1,range.getLastRow()) result.setFontColor("red"); }else if(values[1+Number(row)][1].toString() == "medic"){ result = sheet.getRange(row,1,1,range.getLastRow()) result.setFontColor("green"); }else if(values[1+Number(row)][1].toString() == "esper"){ result = sheet.getRange(row,1,1,range.getLastRow()) result.setFontColor("blue"); }else if(values[1+Number(row)][1].toString() == "spellslinger"){ result = sheet.getRange(row,1,1,range.getLastRow()) result.setFontColor("orange"); } } SpreadsheetApp.flush(); }
score: 1
upvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25224835
tagged with: google-apps-script

http://stackoverflow.com/comment/39298373
comment on: http://stackoverflow.com/q/25228907
has text: can you post a working example that shows the problem? on jsfiddle or something like that
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25112239
has answer: http://stackoverflow.com/a/25112312
tagged with: ajax
downvote count: 0
has comment: http://stackoverflow.com/comment/39081322
favorite count: 0
has title: Angularjs directive to get data from ajax call in controller
tagged with: angularjs
upvote count: 2
possible better answer: http://stackoverflow.com/a/25112306
has body: I'm trying to use the jQuery fancy tree plugin with Angular. The source data for the tree comes from an ajax call in my controller. I'm then trying to get that data into my directive and load the tree. Say the service takes 2 seconds to get the data. Heres a cut down version of my code. HTML &lt;div tree-view &gt;&lt;/div&gt; SERVICE angular.module('sc.services', []). factory('scService', function ($http) { var scApi = {}; scApi.getsc = function () { return $http({ url: config.Url.sc }); }; return scApi; }); CONTROLLER angular.module('sc.controllers', []). controller('scController', function ($scope, scService) { scService.getsc().success(function (response) { $scope.sc = response; }); }); DIRECTIVE angular.module('sc.directives', []) .directive('treeView',function () { return { restrict: 'A', link: function (scope, element, attrs) { scope.$watch('sc', function() { $(element).fancytree({ source: scope.sc }); }); } } }); Jquery loads the fancy tree onto the page (so the directive is being called) but without an data. I also bind the data to a table on the page just to make sure its loading ok and that works. What am I missing? Is this the correct way to do this?
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25112312
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39081172
has answer: http://stackoverflow.com/a/25112306
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39172762
score: 0
type: AnswerComment
has text: here is the showDialog code function showDialog(data) { if (data.IsSuccess == "Unauthorized") { jAlert(data.description, 'Unauthorized Access'); } }
comment on: http://stackoverflow.com/a/25161090
type: Comment

http://stackoverflow.com/q/25150896
upvote count: 1
has comment: http://stackoverflow.com/comment/39153571
has comment: http://stackoverflow.com/comment/39153542
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39154059
has answer: http://stackoverflow.com/a/25151039
has comment: http://stackoverflow.com/comment/39153593
answer count: 1
downvote count: 0
tagged with: logout
has comment: http://stackoverflow.com/comment/39153567
has comment: http://stackoverflow.com/comment/39153490
favorite count: 0
has title: How to auto log off when user is inactive?
tagged with: timer
has body: in this index page of index-customer.php i put this javascript at the end of the head tag of index-customer.php but it does not seem to work. is it because i did not call the function of the javascript. please help me ! thank you ! &lt;script type ="text/javascript"&gt; var timer = 0; function set_interval() { timer = setInterval("auto_logout()", 2); } function reset_interval() { if (timer != 0) { clearInterval(timer); timer = 0; timer = setInterval("auto_logout()", 2); } } function auto_logout() { window.location = "Logout.php"; } &lt;/script&gt;
tagged with: php
accepted answer: http://stackoverflow.com/a/25151039
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39153812

http://stackoverflow.com/comment/39112676
type: Comment
score: 0
has text: @Loourr: I honestly don't know. Never worked with node.js, just opened their repository and found why it doesn't serve through `POST` :-D
type: AnswerComment
comment on: http://stackoverflow.com/a/25128836

http://stackoverflow.com/q/25116635
has comment: http://stackoverflow.com/comment/65063535
answer count: 2
has answer: http://stackoverflow.com/a/25117196
downvote count: 0
score: 18
tagged with: javascript
has body: I am implementing typeahead using AngularUI-Bootstrap. I need to show the results grouped based on some values coming from the database. Here's a sample scenario There are some users in the database, each user has a "Department". One user name can be available in multiple departments. The end-user types in the names to search users from the database and retrieves the list in the typeahead list. Since one user name can belong to multiple departments, the requirement is to show the user names grouped by different departments. Something like this: Then the user can select the desired user name and proceed. As per the Typeahead documentation present here, I don't see any option to cater to my requirement. I have tried the this workaround: Whenever the typeahead array is getting formed, I appended the user department to the array element: $scope.fetchUsers = function(val) { console.log("Entered fetchUsers function"); return $http.get("http://localhost:8080/TestWeb/users", { params : { username : val } }).then(function(res) { console.log("Response:",res); var users = []; angular.forEach(res.data, function(item) { users.push(item.UserName + " - " + item.UserDepartment); }); console.log("users=",users); return users; }); }; This way, at least the end user sees the department. But when I select the record, the selected value is the full content of the array element. Below is sample screenshot to elaborate: HTML Users from local service Model: User types in the string User selects one record I want to avoid the department (in this case, string - Desc 4 ) when user selects a record. Is there any way I can achieve this grouping without any workaround? Or is there any way I can enhance my workaround?
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25117196
accepted answer: http://stackoverflow.com/a/25125682
tagged with: typeahead
has comment: http://stackoverflow.com/comment/65052469
type: AnsweredQuestion
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/65063981
type: Question
has title: AngularUI-Bootstrap Typeahead: Grouping results
has answer: http://stackoverflow.com/a/25125682
upvote count: 18

http://stackoverflow.com/a/25215998
has comment: http://stackoverflow.com/comment/41899870
answers question: http://stackoverflow.com/q/25214627
type: Answer
has body: You could use a before Function with the done-Callback. This will halt your tests until done is called. Inside the before-Function you can then listen on mongoose connected-Event. Something like this: var mongoose = require('mongoose'); before(function(done){ mongoose.connection.on('connected', done); }); Then just place this before your first test.
accepted answer of: http://stackoverflow.com/q/25214627
score: 0
has comment: http://stackoverflow.com/comment/41891745
has comment: http://stackoverflow.com/comment/39281831
type: AcceptedAnswer

http://stackoverflow.com/comment/39185177
comment on: http://stackoverflow.com/q/25167759
score: 0
type: Comment
type: QuestionComment
has text: I am using a $http interceptors to look into my results if there is an message to show and if there are some requests open to show the spinner take a look here: http://djds4rce.wordpress.com/2013/08/13/understanding-angular-http-interceptors/ - I think it's a bit too much logic in your controller

http://stackoverflow.com/q/25184549
has body: I am working on a simple one page website for a friend, which contains a YouTube video embed. I'm not very familiar with the YouTube API, but I got the follow to work (see below). What do I need to change so that when the video completes the player disappears and a DIV is loaded. &lt;div id="player"&gt;&lt;/div&gt; &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('player', { height: '390', width: '640', videoId: 'y-y8v4BClZE', events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); } function onPlayerReady(event) { event.target.playVideo(); } var done = false; function onPlayerStateChange(event) { if (event.data == YT.PlayerState.PLAYING &amp;&amp; !done) { setTimeout(stopVideo, 720000); done = true; } } function stopVideo() { player.stopVideo(); } &lt;/script&gt;
type: Question
tagged with: javascript
score: 0
has title: hide div after YouTube video ends
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: youtube
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25184628
accepted answer: http://stackoverflow.com/a/25184628

http://stackoverflow.com/comment/39077728
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25110185
score: 0
has text: In this scenario, you actually have two scrolling elements one inside the other. Are you sure this is actually a scenario that you encounter in real life?

http://stackoverflow.com/comment/39170434
comment on: http://stackoverflow.com/a/25160544
has text: you cant wrap an options element inside a div, or put an a tag inside option tags
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25093897
has title: In a custom widget, inside a validation handler of addMethod(), I have a wrong context (this)
type: UnansweredQuestion
type: Question
tagged with: jquery-ui
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39216299
tagged with: validation
has body: I'm creating a custom combobox which uses jQuery validator. At first they all are gray except the first (it means Country). When I choose 'Slovenská republika' the second combobox is enabled. They all are instances of a a custom autocomplete combobox widget. To enable the validation I use this code (which is called within _create: function(){..}) There you can find $.validator.addClassRules(); and $.validator.addMethod(). I also added the appropriate class so it really does something. _registerCustomValidator: function(){ var uniqueName = this._getUniqueInstanceNameFromThisID(this.id); var that = this; console.log(this.id);//this prints 5 unique ids when the page is being loaded $.validator.addMethod(uniqueName, function(value,element){ if(!that.options.allowOtherValue){ return that.valid; } console.log(that.id);//this always prints the ID of the last combobox StreetName return true; }, "Error message."); var o = JSON.parse('{"'+uniqueName+'":"true"}'); $.validator.addClassRules("select-validator", o); } //this.id is my own property that I set in _create Problem: When I change the value of any instance of combobox, it always prints the ID of the last instance StreetName, but it should belong to the one that has been changed. I thought it might be because of registering $.validator.addMethod("someName",handler) using such a fixed string, so now I pass a uniqueName, but the problem remains. Therefore the validation of all instances is based on the property allowOtherValue of the last instance. I don't understand why it behaves so. Does anyone see what might be the problem? EDIT: see my comments in the following code _registerCustomValidator is a custom function within a widget factory. //somewhere a global var var InstanceRegistry = [undefined]; //inside a widget factory _registerCustomValidator: function(){ var i=0; while(InstanceRegistry[i] !== undefined) ++i; InstanceRegistry[i] = this.id; InstanceRegistry[i+1] = undefined; var ID = i; //here ID,i,InstanceRegistry …
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25101309
tagged with: combobox

http://stackoverflow.com/a/25217897
type: Answer
answers question: http://stackoverflow.com/q/25216695
score: 0
has body: you have to wrap all div in .wraaper div and define width 100%. .wrapper{width:100%;} and in inner div you have to define section using an .inner(width: 1000px;) where you need 100% slider dont use this .inner class. this is help for you.

http://stackoverflow.com/a/25106768
has body: Here is a similar example that would provide for the enter button event. http://jsfiddle.net/e4CzL/ var element=document.createElement("p"); var node=document.createTextNode("hello"); element.appendChild(node); document.getElementsByTagName("p")[0].onkeypress=function(e){ if(e.keyCode===13){ alert("Item will be appended!"); document.getElementsByTagName("p")[0].appendChild(element); } else{ //do nothing } };
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25106324

http://stackoverflow.com/a/25166340
answers question: http://stackoverflow.com/q/25165167
score: 0
accepted answer of: http://stackoverflow.com/q/25165167
type: AcceptedAnswer
has body: Well I don't know what's going on with ng-repeat, but after 2 days I've discovered a workaround. Using a second scope variable and a watch seems to restore the correct behavior: .controller('MyController, function($scope, $http) { $scope._errors = []; $scope.$watch('_errors', function(val) { $scope.errors = val; }); $scope.save = function() { var promise = $http.post('http://myapi.net/resources', $scope.data) .success(function(data) { // Success }) .error(function(data, status) { $scope._errors = data.errors; }); $scope.errors = []; return promise; }; }); Why this isn't necessary in the success callback is beyond me, but there you go.
type: Answer

http://stackoverflow.com/comment/39153446
type: AnswerComment
comment on: http://stackoverflow.com/a/25149122
type: Comment
has text: Thanks for your response. I will try your method
score: 0

http://stackoverflow.com/comment/39265988
has text: This question isn't "too broad" - it has a pretty succinct answer (in a true Shadow DOM implementation anyway).
comment on: http://stackoverflow.com/q/25211111
score: 5
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25136960
score: 0
type: Answer
has body: Create main div and put two buttons and inside give your table content and multmachines div Inside form is not worked Try the following one: Sample For Animation Hide section below Show section below Prefix Type Group Number of Machines {html_options values=$types output=$types} {html_options values=$ranges output=$ranges}
answers question: http://stackoverflow.com/q/25136370

http://stackoverflow.com/a/41605473
score: 1
upvote count: 1
has body: .label is the right way to modify BUT pie chart has bug, Check by log on d .label(d =&gt; { console.log(d); // { // key: 'which you return in dimension', // value: 'ex: 259.91' // } }) Ex, have 6 objs in array, BUT log may just 3 or 4 of them @@ To work around this bug .on('pretransition', function(chart){ chart.selectAll('text.pie-slice').text(d =&gt; { console.log(d); // { // data: { // key: 'which you return in dimension', // value: 'ex: 259.91' // }, // endAngle: 'xxx', // startAngle: 'yyy' // } }) }) d obj inside text() By this way we can log enough 6 objs in array The label text is return val inside text(d =&gt; {}) chart.selectAll('text.pie-slice').text(function(d){ let label = d.data.key; return label + ': ' + Number(d.data.value).toFixed(2); }) //Or play with percentage chart.selectAll('text.pie-slice').text(function(d){ return d.data.key + ' ' + dc.utils.printSingleValue((d.endAngle - d.startAngle) / (2*Math.PI) * 100) + '%'; })
answers question: http://stackoverflow.com/q/25209971
type: Answer
downvote count: 0

http://stackoverflow.com/q/25186866
accepted answer: http://stackoverflow.com/a/25187580
has title: jQuery fadeIn and fadeOut Issue
tagged with: javascript
tagged with: jquery
tagged with: slider
score: 0
tagged with: fadein
tagged with: fadeout
has answer: http://stackoverflow.com/a/25187580
type: AnsweredQuestion
has body: I have some jQuery for an image slider but for some reason my fadeIn effect only works on the first slide and the fadeOut effect works on all slides except the last one. I'm a beginner when it comes to jQuery so it might be something really simple. Below is the jQuery code for the slider, any help is greatly appreciated! sliderInt=1; sliderNext=2; $(document).ready(function(){ $("#slider&gt;img#1").fadeIn(300); startSlider(); }); function startSlider(){ count=$("#slider&gt;img").size(); loop=setInterval(function(){ if(sliderNext&gt;count){ sliderNext=1; sliderInt=1; } $("#slider&gt;img").fadeOut(1000); $("#slider&gt;img#"+sliderNext).fadeIn(1000); sliderInt=sliderNext; sliderNext=sliderNext+1; },5000); }
type: Question
answer count: 1

http://stackoverflow.com/a/25102658
answers question: http://stackoverflow.com/q/25090973
type: Answer
has body: if you want to know last change event of textbox. see my demo code bellow. $("div input").change(function () { if ($(this).parent().data("lastChanged")) { alert($(this).parent().data("lastChanged")); } $(this).parent().data("lastChanged", this.id); }); see jsfiddle link http://jsfiddle.net/aDUdq/94/
score: 0

http://stackoverflow.com/comment/39077603
score: 0
comment on: http://stackoverflow.com/q/25110166
has text: You're not supposed to ask "What's wrong with my code?" you are supposed to make a working example http://stackoverflow.com/help/mcve
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25131338
upvote count: 10
type: AcceptedAnswer
has body: I have recently implemented a similar task you are trying to achieve using similar resources. You havent indicated that you need the audio uploaded as an mp3, so I am going to just show you how to upload a wav using recorderjs, using the source found here: https://github.com/cwilso/AudioRecorder First things to note, recorderjs stores the uncompressed wav in a var called blob. This happens on line 101 of recorder js, more specifically in this function: worker.onmessage = function(e){ var blob = e.data; currCallback(blob); } The problem is that blob is locally declared in that function. We need to use it again, so for the sake of this example lets make it really easy to reach and make it global. So declare a variable blob outside of recorder js like so: var blob = null; Then modify the above function in recorderjs to store the data inside the globally declared 'blob' variable, the function should look like so: worker.onmessage = function(e){ blob = e.data; currCallback(blob); } Now we can use 'blob'. Now declare the following function somewhere, function uploadAudio(){ var fd = new FormData(); var wavName = encodeURIComponent('audio_recording_' + new Date().getTime() + '.wav'); console.log("wavName = " + wavName); fd.append('fname', wavName); fd.append('data', blob); $.ajax({ type: 'POST', url: 'upload.php', data: fd, processData: false, contentType: false }).done(function(data) { //console.log(data); log.innerHTML += "\n" + data; }); } Your server side code should use this: &lt;?php if(!is_dir("recordings")){ $res = mkdir("recordings",0777); } move_uploaded_file($_FILES["file"]["tmp_name"], $res . $_FILES["file"]["fname"]); ?&gt; Note: $_FILES["file"]["tmp_name"] is what it sounds like. A temporary location of the file. This is done for you with the ajax call and form data. Good luck, let me know if you run into problems.
answers question: http://stackoverflow.com/q/25101037
type: Answer
accepted answer of: http://stackoverflow.com/q/25101037
downvote count: 0
score: 10

http://stackoverflow.com/q/25192167
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to write a Chrome extension that highlights certain words that were entered in extension's textfield For example: I enter "web" in extension's area, press the button. On active tab all "web" words are should be highlighted. I've found a nice web-pagethat has all the functions I need. In my code, when I try to use them in my Extension, nothing works. manifest file { "manifest_version": 2, "name": "Word search & highlight", "version": "1.0", "icons": { "16": "16x16.png", "32": "32x32.png", "48": "48x48.png", "128": "128x128.png" }, "content_scripts": [ { "matches": [ "*://*/*" ], "js": [ "popup.js"], "run_at": "document_end" } ], "permissions": [ "tabs", "activeTab" ], "browser_action": { "default_title": "Start searching", "default_icon": "48x48.png", "default_popup": "popup.html" } } popup.html And here's popup.js file: it's too long, so I made a pastebin document: http://pastebin.com/g5ZenE48 I can't get innerHTML of webpage from these functions and I don't really understand how to make this all work.
type: AnsweredQuestion
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/39233282
has answer: http://stackoverflow.com/a/25194312
accepted answer: http://stackoverflow.com/a/25194312
score: 0
answer count: 1
tagged with: javascript
has title: Can't access DOM via functions in Chrome Extension
tagged with: google-chrome-extension

http://stackoverflow.com/comment/39215517
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25179722
has text: I don't know if your problem is from javascript side, but anyway try sending the entire form instead of doing foreach on your own like this var data = $('#app-options-form').serialize();
type: Comment

http://stackoverflow.com/comment/39043726
has text: Try with the uncompressed http://fotorama.s3.amazonaws.com/4.5.2/fotorama-4.5.2.dev.zip and see if the issue persists.
type: QuestionComment
comment on: http://stackoverflow.com/q/25091792
type: Comment
score: 0

http://stackoverflow.com/comment/39080401
comment on: http://stackoverflow.com/q/25111175
score: 0
type: Comment
type: QuestionComment
has text: You might be right that it's Opera. Going to test on Chrome and Firefox now. In the case of [this](http://users.ipa.net/~djhill/frmain.html) page, if I target the inner frame with the observer and remove something within its `body` I get an event. If I run at the containing page scope, while removing the element with a timeout (otherwise the inner page doesn't have time to load, even with `document-end`) no event fires. It seems to be some sort of sandboxing for events, even though this is the same domain.

regex
tags question: http://stackoverflow.com/q/25218153
tags question: http://stackoverflow.com/q/25094404
tags question: http://stackoverflow.com/q/25173564
tags question: http://stackoverflow.com/q/25106679
tags question: http://stackoverflow.com/q/25132308
tags question: http://stackoverflow.com/q/25163772
tags question: http://stackoverflow.com/q/25114655
tags question: http://stackoverflow.com/q/25178308
tags question: http://stackoverflow.com/q/25183343
tags question: http://stackoverflow.com/q/25210500
tag name: regex
tags question: http://stackoverflow.com/q/25130446
tags question: http://stackoverflow.com/q/25127054
tags question: http://stackoverflow.com/q/25211629
tags question: http://stackoverflow.com/q/25147765
tags question: http://stackoverflow.com/q/25149431
tags question: http://stackoverflow.com/q/25218677
tags question: http://stackoverflow.com/q/25088962
tags question: http://stackoverflow.com/q/25197765
tags question: http://stackoverflow.com/q/25202705
tags question: http://stackoverflow.com/q/25097039
tags question: http://stackoverflow.com/q/25188463
tags question: http://stackoverflow.com/q/25079372
tags question: http://stackoverflow.com/q/25203108
tags question: http://stackoverflow.com/q/25075200
tags question: http://stackoverflow.com/q/25198305
tags question: http://stackoverflow.com/q/25186246
tags question: http://stackoverflow.com/q/25081462
tags question: http://stackoverflow.com/q/25128863
tags question: http://stackoverflow.com/q/25164137
tags question: http://stackoverflow.com/q/25142107
tags question: http://stackoverflow.com/q/25210271
tags question: http://stackoverflow.com/q/25207505
tags question: http://stackoverflow.com/q/25145795
tags question: http://stackoverflow.com/q/25104655
tags question: http://stackoverflow.com/q/25111627
tags question: http://stackoverflow.com/q/25213824
tags question: http://stackoverflow.com/q/25212481
tags question: http://stackoverflow.com/q/25195053
tags question: http://stackoverflow.com/q/25161053
tags question: http://stackoverflow.com/q/25188325
tags question: http://stackoverflow.com/q/25181350
tags question: http://stackoverflow.com/q/25220485
tags question: http://stackoverflow.com/q/25205036
tags question: http://stackoverflow.com/q/25107905
tags question: http://stackoverflow.com/q/25185206
tags question: http://stackoverflow.com/q/25187697
tags question: http://stackoverflow.com/q/25228134
tags question: http://stackoverflow.com/q/25202418
tags question: http://stackoverflow.com/q/25101781
tags question: http://stackoverflow.com/q/25135105
tags question: http://stackoverflow.com/q/25221084
tags question: http://stackoverflow.com/q/25071272
tags question: http://stackoverflow.com/q/25095765
tags question: http://stackoverflow.com/q/25217907
tags question: http://stackoverflow.com/q/25131935
tags question: http://stackoverflow.com/q/25165485
tags question: http://stackoverflow.com/q/25081364
tags question: http://stackoverflow.com/q/25184936
tags question: http://stackoverflow.com/q/25211415
tags question: http://stackoverflow.com/q/25145198
tags question: http://stackoverflow.com/q/25188177
tags question: http://stackoverflow.com/q/25157966
tags question: http://stackoverflow.com/q/25133843
tags question: http://stackoverflow.com/q/25094811
tags question: http://stackoverflow.com/q/25162596
tags question: http://stackoverflow.com/q/25166567
tags question: http://stackoverflow.com/q/25209130
tags question: http://stackoverflow.com/q/25143669
tags question: http://stackoverflow.com/q/25072277
tags question: http://stackoverflow.com/q/25225704
tags question: http://stackoverflow.com/q/25105813
tags question: http://stackoverflow.com/q/25224223
tags question: http://stackoverflow.com/q/25072208
tags question: http://stackoverflow.com/q/25104569
tags question: http://stackoverflow.com/q/25181644
tags question: http://stackoverflow.com/q/25194349
tags question: http://stackoverflow.com/q/25133444
tags question: http://stackoverflow.com/q/25086824
tags question: http://stackoverflow.com/q/25218446

http://stackoverflow.com/q/25132629
tagged with: sorting
has answer: http://stackoverflow.com/a/25133175
score: 0
answer count: 2
tagged with: filter
has body: So I have this query that pulls the data for me: App.ListRoute = Ember.Route.extend({ model: function() { return $.getJSON('php/getlines.php'); }}); And I have in my handle bar this code to display it: &lt;tbody&gt; {{#each content}} {{view App.lineItem contextBinding="this"}} {{/each}} &lt;/tbody&gt; I was thinking of making my html fields a button which when clicked would sort the entries: &lt;th class="center"{{action 'sortBy' 'invoice'}}&gt;Invoice&lt;/td&gt; where there is a sort by function: sortBy: function(property) { this.set('sortProperties', [property]); this.set('sortAscending', !this.get('sortAscending')); } However, I keep getting this error: Error: Nothing handled the event 'sortBy'. I am not sure how I can have the entries sorted if I click that button?
type: UnansweredQuestion
tagged with: ember.js
has answer: http://stackoverflow.com/a/25132776
has title: Adding filter button to sort entries
type: Question
tagged with: javascript

http://stackoverflow.com/comment/39047659
type: Comment
has text: [code] var devang = document.getElementById('devang').getElementsByTagName('li'); for (var i=0; i<devang.length; i++) { devang[i].style.color = 'red'; } alert(devang.length); [code] above code also works fine in IE8
score: 0
comment on: http://stackoverflow.com/q/25079773
type: QuestionComment

http://stackoverflow.com/comment/39212269
type: QuestionComment
comment on: http://stackoverflow.com/q/25182943
has text: Yes, no errors inside it :-/
score: 0
type: Comment

http://stackoverflow.com/comment/39277796
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25214818
type: Comment
has text: Do you mean the background color? If so, it's not a huge leap to restore that background color via jQuery "addClass" or "css" when input is empty.

http://stackoverflow.com/a/25209430
score: 1
has body: See in your html: ng-hide="hide()" The problem is simple you need to change hide property into method inside MainCtrl $scope.hide = function() { return data.hide.get; } DEMO But you will say why the first example worked? Because in the first example data.hidden does return function literal while the latter example just returns the value from getter.
answers question: http://stackoverflow.com/q/25208772
accepted answer of: http://stackoverflow.com/q/25208772
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39026404
has text: @SargisMarkosyan can't you just change the type? If not, would you please add into the answer why it isn't possible?
comment on: http://stackoverflow.com/a/25082307
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39020496
type: QuestionComment
comment on: http://stackoverflow.com/q/25079972
score: 0
has text: Do you own the code that is doing the inserting?
type: Comment

http://stackoverflow.com/comment/39024884
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25081797
has text: @epascarello: wrong link. This is the right one to answer this kind of questions: http://stackoverflow.com/a/1732454/648265
score: 1

http://stackoverflow.com/comment/39135941
comment on: http://stackoverflow.com/q/25141599
has text: You could also try something like [this](http://jsfiddle.net/hari_shanx/7bbM5/). Very similar to the article linked in the above comment. That article uses rotate while this fiddle uses skew.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39276188
score: 0
comment on: http://stackoverflow.com/q/25216791
type: Comment
has text: I have no idea why, that's why I am asking you to check whether the callback is being hit...
type: QuestionComment

http://stackoverflow.com/a/25071813
has body: The popstate event is fired on window when the active history entry changes. Most commonly when the browsers back or forward buttons are clicked (or a call to back(), forward() or go() is executed). The event passed into the listener callback contains a state property that is used to retrieve the state object that is associated with the history entry. window.addEventListener('popstate', function(event) { var state = event.state; }); It’s worth noting that calls to pushState() and replaceState() will not trigger a popstate event. Chrome and Safari will fire a popstate event when the page loads but Firefox doesn’t.
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25070543
downvote count: 0

http://stackoverflow.com/a/25083039
has body: In HTML: Or using Angular's ng-model: function YourCtrl($scope) { $scope.value = 'default'; }
downvote count: 0
answers question: http://stackoverflow.com/q/25083010
has comment: http://stackoverflow.com/comment/39026901
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39026753

http://stackoverflow.com/comment/39095611
type: Comment
comment on: http://stackoverflow.com/a/25118870
has text: This is my email id yyogesh1990@gmail.com, If you can send me complete HTML page then I can see why it's not working on your system
score: 0
type: AnswerComment

http://stackoverflow.com/q/25150064
tagged with: python
has body: I have roughly 1.5 million users I need to import into my parse _User table (we are migrating from our old sql db to Parse). I've tried using a Background Job, but it is slow and gets killed every 15 minutes. As a result, we have only import ~300K users in 4 days. So I decided to go the REST api route...and tried the PythonPy lib. It works, except for being able to do batch creation of users. From digging more into this, it seems that the REST api forces you to do a User.signup() call. This of course makes the whole thing be serialized. Is there anyway to do batch user creation?
tagged with: parse-platform
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28143809
accepted answer: http://stackoverflow.com/a/28143809
type: Question
score: 0
answer count: 1
has title: How to batch create users in Parse via REST api
tagged with: javascript
tagged with: rest

http://stackoverflow.com/comment/39098225
comment on: http://stackoverflow.com/a/25119946
has text: No harm no foul. I just misunderstood what you were trying to do initially.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39139817
has text: Why do you want to do this?
score: 0
comment on: http://stackoverflow.com/q/25143669
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25208680
has body: I have a form that's being validated by parsley, but parsley seems to be screwing up. The element in question is defined like this: &lt;input class="num-selector" type="tel" name="gift_amount" data-min="20" data-type="digits" required&gt; However, stepping through the debugger reveals it's being validated as data-type="phone", which causes validation to fail. (Unless somebody is buying a gift certificate worth over a billion dollars, but that's clearly a fringe condition.) Has anybody heard of anything like this -- parsley screwing-up the data-type? Ever run into code that picks a fight with parsely.js and corrupts its data like this?
type: AnsweredQuestion
tagged with: javascript
type: Question
has answer: http://stackoverflow.com/a/25208750
score: 0
answer count: 1
tagged with: parsley.js
has title: parsley.js wrong data-type
accepted answer: http://stackoverflow.com/a/25208750

http://stackoverflow.com/comment/39250582
type: Comment
type: QuestionComment
has text: I'm a bit confused. Right now you don't need to pass anything; the variable is a global.
comment on: http://stackoverflow.com/q/25203565
score: 0

http://stackoverflow.com/comment/39003441
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25070440
has text: I don't see it as "polluting" the controller. The controller is supposed to hold display logic and data linkage, and that is exactly what this is. If you don't want to do it this way, try using the Angular-UI buttons.
score: 0

http://stackoverflow.com/q/25097225
linked to: http://stackoverflow.com/q/14364001
tagged with: php
has body: I want JavaScript to execute the data that is returned from a post. I have found several similar threads but nothing that has cleared it up for me. eval() throws an unexpected identifier error. The post: $.post("./save.php", { 'images_key' : images_array, 'userid_key' : $('#userid').val(), 'avatar_key' : $('#avatar_name').val() }, function( data ) { $( "#responseText" ).val( data ); eval(data); } ); The post is returning: $('.frame').html2canvas({ onrendered: function (canvas) { //Set hidden field's value to image data (base-64 string) $('#img_val').val(canvas.toDataURL('image/png')); //Submit the form manually document.getElementById('myForm').submit(); } }); Any ideas? Thanks! MORE INFO: On button click I'm calling this function: function saveCSS() { var id_data = $(".frame div img").map(function() { return $(this).attr("id"); }).get(); var title_data = $(".frame div img").map(function() { return $(this).attr("title"); }).get(); var width_data = $(".frame div img").map(function() { return $(this).css("width"); }).get(); var height_data = $(".frame div img").map(function() { return $(this).css("height"); }).get(); var top_data = $(".frame div:has(img)").map(function() { return $(this).css("top"); }).get(); var left_data = $(".frame div:has(img)").map(function() { return $(this).css("left"); }).get(); var zindex_data = $(".frame div:has(img)").map(function() { return $(this).css("z-index"); }).get(); var images_array = []; $.each(id_data, function (index, value) { images_array.push(value); images_array.push(title_data[index]); images_array.push(width_data[index]); images_array.push(height_data[index]); images_array.push(top_data[index]); images_array.push(left_data[index]); images_array.push(zindex_data[index]); }); $.post("./save.php", { 'images_key' : images_array, 'userid_key' : $('#userid').val(), 'avatar_key' : $('#avatar_name').val() }, function( data ) { // $( "#responseText" ).val( data ); // console.log(data); eval(data); } ); } The file save.php contains: …
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25097269
tagged with: post
type: Question
has title: Executing JavaScript returned from a .post
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25097269
score: 0
duplicate of: http://stackoverflow.com/q/14364001
answer count: 1

http://stackoverflow.com/a/25118473
has comment: http://stackoverflow.com/comment/39098102
score: 13
has comment: http://stackoverflow.com/comment/39102462
has body: The issue is occurring because of the CORS policy in your browser. In order to remove the error you normally have to make a change server side to whatever server you happen to be using. You'll have to add the header: Access-Control-Allow-Origin: * See here for more info on how to do this for specific back-end framework. That said since your using cordova you can also override the browser's behavior like so: if (Build.VERSION.SDK_INT &gt;= VERSION_CODES.JELLY_BEAN) { wv.getSettings().setAllowUniversalAccessFromFileURLs(true); } if you are using a webview. If you don't want to mess with the webview directly you can also set &lt;access uri="*" subdomains="true" /&gt; In your res/xml/cordova.xml. See here for more details http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html
has comment: http://stackoverflow.com/comment/39099186
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25118331
has comment: http://stackoverflow.com/comment/55848480
accepted answer of: http://stackoverflow.com/q/25118331
type: Answer
has comment: http://stackoverflow.com/comment/39096991
upvote count: 13
has comment: http://stackoverflow.com/comment/39099158
has comment: http://stackoverflow.com/comment/39102500

http://stackoverflow.com/comment/39136142
type: Comment
type: QuestionComment
has text: jQuery plugins (the better ones) normally use classes for styling additions and store a code instance in the elements `data` (not `data-` attributes).
comment on: http://stackoverflow.com/q/25141381
score: 0

http://stackoverflow.com/a/25156279
type: Answer
answers question: http://stackoverflow.com/q/25154812
score: 0
has comment: http://stackoverflow.com/comment/39163582
has body: please see here: http://jsbin.com/dajus/1/ just change a bit your $http call var app = angular.module('app', []); app.controller('firstCtrl', function($scope, $http){ $scope.usd = 10; $http.get('https://jsonp.nodejitsu.com/?url=https%3A%2F%2Fcoinbase.com%2Fapi%2Fv1%2Fcurrencies%2Fexchange_rates'). then(function(response,status,headers,config){ $scope.btc = parseFloat(response.data.btc_to_usd) * $scope.usd; }, function(data,status,headers,config){ console.log('failure'); }); });

http://stackoverflow.com/comment/39085327
has text: is `#uiView_TestPic` inside the iframe?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25114498

http://stackoverflow.com/comment/39642039
comment on: http://stackoverflow.com/q/25176878
type: Comment
type: QuestionComment
has text: @willjcksn i removed and installed again the inAppBrowser plugin but still not working like if window.open is undefined :( i followed the cordova doc guide to install the inAppBrowser plugin :(
score: 0

http://stackoverflow.com/q/25217659
answer count: 1
downvote count: 0
tagged with: javascript
has title: How to add multiple color schemes in one stylesheet In HTML?
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25220209
favorite count: 0
score: 4
has comment: http://stackoverflow.com/comment/39278636
tagged with: css
type: AnsweredQuestion
has body: I want to know how to add multiple color schemes in one stylesheet which works onclick like wordpress, magento etc.. where themes are available on their stores with different colors.
type: Question
upvote count: 4
has answer: http://stackoverflow.com/a/25220209
has comment: http://stackoverflow.com/comment/39278765

yammer
type: Tag
tags question: http://stackoverflow.com/q/25215242
tags question: http://stackoverflow.com/q/25198480
tags question: http://stackoverflow.com/q/25202119
tag name: yammer

http://stackoverflow.com/comment/39164008
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25156842
has text: You could use an event handler for a custom event, and trigger that when you change the value.
score: 0

http://stackoverflow.com/q/25205051
answer count: 0
score: 1
has body: I want to use checkbox with symfony2. I want to update a field value in a table (0/1) dynamically using the checkbox value. Here is my wrong code : index.html.twig : &lt;div class="slider demo" id="slider-1"&gt; {% if plate.share == true %} &lt;input type="checkbox" value="1" checked&gt; {% else %} &lt;input type="checkbox" value="1"&gt; {% endif %} &lt;/div&gt; &lt;script type="text/javascript"&gt; $("input[type='checkbox']").on('click', function(){ var checked = $(this).attr('checked'); if (checked) { var value = $(this).val(); $.post("{{ path('plate_share', { 'id': plate.id }) }}", { value:value }, function(data){ if (data == 1) { alert('the sharing state was changed!'); }; }); }; }); &lt;/script&gt; routing.yml plate_share: pattern: /{id}/share defaults: { _controller: "WTLPlateBundle:Plate:share" } PlateController.php: public function shareAction($id) { if($_POST &amp;&amp; isset($_POST['value'])) { $link = mysql_connect('127.0.0.1', 'admin', 'wtlunchdbpass'); if (!$link) { print(0); } mysql_select_db('wtlunch'); $value = mysql_real_escape_string($POST['value']); $sql = "INSERT INTO table (value) VALUES ('$value')"; if (mysql_query($sql, $link)) { print(1); } else { print(0); } } } But this solution is wrong and not working. Is it possible to create a form and submit it with only a checkbox? Is there an idea? Thanks. This for example the edit form action in the controller : public function editAction($id) { $user = $this-&gt;container-&gt;get('security.context')-&gt;getToken()-&gt;getUser(); if (!is_object($user) || !$user instanceof UserInterface) { throw new AccessDeniedException('This user does not have access to this section.'); } $em = $this-&gt;getDoctrine()-&gt;getManager(); $entity = $em-&gt;getRepository('WTLPlateBundle:Plate')-&gt;find($id); if (!$entity) { throw $this-&gt;createNotFoundException('Unable to find Plate entity.'); } $editForm = $this-&gt;createEditForm($entity); $deleteForm = $this-&gt;createDeleteForm($id); return $this-&gt;render('WTL…
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39254033
has title: Symfony2 and jquery checkbox
tagged with: javascript
has comment: http://stackoverflow.com/comment/39254244
has comment: http://stackoverflow.com/comment/39253924
downvote count: 0
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: symfony
tagged with: php
tagged with: checkbox

http://stackoverflow.com/comment/39171087
has text: I am actually just trying a way to force the user to enter value in one textbox and not both...
score: 0
comment on: http://stackoverflow.com/q/25159672
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25114391
answers question: http://stackoverflow.com/q/25113529
score: 1
accepted answer of: http://stackoverflow.com/q/25113529
has body: This would be better. var str = 'address="'+[Obj_address,Obj_city,Obj_state,Obj_zip].join(' ')+'"'; But you probaby don't need the quotes. var str = 'address='+encodeURIComponent( [Obj_address,Obj_city,Obj_state,Obj_zip].join(' ')); Or according to the api with a plus separator. var str = 'address='+encodeURIComponent( [Obj_address,Obj_city,Obj_state,Obj_zip].join('+'));
type: AcceptedAnswer
upvote count: 1
type: Answer
downvote count: 0

http://stackoverflow.com/comment/39100127
type: Comment
comment on: http://stackoverflow.com/a/25122224
has text: @Alnitak No it's not. Type `Math.floor(1 * 999999 + 100000)` into your JS console.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39292079
comment on: http://stackoverflow.com/q/25225515
score: 0
type: Comment
type: QuestionComment
has text: Thank you Arnelle! I now have a better understanding of why the separator was functioning the way it was ;) Much appreciated!

http://stackoverflow.com/comment/39026721
comment on: http://stackoverflow.com/a/25081105
has text: @ian: It seems like you haven't succeeded in using my code as-is. See note nr.4 and see my implementation (especially the `=== "true"`) part.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25206719
has comment: http://stackoverflow.com/comment/39257198
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39257080
has title: how to assign a class to a div when a checkbox is checked
answer count: 1
downvote count: 0
has body: i am trying to assign a class to a div when a checkbox is checked. currently the code i have is working but i have a few div's and when a single item is checked it assigns the class to all of the divs. js code. $("input[type='checkbox']").change(function(){ if($(this).is(":checked")){ $(".widget").addClass("services services-active"); }else{ $(".widget").removeClass("services-active"); } }); html Support1 Test1 Support2 Test1 how can i assign the class separately to each parent div? do i need to do js code for each div and use div id or can i add a .each statement to the js code?
favorite count: 0
has comment: http://stackoverflow.com/comment/39256957
has answer: http://stackoverflow.com/a/25206787
accepted answer: http://stackoverflow.com/a/25206787
type: AnsweredQuestion
score: 1
upvote count: 1

http://stackoverflow.com/q/25190787
has title: How to inject html into an Angular UI bootstrap popover
score: 3
has answer: http://stackoverflow.com/a/25190940
tagged with: angularjs
upvote count: 3
has answer: http://stackoverflow.com/a/36788051
has answer: http://stackoverflow.com/a/25194242
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/30085096
answer count: 4
downvote count: 0
tagged with: javascript
tagged with: angular-ui-bootstrap
favorite count: 0
has body: How can I inject html into a Angular UI boostrap popover? I'd prefer to simply show and hide a div with all the popover html content. Right now I have: BUTTON HERE I'd like to replace the text LOG OUT with full html, including Angular.js bindings and directives.
type: Question

http://stackoverflow.com/a/25119077
accepted answer of: http://stackoverflow.com/q/25117491
answers question: http://stackoverflow.com/q/25117491
type: AcceptedAnswer
upvote count: 6
downvote count: 0
has body: You should pass an object, and add true to fix the new event in the calendar : var myevent = {title: 'All Day Event',start: new Date(y, m, d)}; $('.calendar').fullCalendar( 'renderEvent', myevent, true);
score: 6
type: Answer

http://stackoverflow.com/comment/123874324
score: 0
type: AnswerComment
type: Comment
has text: This answer didn't actually answered the question, the question didn't ask if this was safe or not.
comment on: http://stackoverflow.com/a/46072799

http://stackoverflow.com/comment/39186703
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25165719
has text: Can you share your HTML... and I think you mean "column" not "row" right?
score: 0

http://stackoverflow.com/a/25199788
has comment: http://stackoverflow.com/comment/39246038
has comment: http://stackoverflow.com/comment/39245914
upvote count: 1
has comment: http://stackoverflow.com/comment/39246945
has comment: http://stackoverflow.com/comment/39250592
type: Answer
has comment: http://stackoverflow.com/comment/39245764
answers question: http://stackoverflow.com/q/25198903
downvote count: 0
score: 1
has body: Try with &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=1" /&gt; Jquery to do this function AllowZoom(flag) { if (flag == true) { $('head meta[name=viewport]').remove(); $('head').prepend('&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=10.0, minimum-scale=1, user-scalable=1" /&gt;'); } else { $('head meta[name=viewport]').remove(); $('head').prepend('&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" /&gt;'); } } Use user-scalable=0 //zoomDisable Use user-scalable=1 //zoomEnable Updated: initial-scale (0 to 10.0) Multiplier that sets the scale of the page after its initial display. Safe bet: if you need to set it, set it to 1.0. Larger values = zoomed in, smaller values = zoomed out minimum-scale (0 to 10.0) The minimum multiplier the user can “zoom out” to. Defaults to 0.25 on mobile Safari. maximum-scale (0 to 10.0) The minimum multiplier the user can “zoom in” to. Defaults to 1.6 on mobile Safari.
has comment: http://stackoverflow.com/comment/39250491

http://stackoverflow.com/q/25204312
accepted answer: http://stackoverflow.com/a/25204376
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39252362
has comment: http://stackoverflow.com/comment/39252107
tagged with: http://stackoverflow.com/tag/json
has body: Say I have JSON data as below: var db=[ {"name":"John Doe","age":25}, {"name":"John Doe 2","age":21} ] I know how to retrieve data from the JSON object using js/jquery. What I need is to get the value of the labels, i.e. I want to retrieve the "name" and the "age" from the object. I don't actually want to retrieve the values "John Doe" and 25 (I can already do that), instead I want the labels. Say the JSON object has about 5 data with 10 fields each. I need to display the JSON in table form dynamically which I can already do. Since the JSON may be any set of values, I won't know what label to put in the cells of the table. So I need a way to get the labels. Using a pseudo code: var db=[ {"name":"John Doe","age":25}, {"name":"John Doe 2","age":21} ] for i in db{ for j in db[i]{ console.log(db[i][j].label+":"db[i][j]) } } //db[i][j].label doesn't really work The output should be: name: John Doe age: 25 name: John Doe age: 21 Is there a JavaScript or jQuery function to do so or some other method to retrieve the required data?
has title: Retrieving labels from JSON objects in javascript
has answer: http://stackoverflow.com/a/25204409
has comment: http://stackoverflow.com/comment/39252128
type: Question
has comment: http://stackoverflow.com/comment/39252166
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
has answer: http://stackoverflow.com/a/25204376
has answer: http://stackoverflow.com/a/25204393
upvote count: 4
answer count: 3
linked to: http://stackoverflow.com/q/500504
linked to: http://stackoverflow.com/q/9767133
possible better answer: http://stackoverflow.com/a/25204393
favorite count: 0
linked to: http://stackoverflow.com/q/208016

http://stackoverflow.com/comment/39184244
comment on: http://stackoverflow.com/q/25161312
score: 0
type: QuestionComment
has text: I found a workaround for this problem. I took the AngularJS code on my local machine and I added a condition before the line because the array seems to be sparse. So, I changed the forEach source code adding: if ( typeof obj[key] !== 'undefined' ) in the for loop.
type: Comment

http://stackoverflow.com/q/25223951
tagged with: javascript
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39289026
has answer: http://stackoverflow.com/a/25224087
has body: I am working in javascript and I would like to find the index of an element in an array . var task = [{taskno:'1',todo:'cooking'},{taskno:'2',todo:'play'}]; now i want to find the index of task which has todo as cooking and i dont know its task no .... is there any inbuilt function ? I have tried this code but It's not working: var index = task.indexOf(todo:'cooking'); Now I'm using a for loop is there any other way? Thanks in advance :)
type: UnansweredQuestion
upvote count: 1
type: Question
has title: How to get index of an array element which has more than one sub elements in javascript
tagged with: indexing
linked to: http://stackoverflow.com/q/9273157
has answer: http://stackoverflow.com/a/25224004
answer count: 2
tagged with: arrays
downvote count: 0

http://stackoverflow.com/a/25134095
type: Answer
has comment: http://stackoverflow.com/comment/39141497
has body: There's more than one way to solve this. Use the outline property (2014-08-05 status: works in Chrome and Opera) <g style="outline: thick solid black; outline-offset: 10px;"> <circle cx="50" cy="60" r="20" fill="yellow"/> <rect x="80" y="80" width="200" height="100" fill="blue"/> </g> See live example. Use a filter to generate the border (2014-08-05 status: works in Firefox, but Chrome/Opera has a bug on feMorphology, but it should be possible to work around that by using other filter primitives). <feFlood flood-color="black" result="outer"/> <feMorphology operator="erode" radius="2" in="outer" result="inner"/> <feComposite in="inner" in2="outer" operator="xor"/> <feComposite in2="SourceGraphic"/> <g filter="url(#border)"> <circle cx="50" cy="60" r="20" fill="yellow"/> <rect x="80" y="80" width="200" height="100" fill="blue"/> </g> See live example. Both of the above will automatically update to whatever size the group has, without the need for DOM modifications.
answers question: http://stackoverflow.com/q/25086712
downvote count: 0
score: 8
upvote count: 8

http://stackoverflow.com/q/25199514
tagged with: javascript
answer count: 1
has comment: http://stackoverflow.com/comment/39243433
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25207143
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39243873
type: Question
has body: I would like to map a structure like this: { "stuff": { "onetype": [ {"id":1,"name":"John Doe"}, {"id":2,"name":"Don Joeh"} ], "othertype": {"id":2,"company":"ACME"} }, "otherstuff": { "thing": "some value" } } to an object containing 2 arrays of objects (stuff and other stuff). I would like to build a prototype for this JSON object so that I have all my functions available. I would like to be able to do something like this (tree being the parent object). tree.display() where the display function will go thought the array one type and call the functions display on the containing objects. Is there an easy way of doing this? Can somebody point me to an example of how to do this? Can I use a functions like $.extend? this is not working: $(document).ready(function(){ JSONString = '\ {"stuff": \ {"onetype": \ [{"id":1,"name":"John Doe"},\ {"id":2,"name":"Don Joeh"}],\ "othertype": \ {"id":2,"company":"ACME"}\ }, \ "otherstuff": {"thing": "some value" }\ }'; function Tree () { this.stuff = new StuffObject(); this.otherstuff; this.showValue = function () { $("body").append(this.otherstuff.thing); } } function StuffObject () { this.onetype = new Array(); this.othertype = new OthertypeObject(); } function OthertypeObject () { this.id = 0; this.company = "unspecified"; this.showCompany = function(){ console.log(this.company); } } var firstTree = $.extend(true, new Tree, JSON.parse(JSONString)); console.log(firstTree); firstTree.showValue(); firstTree.stuff.othertype.showCompany(); });
has title: How to map nested JSON to an Object structure with functions?
has comment: http://stackoverflow.com/comment/39244885

http://stackoverflow.com/a/25080233
upvote count: 6
answers question: http://stackoverflow.com/q/25080138
score: 6
has body: If you want to prevent calls to alert() from being displayed, use the following code: var defaultAlert = null; function function_one() { if (defaultAlert === null) { defaultAlert = window.alert; window.alert = function() {}; } } function function_two() { if (defaultAlert !== null) { window.alert = defaultAlert; defaultAlert = null; } }
downvote count: 0
has comment: http://stackoverflow.com/comment/39021997
type: Answer

http://stackoverflow.com/q/25136845
has answer: http://stackoverflow.com/a/25137489
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has title: Previous and Next functions for js slider
has comment: http://stackoverflow.com/comment/39126624
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39126955
has body: I have almost finished this slider, but I don't know how to implement the functionality for next() and prev(). How can I implement these functions? http://jsfiddle.net/M4t4L/11/ $(function () { var container = $("#scene"), i = 0, count = container.find("li").length, j = container.find("li").length - 1, isAnimating = false; container.find("li:first").css({ "width": "100%" }); $("#trigger").click(function (e) { if (!isAnimating) { isAnimating = true; e.preventDefault(e); i++; if (i &gt;= count) { i = 0; } j++; if (j &gt;= count) { j = 0; } container.find("li") .finish() .removeClass('active') .last() .width(0) .addClass("active") .animate({ "width": "100%" }, 800, function () { container.find("li").first().appendTo(container); isAnimating = false; }); } }); }); The problem is that when I implement these functions and press the next or prev. Displays the last slide on one second, and then switches to the desired http://jsfiddle.net/M4t4L/9

http://stackoverflow.com/comment/39274431
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25215555
has text: He wants the user to download the file. I want to just display it and download it to the server. @JeremyJStarcher
score: 0

http://stackoverflow.com/comment/39091622
has text: @Charminbear Not relations, just finding or making as needed. If my example I find/make a company instance because I need to reference `company._id` but that's just the current use case.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25117210

http://stackoverflow.com/comment/39299898
type: Comment
has text: @DavidSawyer but that would change the tab in which the extension is running, not the tab which I'm targeting, unless you suggest I inject it into that tab. And in any case this changes the tab, not just returns the previous url.
comment on: http://stackoverflow.com/q/25229422
score: 0
type: QuestionComment

http://stackoverflow.com/a/25222165
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25221932
type: Answer
has body: You could try to use data attributes to store the text displayed on delete and when user clicks on an element to remove it then you could replace the text message inside the dialog box using .text() and the data attribute value.
accepted answer of: http://stackoverflow.com/q/25221932
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/39005242
has text: What is the problem exactly? Is there an error message?
comment on: http://stackoverflow.com/q/25071202
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/72694959
comment on: http://stackoverflow.com/a/25228861
has text: That's ES7 example is really cool! You can use the same pattern with ES6 by removing the `do` adding a three `return` statements.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/a/25212168
has comment: http://stackoverflow.com/comment/39269345
has comment: http://stackoverflow.com/comment/39270608
has body: That link sends the user to a new page, no? So the tracking call needs to be completed before the link loads or it won't be called. Maybe your production environment is just significantly faster so the call doesn't have time to load? I would return false; on the link click and then send the user to the download link from a callback on that ajax request. I might be totally off here, but in my experience I wasn't aware you could consistently process js after a link click without halting it on some level.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25211623

http://stackoverflow.com/comment/39146045
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25146925
type: QuestionComment
has text: @SaurabhSinha yes but OP wants the `uniqueID` too!

http://stackoverflow.com/q/25128165
type: Question
score: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39111320
linked to: http://stackoverflow.com/q/23398198
tagged with: css
has comment: http://stackoverflow.com/comment/39111205
has answer: http://stackoverflow.com/a/25128248
has title: How can I block/allow access to document.styleSheets information, and what is the reason for this
accepted answer: http://stackoverflow.com/a/25128248
has comment: http://stackoverflow.com/comment/39111226
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39111522
has body: I recently found about document.styleSheets API which allows to get stylesheets used by the site. The use is straightforward and document.styleSheets[0].cssRules for example will give me all the css rules for the first stylesheet on the page. So when I write this in console in google.com, it returns me a correct list, but when I write in in console on stackoverflow page, it returns null. I assume that some sites can block this information. My questions are: how can I block/allow this as a site owner. what is the reason for blocking it? (Anyone who would like to get it, can get it by copying the stylesheet and parsing it) P.S. This question looks similar, but it is not. I am not looking how to overcome the problem, I am looking the reason and how can I block allow this as an owner. I also have doubts that this is cross-origin problem. P.P.S. Here is a proof that I get null and it is strange that some people did not get null.

http://stackoverflow.com/comment/39702646
has text: You have access to the entire data of the bubble being dragged, so you can filter with that.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25195823

http://stackoverflow.com/comment/39095427
has text: ah thanks alot Lars that went through a treat, ill have a play to get my desired effect
comment on: http://stackoverflow.com/q/25119555
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25094279
has answer: http://stackoverflow.com/a/25094371
has body: I'm using Bootstrap for the form CSS & validation. The form is part of Bootstrap modal. As the user clicks on submit, inputting incorrect validation, the form submits and the bootstrap shows an error as well. How can I apply the bootstrap validation just before the form values are passed through ajax? Here's my relevant code: JavaScript: function feedbacksubmit() { var formvalues = { email : $('#feedbackemail').val(), message : $('#feedbackmessage').val(), }; $.ajax({ type: "POST", url: "<?php echo base_url();?>feedback/add", data: { values: formvalues }, success: function(response) { alert('Thanks for your feedback!'); }, error: function(error) { alert("Error"); } }); } $(".feedbacksubmit").click(feedbacksubmit); Feeback Modal: Email: @ Message Submit
favorite count: 0
has title: jQuery form submission using Bootstrap in CodeIgniter
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has answer: http://stackoverflow.com/a/25094373
tagged with: codeigniter
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25251227
has body: Since .* grabs as many matching characters as it can, you need to be more specific about what can and can't be in the middle. Try: var res = str.match(/https?:\/\/\S+\.flv/gi); where \S grabs as many non-whitespace characters as it can. To exclude certain characters, use [^...]: var res = str.match(/https?:\/\/[^\s;]+\.flv/gi); Alternatively, just make your .* lazy instead of greedy with a well-placed ?: var res = str.match(/http.*?\.flv/gi);
accepted answer of: http://stackoverflow.com/q/25212481
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39342046
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25212481
downvote count: 0
has comment: http://stackoverflow.com/comment/39341606
has comment: http://stackoverflow.com/comment/39342664
type: Answer

http://stackoverflow.com/comment/39291910
has text: It's seems you're looking for URL Rewriting, maybe helpful if checking This: http://stackoverflow.com/a/16389034/3878932
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25225501

http://stackoverflow.com/q/25178308
has comment: http://stackoverflow.com/comment/39203551
possible better answer: http://stackoverflow.com/a/25181200
tagged with: javascript
has body: I'm writing a templating engine and I have a syntax that looks like this: {{If "{{Line}}" != ""}} {{If "{{Line}}" != ""}} &lt;li id="{{Required:Id}}" class="menuEntry line"&gt; {{EndIf}} &lt;li id="{{Required:Id}}" class="menuEntry line"&gt; {{EndIf}} Now, I'm searching for a regex to get my if statements, meaning from {{If until {{EndIf}} everything in between should be included. I came up with the regex: /({{If)[.]*?[\s\S]*?({{EndIf}})/g And this does work fine when I have only 1 if statement, but with nested if statements, it goes wrong. The above regex would give me: {{If "{{Line}}" != ""}} {{If "{{Line}}" != ""}} &lt;li id="{{Required:Id}}" class="menuEntry line"&gt; {{EndIf}} And in fact I'm expecting to retrieve: {{If "{{Line}}" != ""}} &lt;li id="{{Required:Id}}" class="menuEntry line"&gt; {{EndIf}} Anyone who can provide me some guidance here?
has answer: http://stackoverflow.com/a/25178516
type: Question
has title: Match only the inner HTML?
type: AnsweredQuestion
tagged with: regex
accepted answer: http://stackoverflow.com/a/25178516
has comment: http://stackoverflow.com/comment/39203523
linked to: http://stackoverflow.com/q/432493
has answer: http://stackoverflow.com/a/25178751
score: 0
answer count: 3
linked to: http://stackoverflow.com/q/1068280
has answer: http://stackoverflow.com/a/25181200

http://stackoverflow.com/comment/131964973
type: AnswerComment
score: 0
type: Comment
has text: Except this doesn't seem to work correctly for local files. If I do `window.opener.postMessage( { }, "*" );` in a popup window, then the parent window will not be able to access `event.source`. I get "Blocked a frame with origin "null" from accessing a cross-origin frame." This is ironic, since the documentation specifically states that the entire point of postMessage is to allow secure communication across different origins.
comment on: http://stackoverflow.com/a/26280437

http://stackoverflow.com/a/25188077
type: Answer
has body: You have many ID's that are not unique. The ID must be unique in a document, and is often used to retrieve the element using https://developer.mozilla.org/en-US/docs/Web/API/Element.id This will affect your JavaScript. I would recommend using classes instead if you want non-unique identifiers.
score: 0
answers question: http://stackoverflow.com/q/25187714

http://stackoverflow.com/comment/39269614
has text: What do you want to do with this information?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25213390

http://stackoverflow.com/q/25097932
type: AnsweredQuestion
has title: Javascript flood fill algorithm getting caught in an infinite loop
score: 1
has comment: http://stackoverflow.com/comment/39055008
has answer: http://stackoverflow.com/a/25098101
upvote count: 1
type: Question
tagged with: recursion
tagged with: algorithm
has body: Hello I am trying to implement a simple flood fill type algorithm in javascript. Basically I have a 3x3 board which I represent as a 1 dimensional array. I want to append the index for every equal value that is "touching" to a separate array. So for instance this board: [1][1][0] [3][1][3] [0][0][0] Would be represented as a 1D array ie [1,1,0,3,1,3,0,0,0]. And after running the floodFill on one of the [1] it would result with an array that looks like this [4, 1, 0] because those are the indexes in the 1d array that are touching, which have the same value. Here is the code: var boardArray = new Array(1,1,0,3,1,3,0,0,0); var comboArray = new Array(); function floodFill(n, diceVal) { if(boardArray[n] != diceVal) { return; } comboArray.push(n); if (n &gt;0 &amp;&amp; n &lt; 8) { // right if(!(n%3==2)) { floodFill(n+1, diceVal); } // left if(!(n%3==0)) { floodFill(n-1, diceVal); } // up if(n&gt;2) { floodFill(n-3, diceVal); } // down if(n&lt;5) { floodFill(n+3, diceVal); } } else { return; } } floodFill(4,1); Can anyone tell me why this is getting stuck in an infinite loop?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39054750
has comment: http://stackoverflow.com/comment/39054827
tagged with: flood-fill
accepted answer: http://stackoverflow.com/a/25098101
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39054900
has comment: http://stackoverflow.com/comment/39054884
has comment: http://stackoverflow.com/comment/39054639

http://stackoverflow.com/comment/39554392
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25140787
has text: I had to use `$("#flotcontainer .flot-overlay").trigger(e);` (different class name)
type: AnswerComment

http://stackoverflow.com/a/38391983
has comment: http://stackoverflow.com/comment/129557779
downvote count: 0
has comment: http://stackoverflow.com/comment/84518323
type: Answer
answers question: http://stackoverflow.com/q/25219346
upvote count: 7
has body: Check out the easy solution(v3): map.getProjection().fromLatLngToPoint(marker.position); https://developers.google.com/maps/documentation/javascript/3.exp/reference#Projection
score: 7

http://stackoverflow.com/comment/39243181
score: 0
type: Comment
has text: if wrote like this what u Mention ,,Uncaught TypeError: Object [object Array] has no method 'getDate' is showing....@tuan hunyh
comment on: http://stackoverflow.com/a/25199235
type: AnswerComment

http://stackoverflow.com/comment/39124625
type: Comment
score: 2
type: QuestionComment
comment on: http://stackoverflow.com/q/25135626
has text: you can't use javascript if it is not enabled. You cannot force it to work, it would be a security issue. You would need to have a fallback function for when javascript isn't available, which should be ye old postbacks

http://stackoverflow.com/comment/39294041
comment on: http://stackoverflow.com/a/25156870
type: Comment
has text: Can you help me to implement this for cross browser compatibility?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25115682
has comment: http://stackoverflow.com/comment/39087635
score: 3
has body: With navigator.getUserMedia I can request a camera stream. If no camera is installed the errorCallback will be invoked. But if there is a camera the user will be prompted with a security request. Is it possible to "silently" detect whether a camera is installed, so that I can build different UIs on this detection, without bothering the user with a getUserMedia request?
has comment: http://stackoverflow.com/comment/39087551
tagged with: getusermedia
favorite count: 0
has comment: http://stackoverflow.com/comment/39088405
has comment: http://stackoverflow.com/comment/39088039
has comment: http://stackoverflow.com/comment/39087694
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39088107
has comment: http://stackoverflow.com/comment/39088178
has comment: http://stackoverflow.com/comment/39088043
downvote count: 1
has comment: http://stackoverflow.com/comment/39087435
has comment: http://stackoverflow.com/comment/39087614
has title: Silently detecting whether a camera is installed
has comment: http://stackoverflow.com/comment/39087875
tagged with: video-capture
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39088263
upvote count: 4
has comment: http://stackoverflow.com/comment/39087912
has comment: http://stackoverflow.com/comment/39088584

http://stackoverflow.com/a/25215368
has comment: http://stackoverflow.com/comment/39294020
has comment: http://stackoverflow.com/comment/39274250
answers question: http://stackoverflow.com/q/25214742
score: 0
has comment: http://stackoverflow.com/comment/39273920
type: Answer
has comment: http://stackoverflow.com/comment/39312715
has comment: http://stackoverflow.com/comment/39274407
has comment: http://stackoverflow.com/comment/39273857
has body: Well, it absolutely sounds like a firmware problem to me. I'd consider taking it up with their technical support. (Good luck.) If time zone issues are important for your app and you're looking for a workaround, consider providing your own time zone data with your application. Assuming you can run any JavaScript you want, you should be able to use moment.js with the moment-timezone add-on.

http://stackoverflow.com/a/25228707
upvote count: 4
downvote count: 0
score: 4
answers question: http://stackoverflow.com/q/25228158
has body: I made a fiddle where you have a working example of a horizontal mouse scroll. http://jsfiddle.net/ata68xr6/ using jquery.mousewheel.js and jquery with the function: $(function() { $("html, body, *").mousewheel(function(event, delta) { this.scrollLeft -= (delta * 80); this.scrollRight -= (delta * 80); event.preventDefault(); }); });
type: Answer

http://stackoverflow.com/comment/39107972
type: AnswerComment
has text: @Kolby Upvoted. I'd still suggest just using a normal `for` loop, but I'll leave that up to you. For OP: Please note that `Array.forEach` is not supported in Internet Explorer 8 and below. [ECMAScript 5 compatibility table](http://kangax.github.io/compat-table/es5/#Array.prototype.forEach)
type: Comment
comment on: http://stackoverflow.com/a/25126173
score: 2

http://stackoverflow.com/a/25141568
type: Answer
has comment: http://stackoverflow.com/comment/39138845
accepted answer of: http://stackoverflow.com/q/25140234
answers question: http://stackoverflow.com/q/25140234
has body: PHP can't tell what data type is being passed in. The POST data is seen as a string. Check this previous answer out. I believe it covers the issue you are having. PHP also has FILTER_VALIDATE_BOOLEAN, which is also covered in the answer I linked. I think it'll help you. For example: $isEditable= filter_var ($_POST['isEditable'], FILTER_VALIDATE_BOOLEAN); That should make $isEditable a boolean.
type: AcceptedAnswer
score: 0

http://stackoverflow.com/q/25101936
has comment: http://stackoverflow.com/comment/39061885
tagged with: if-statement
has answer: http://stackoverflow.com/a/25101951
score: 0
has body: Why is it that you aren't supposed to add semicolons after every set of curly braces? I thought this was a rule in JavaScript. In this code snippet, for instance, it turns out that it does not work because of the semicolon after the initial if statement, but then the semicolon after the else statement is fine. function a() { if (var &gt;= length) { count = var / length; }; else { count = 0 };
type: Question
has answer: http://stackoverflow.com/a/25101952
tagged with: javascript
has answer: http://stackoverflow.com/a/25101958
answer count: 3
type: UnansweredQuestion
has title: Why does adding a semicolon sometimes break an if statement?

http://stackoverflow.com/a/25180463
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25178416
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25178416
has body: Well, I've made this demo sample, so we could see that it basically works. After discussion with TO, it appeared that he called $('#city_id').val(cityVariable); after ajax call, but not inside success callback. Since AJAX is asynchronous by its nature, by the time the above statement was called, there was no content in $('#city_id') select - it was populated inside ajax successful callback. So moving above statement inside callback did the trick.

http://stackoverflow.com/comment/39176173
type: QuestionComment
type: Comment
has text: @JohnBarça, I might try your solution, but I preferred not to extend the OpenLayers core. And I think this might not cover all the pan, drag, zoom cases. A general solution would be better, I think. I heard there was an options in the map initialization, that restricts the extent only vertically. Do you know anything about it? Thank you.
score: 0
comment on: http://stackoverflow.com/q/25150022

http://stackoverflow.com/q/25201312
linked to: http://stackoverflow.com/q/12859942
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39246400
has comment: http://stackoverflow.com/comment/39246489
type: Question
answer count: 5
has comment: http://stackoverflow.com/comment/39246643
has comment: http://stackoverflow.com/comment/39247101
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39246692
tagged with: php
has answer: http://stackoverflow.com/a/25201893
upvote count: 1
has answer: http://stackoverflow.com/a/25201419
has title: Submit a Form without Refreshing page with jQuery and Ajax
has comment: http://stackoverflow.com/comment/39246680
tagged with: javascript
has answer: http://stackoverflow.com/a/25201556
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/60174
has body: I am trying to do something like this example - My form.html - Select Franchisee Enquiry Feedback Complaint Please Enter Valid Data Registration Successfully But code url: "contact.php", does not seem to work, as my database is not updated. contact.php file is as follows - <?php include("connect.php"); if($_POST) { alert("1"); $contacttype=$_POST['contacttype']; $name=$_POST['name']; $email=$_POST['email']; $phone=$_POST['comment']; $comment=$_POST['comment']; mysql_query("insert into `contact_form`(`type`, `name`, `email`, `phone`, `comment`) VALUES ($contacttype,$name,$email,$phone,$comment)"); } else { alert("2"); } ?> Can anybody help me out. I need to update my database without refreshing my html page.
has answer: http://stackoverflow.com/a/25202184
has answer: http://stackoverflow.com/a/25203183
downvote count: 0
score: 1
tagged with: jquery

http://stackoverflow.com/comment/39251472
comment on: http://stackoverflow.com/a/25202784
type: AnswerComment
score: 0
type: Comment
has text: I'm getting error like Uncaught TypeError: Cannot read property 'nodeName' of null.

http://stackoverflow.com/comment/39051637
comment on: http://stackoverflow.com/q/25096423
score: 0
type: QuestionComment
type: Comment
has text: Please see my answer to question.

http://stackoverflow.com/q/25104173
type: Question
has body: How to get Facebook posts of a page with its comments to my webpage? I saw it from http://rudaw.net/english in sidebar and they apply custom style for it like that: I saw graph of Facebook, that is JSON of one of pages: { "id": "411891885531368", "about": "ئامانجمان خزمهت کردنی ئێوهیه", "can_post": false, "category": "Computers/internet website", "checkins": 109, "cover": { "cover_id": 693427407377813, "offset_x": 0, "offset_y": 0, "source": "https://scontent-b.xx.fbcdn.net/hphotos-xpa1/t1.0-9/s720x720/10501938_693427407377813_8236762689196644851_n.png" }, "description": "سەردانی ماڵپەڕی کێشەی کومپیوتەر بکە: http://www.pkurd.com/ku/", "has_added_app": false, "is_community_page": false, "is_published": true, "likes": 358257, "link": "https://www.facebook.com/computer.problem1", "name": "كیشةی كۆمپیوتةر", "parking": { "lot": 0, "street": 0, "valet": 0 }, "phone": "07503085828", "talking_about_count": 658972, "username": "computer.problem1", "website": "http://www.pkurd.com/ku/", "were_here_count": 0 } I want to get posts and comments of this page like rudaw's getting, how to do that?
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/31133892
accepted answer: http://stackoverflow.com/a/31133892
tagged with: facebook
tagged with: php
has title: How to get Facebook posts of a page with its comments?
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/q/25221749
has body: I've been working on a user edit modal, the modal display's perfectly fine however the form submission is not working properly. I've looked at console output and I can't spot where my logic is failing me. I know I have to create the modal, fill the content, display the modal and then submit the form. Thanks for the help! Here is the code: var update_user_display = function() { $("body").on('click', '.update_user_display', function(evt) { evt.preventDefault(); var user_id = parseInt($(this).attr('data-id')); var user_login = $(this).attr('data-user'); var user_password = $(this).attr('data-password'); var user_email = $(this).attr('data-email'); var user_role = $(this).attr('data-role'); var output = ''; output += ' '; output += ' '; output += ' '; output += ' Employee Name '; output += ' Password '; output += ' Email Address '; output += ' Role '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; output += ' '; // The BS3 Modal var user_modal = $("#modal-user"); // Populate the Data user_modal.find('.modal-title').html('User Editor'); user_modal.find('.modal-body').html(output); // Show the Modal user_modal.modal('show'); // Proccess Data Changes $("#submit").on('click', function(evt) { evt.preventDefault(); var form = $(this); var url = $(this).attr('action'); console.log(url); var postData = { user_id: parseInt($(this).attr('user_id')), login: $(this).find('.login').val(), password: $(this).find('password').val(), email: $(this).find('email').val(), role: $(this).find('role').val() }; console.log(postData); $.post(url, postData, function(o) { if(o.result == 1) { Result.success("Successfuly Updated User."); // Hide the Modal default_modal.modal('hide'); } else { Result.error("No Changes Made."); } }, 'json'); }); }); };
has answer: http://stackoverflow.com/a/25221898
accepted answer: http://stackoverflow.com/a/25221898
tagged with: twitter-bootstrap
type: AnsweredQuestion
tagged with: forms
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has title: Dynamic Modal with Form - Undefiend Post Data

http://stackoverflow.com/comment/39135834
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25141308
type: QuestionComment
has text: That's because global methods are "special", if you wrap it in a IIFE and bind with an empty object or something similar, you still can't call it directly, you can only do that with methods attached to window, see this -> **http://jsfiddle.net/LwbL7/1/**

http://stackoverflow.com/a/25101111
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25101011
answers question: http://stackoverflow.com/q/25101011
type: AcceptedAnswer
downvote count: 0
has body: If you want to repeat everything in the outer loop you can use the do the repeat. Code below: {{item .name}} {{item .surname}} Total If you want to repeat only the inner loop multiple times and show the total a single time you might try dividing your table in two elements like: {{item .name}} {{item .surname}} Total
type: Answer

http://stackoverflow.com/comment/39295733
has text: $location does nothing if you lett it go to the same location, since it is already there. It is not entirely clear to me what you want to do. If you want to retrieve something like the userAccounts again, make a function out of it and call that again. If you want to lett the rest of the page know that it should do something I recommend $broadcast or $emit. It give a much cleaner design.
type: Comment
comment on: http://stackoverflow.com/q/25227460
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39027314
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25081243
has text: The avoiding of the use of `global` is mostly a best practice thing. What you might consider doing is having an object that you reference by name (e.g. `var reportNames = ...` at the top of your script somewhere and then do `readDataTop(reportNames[req.params.report], ...)`).

http://stackoverflow.com/q/25210559
accepted answer: http://stackoverflow.com/a/25210642
upvote count: 2
tagged with: http-redirect
has comment: http://stackoverflow.com/comment/39264121
has body: i am trying to redirect from a page to another one. Each page has it's own controller. i do .controller('HomeCtrl', function ($scope, $location) { $scope.settings = Helper.getLS('settings'); if (!$scope.settings) $location.path("/app/settings"); console.log('why am i seeing this?'); ... the URL is changing but the issue is that i can still see the log in the console and the rest of the functions in this page still run i would like to halt execution and redirect and run the other controller on the new page any ideas?
type: Question
type: AnsweredQuestion
has title: angular location redirect still runs the current controller, how to?
tagged with: location
score: 2
has answer: http://stackoverflow.com/a/25210642
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39264160
tagged with: javascript
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/comment/39077677
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25110166
has text: @MatthewLock No, you're mistaken. Working examples are for Code Review.SE - Stack Overflow is for code that ***doesn't work***. This code is easily verifiable, has been simplified to my precise problem, and is completely straight-forward.

http://stackoverflow.com/q/25102649
has comment: http://stackoverflow.com/comment/39063197
upvote count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39063178
score: 0
has answer: http://stackoverflow.com/a/25102673
has comment: http://stackoverflow.com/comment/39064523
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: focus input before DOM is load
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25102682
has body: How can I focus an text input when it is visible which is probably before the whole DOM is ready? I only have to possibility to run a script before the DOM started loading. The reason I want to do this is that the user wants to start typing until the input is visible and loading the DOM takes a while. I would like to do it with jQuery. Greetings!
downvote count: 1
has comment: http://stackoverflow.com/comment/39063189
has comment: http://stackoverflow.com/comment/39063256
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39063216

http://stackoverflow.com/q/25150604
answer count: 2
has comment: http://stackoverflow.com/comment/39152880
has title: is all bootstrap javascript plugin integrate in one js file?
has comment: http://stackoverflow.com/comment/39152929
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39152825
has answer: http://stackoverflow.com/a/25150699
score: 0
has comment: http://stackoverflow.com/comment/39152888
has answer: http://stackoverflow.com/a/25150620
has comment: http://stackoverflow.com/comment/39152910
has comment: http://stackoverflow.com/comment/39152840
has body: I just started learning bootstrap .I study the documentation of bersion 2.0.3 that i need to add bootstrap.js, bootstrap.css , if I need to implement anything I need to enter jquery and plugin from here. http://bootstrapdocs.com/v2.0.3/docs/javascript.html But When I goes uper version 3.2 or 2.3.2 http://getbootstrap.com/2.3.2/javascript.html http://getbootstrap.com/javascript/ there is that line return Plugins can be included individually (though some have required dependencies), or all at once. Both bootstrap.js and bootstrap.min.js contain all plugins in a single file. what does it mean ? if I include bootstrap.js .it will contain all plugin ? No need to add other plugin ?
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39152852
linked to: http://stackoverflow.com/q/25149978
type: Question

http://stackoverflow.com/q/25142846
tagged with: internet-explorer
has title: Access to svg through jquery in IE 8
tagged with: internet-explorer-8
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am looking for a way to use jquery to manipulate SVG paths in IE8, currently I am using the following syntax and works fine in IE9+ $('svg path.someClass').css({fill:'rgb(0,0,0)'}); Is there a way I can achieve this? Thanks for your support
score: 0
has comment: http://stackoverflow.com/comment/39138042
linked to: http://stackoverflow.com/q/9353798
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25142894

http://stackoverflow.com/a/25204241
accepted answer of: http://stackoverflow.com/q/25203596
type: Answer
answers question: http://stackoverflow.com/q/25203596
upvote count: 3
has body: In fact you can define extraParams on the store proxy. You can do this just before the load method call : Ext.apply(store.getProxy().extraParams, { 'yourId': yourId }); or in your proxy config : proxy: { type: 'ajax', url: '/getImages', reader: { type: 'json', root: 'images', totalProperty: 'total' } extraParams: { 'yourId': yourId } }
has comment: http://stackoverflow.com/comment/39252374
score: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25201036
has comment: http://stackoverflow.com/comment/39369906
score: 0
type: AcceptedAnswer
type: Answer
has body: Do you want to graph percent versus trend or percent versus time? Right now your dimension is on trend, so it will not be possible to order it by date. Crossfilter will create a bin for each trend value (which may have many dates), and the way you have written your reduce function, it will simply replace the date entry for the bin, with the last date it sees. If you want to order by date and then use trend to affect some other aesthetic (color for example), you should use a date dimension, group by some quantization of the date, not do anything with the date in your reduce, and use date scale/xUnits.
answers question: http://stackoverflow.com/q/25187515
has comment: http://stackoverflow.com/comment/39370978
accepted answer of: http://stackoverflow.com/q/25187515

http://stackoverflow.com/q/25173928
type: Question
has comment: http://stackoverflow.com/comment/39196508
answer count: 2
possible better answer: http://stackoverflow.com/a/25174672
has title: Get the first row from Jquery Ajax call
has comment: http://stackoverflow.com/comment/39197264
accepted answer: http://stackoverflow.com/a/27542576
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has body: I have jquery Ajax call: $.ajax({ type: "POST", url: "http://192.168.0.70:81/MobileService.asmx/FetchData", contentType: "application/json; charset=utf-8", dataType: "json", async: true, cache: false, success: function (msg) { var Tabels = msg.d; $.each(Tabels, function(index, table) { alert(table[0]);-------&gt; I am trying to get the row using index, it retuns nothing var table_data='&lt;div class="table"'; table_data +=" onclick='test()' &gt;"+table.Name +"&lt;/div&gt;"; $('#itemGroup').append(table_data); }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert('error'); alert(errorThrown); } }); I want to find the first value of the result. How can I do that? index returns the row number(ie. index of the row), but how can I get the first row value?
has comment: http://stackoverflow.com/comment/59212375
has comment: http://stackoverflow.com/comment/39196469
has answer: http://stackoverflow.com/a/27542576
has comment: http://stackoverflow.com/comment/39197196
has comment: http://stackoverflow.com/comment/39196763
has comment: http://stackoverflow.com/comment/39196346
has comment: http://stackoverflow.com/comment/59212421
has comment: http://stackoverflow.com/comment/39196337
upvote count: 0
has comment: http://stackoverflow.com/comment/59211805
tagged with: cordova
has answer: http://stackoverflow.com/a/25174672
has comment: http://stackoverflow.com/comment/39196516
has comment: http://stackoverflow.com/comment/39196547
has comment: http://stackoverflow.com/comment/39197237
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39196506
score: -1

vb6
type: Tag
tag name: vb6
tags question: http://stackoverflow.com/q/25126455

http://stackoverflow.com/comment/39091004
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25111627
score: 0
has text: It doesn't work out of the box, but there is a workaround for 1.2.x. If you are going to use 1.2.21, I could provide you a workaround.

http://stackoverflow.com/comment/39317432
type: Comment
comment on: http://stackoverflow.com/a/25207562
type: AnswerComment
has text: Thanks. What is passed in as `val`? How do I call ApplicationID observable from the view?
score: 0

http://stackoverflow.com/a/25151132
has comment: http://stackoverflow.com/comment/39182074
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39180892
has comment: http://stackoverflow.com/comment/39180519
has comment: http://stackoverflow.com/comment/39182367
answers question: http://stackoverflow.com/q/25150500
downvote count: 0
has body: The NaN is because there's a trailing '%' on the Ratio field. You can remove it like: ratio: +d.Ratio.slice(0, -1) assuming that all of the Ratio fields have a trailing '%' character. In order to iterate through the rows you'd do something like: var max = -1; for (var i = 0; i &lt; rows.length; i++ ) { if (rows[i].Ratio &gt; max) { max = rows[i].Ratio; } } EDIT: changed the name of the variable to rows to reflect a name that should be defined in the callback function.
type: Answer

http://stackoverflow.com/comment/39173320
type: QuestionComment
type: Comment
has text: same problem with checkboxes. Not working either
comment on: http://stackoverflow.com/q/25161698
score: 0

http://stackoverflow.com/q/25166543
has comment: http://stackoverflow.com/comment/39182377
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25166627
favorite count: 0
has answer: http://stackoverflow.com/a/25166627
has comment: http://stackoverflow.com/comment/39182533
type: Question
has comment: http://stackoverflow.com/comment/39182373
has comment: http://stackoverflow.com/comment/39182507
has answer: http://stackoverflow.com/a/25166847
has answer: http://stackoverflow.com/a/25166738
score: 0
answer count: 3
upvote count: 1
downvote count: 1
tagged with: javascript
has body: I'm making a JavaScript program (for recreational use) that asks a user multiple questions. One of the questions it asks is "Do you like the color red (yes/no)?" It pops up in prompt box, but I want the user to answer yes or no only. If the user answers something besides yes or no I want a prompt box to popup and say "Invalid answer. Please enter yes or no only." I want to have that message keep popping up over and over until the user answers yes or no. If the user enters yes I want an alert box to pop up and say "My favorite color is red too!" If the user inputs no display alert box "okay". Sorry this is such a lengthy question, but I've tried everything I know to no anvil. Help would be much appreciated. Code: (near to what I want it to do) var qtwo = prompt(" Do you like the color red (Yes/No) " + name); switch(qtwo){ case "yes": alert("I like the color red too!"); break; case "no": alert("Okay."); break; default: prompt("Invalid answer! Please type only yes or no."); if(qtwo=="yes"){ alert("I like the color red too!."); } if(qtwo=="no"){ alert("Okay"); } } Should I have some sort of while/for loop in there to keep repeating the code until the goal is met which is a yes or no?
has title: How to run a program until certain answer is given by user (string + #)
accepted answer: http://stackoverflow.com/a/25166738

http://stackoverflow.com/comment/39056571
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25098860
has text: The code works when re-using the same port every time, another indication that there aren't multiple servers running. I think scoping is the issue. I think somehow the original config is being closured into the callback passed to http.createServer, and it just won't change for some reason.

http://stackoverflow.com/q/25207729
score: -1
has answer: http://stackoverflow.com/a/25207808
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25207893
has title: How to dynamically create a table?
tagged with: javascript
upvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/39258958
favorite count: 0
answer count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39258982
has answer: http://stackoverflow.com/a/25207793
has body: At first I am using a Date Picker. From that Date Picker, I am getting a Date value. Then, from a Url I am getting another JSON Value. This is working fine. Once I have these values, I want to show them in a table format. So far, I am not able to show my data in the Table format. $(document).ready(function(){ $('#datepicker').datepicker({ dateFormat: 'dd/mm/yy', onSelect: function() { var d = $('#datepicker').datepicker({ dateFormat: 'dd/mm/yy' }).val(); //alert("date!!!!" + date); $(".current" ).empty(); $(".current" ).append(" "); $(".current" ).append(" "); $(".current" ).append(" Time "); $(".current").append(" "); $(".current").append(" EventName "); $(".current").append(" "); $(".current").append(" EventDescription "); $(".current").append(" "); $(".current").append(" Image "); $(".current" ).append(" "); $.getJSON('http://xx:80/xxx/xxx/xx/xx/SampleWork_SA/?xx=xx&source=xx&cmpntname=x', function (data) { $.each(data, function(key, val) { if (d === val.Date) { var row = $(" " + val.Time +" " + " "+" " + val.EventName +" " + " "+" " + val.EventDescription +" " + ' ' +" "); $(".current").append(" "); $(".current").append(row); } }); }); } }); });

http://stackoverflow.com/comment/39144228
has text: So what does the request get redirected to with the `302` response?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25145220

http://stackoverflow.com/comment/39071351
type: AnswerComment
has text: Nope. Still just one object that will be rendered. If anything, is one matrix transform that will be computed. But unless you have 5000 objects doing this, it should be pretty performant.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25089609

http://stackoverflow.com/a/25112337
answers question: http://stackoverflow.com/q/25112259
type: AcceptedAnswer
downvote count: 0
has body: Your string concatenation is wrong, and it's breaking your javascript. Try this: echo ' ';
type: Answer
score: 3
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25112259

http://stackoverflow.com/comment/39246547
type: Comment
has text: Can you open console on Chrome when on your GWT page with this script injected and type infoString and press enter. Can you share that output here.
type: AnswerComment
comment on: http://stackoverflow.com/a/25198326
score: 0

http://stackoverflow.com/comment/39026444
type: AnswerComment
score: 0
has text: i tried the following $("input[data-autocomplete-source]").each(function (data) { var target = $(this); target.autocomplete({ source: target.attr("data-autocomplete-source"), minLength: 1, delay: 1000 }).autocomplete('instance')._renderItem = function (ul, item) { return $(' ').append( '' + item.label + ' ' + item.name + ' ' + item.label + '').appendTo(ul); }; });. but only the tag si being displyed
type: Comment
comment on: http://stackoverflow.com/a/25079840

http://stackoverflow.com/comment/39221304
has text: Why would you not simply condense them both into a single form?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25187767
score: 3

http://stackoverflow.com/q/25105166
tagged with: segment-io
tagged with: cors
upvote count: 9
has body: I'm encountering a cross origin resource sharing (CORS) error when I try to load a webpage with the sample "getting started" javascript code from the segment.io website. Below is the html itself. I haven't set any headers on my play 2.1.3 server that's vending this page, but I assume that's not necessary because other users have assured me they have run this with no problems.: &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i&lt;window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.io/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9", window.analytics.load("**my_key_here**"); window.analytics.page(); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; When I load this page with my browser, I see the following errors on the javascript console: [Error] Failed to load resource: Origin http://localhost:9000 is not allowed by Access-Control-Allow-Origin. (p, line 0) [Error] XMLHttpRequest cannot load http://api.segment.io/v1/p. Origin http://localhost:9000 is not allowed by Access-Control-Allow-Origin. (localhost, line 0) Any ideas? Even on the segment.io site, there's no mention that CORS should be an issue just to publish events with the java…
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/29213985
tagged with: xmlhttprequest
favorite count: 0
type: Question
score: 9
has title: segment.io javascript publish fails with a CORS error
answer count: 1

http://stackoverflow.com/comment/39054520
has text: Still not working for me, but I think you're almost there. Honestly, I find this method of rendering any element in canvas really easy, so, for converting any element to svg, I need inline styles. This is what I'm talking about: https://developer.mozilla.org/en-US/docs/Web/HTML/Canvas/Drawing_DOM_objects_into_a_canvas
score: 1
comment on: http://stackoverflow.com/a/25097808
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39146071
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25146915
has text: replace 'text-add' with '#text-add'

facebook
tags question: http://stackoverflow.com/q/25097177
tags question: http://stackoverflow.com/q/25162901
tags question: http://stackoverflow.com/q/25217831
tags question: http://stackoverflow.com/q/25173449
tags question: http://stackoverflow.com/q/25228898
tags question: http://stackoverflow.com/q/25209895
type: Tag
tags question: http://stackoverflow.com/q/25161421
tags question: http://stackoverflow.com/q/25089606
tags question: http://stackoverflow.com/q/25217344
tags question: http://stackoverflow.com/q/25164787
tags question: http://stackoverflow.com/q/25218912
tags question: http://stackoverflow.com/q/25086317
tags question: http://stackoverflow.com/q/25143387
tags question: http://stackoverflow.com/q/25110223
tags question: http://stackoverflow.com/q/25210079
tags question: http://stackoverflow.com/q/25121139
tag name: facebook
tags question: http://stackoverflow.com/q/25088265
tags question: http://stackoverflow.com/q/25104173
tags question: http://stackoverflow.com/q/25205456
tags question: http://stackoverflow.com/q/25226907
tags question: http://stackoverflow.com/q/25141954
tags question: http://stackoverflow.com/q/25116137
tags question: http://stackoverflow.com/q/25092358
tags question: http://stackoverflow.com/q/25175405
tags question: http://stackoverflow.com/q/25087941
tags question: http://stackoverflow.com/q/25157589
tags question: http://stackoverflow.com/q/25194397
tags question: http://stackoverflow.com/q/25222292
tags question: http://stackoverflow.com/q/25196841
tags question: http://stackoverflow.com/q/25118911
tags question: http://stackoverflow.com/q/25210324
tags question: http://stackoverflow.com/q/25113130
tags question: http://stackoverflow.com/q/25212768

http://stackoverflow.com/comment/39210587
has text: What do you mean? the form id is form id="parsley" the rendered is Template.createQuiz.rendered = function () { $("#parsley").parsley(); }; Both are parsley right or am I missing something really obious
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25179453

http://stackoverflow.com/comment/39128131
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25137455
has text: what you are getting in console
score: 0

http://stackoverflow.com/a/25169681
has comment: http://stackoverflow.com/comment/39224005
accepted answer of: http://stackoverflow.com/q/25169117
has body: You should use the jQM page events instead of the body onload to ensure jQM has enhanced the collapsibleset before your code runs: $(document).on("pagecreate", "#page1", function(){ $("#dssMenu").collapsible({collapsed: false}); }); As the collapsibleset ensures that only one collapsible is expanded at a time, you do not need to collapse the first one, just expand the desired one. Of course, change "#page1" to the ID of your actual page.
score: 0
answers question: http://stackoverflow.com/q/25169117
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39225440
has comment: http://stackoverflow.com/comment/39223714

http://stackoverflow.com/q/25203088
has body: So I have this dropdown box, I would like to close it when clicking outside of it, how can I get it? $(document).ready(function(){ jQuery('ul.nav li.dropdown').click(function() { jQuery(this).find('.dropdown-menu').fadeIn(); $("#actionStatus").html(""); }); $("body:not(ul.nav li.dropdown)").hover(function(){ $("ul.nav li.dropdown").find('.dropdown-menu').fadeOut(); }); $("#btnSendOption").click(function(){ var data = $("#frmUserOption").serialize(); $.ajax({ url: "/users.php", data: data, success: function( data ) { $("#actionStatus").html(""); $("input[type='radio']").attr('checked', false); $('.dropdown-menu').delay(1000).fadeOut(); }, error: function(data) { $("#actionStatus").html(" Error, try again later "); } }); }); }); Any help is very appreciated. Thank you in advance.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25203196
accepted answer: http://stackoverflow.com/a/25203215
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25203215
has comment: http://stackoverflow.com/comment/39249603
score: 0
answer count: 3
has title: How to close dropdown box with Jquery when clicking outside
possible better answer: http://stackoverflow.com/a/25203196
has answer: http://stackoverflow.com/a/25204267
has comment: http://stackoverflow.com/comment/39249721

http://stackoverflow.com/comment/39277076
type: Comment
comment on: http://stackoverflow.com/a/25151553
type: AnswerComment
has text: Thanks! but I really don't use any of those files anywhere in my code :( and my code works just fine if I replace that jquery portion with something else.. This is the weirdest bug I've ever encountered..
score: 0

http://stackoverflow.com/q/25132555
has comment: http://stackoverflow.com/comment/39119038
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25132738
has comment: http://stackoverflow.com/comment/39118997
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has title: How to tell which picture was clicked
has answer: http://stackoverflow.com/a/25132637
accepted answer: http://stackoverflow.com/a/25132637
has comment: http://stackoverflow.com/comment/39119141
has answer: http://stackoverflow.com/a/25132738
has answer: http://stackoverflow.com/a/25132774
has body: var pic3 = document.createElement("IMG"); pic3.setAttribute("src", "img/mutantpre.jpg"); pic3.setAttribute("onclick", "display()"); pic3.setAttribute("id", "mutantpre"); pic3.setAttribute("height", "250px"); pic3.setAttribute("width", "150px"); document.getElementById("product4").appendChild(pic3); Im trying to create a function to set all pictures to hidden when this one is clicked. However from that function I dont know which one was clicked. How do i figure out which one they clicked get the id of it so i can set the visibility of the other ones.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39118989
has answer: http://stackoverflow.com/a/25132811
type: Question

http://stackoverflow.com/a/25125392
score: 0
type: AcceptedAnswer
has body: I think that you're making this too complicated. Use the same event handler for both a#triggerMobileMenu and ul#mobileMenu li a since you're having them do the same thing (toggle the visibility of the menu and another element). $('a#triggerMobileMenu, ul#mobileMenu li a').on('click', function(evt){ evt.preventDefault(); $('#mobileMenu').toggleClass('menu_hide menu_show'); $('#mobileScreen').toggleClass('lockscreen_off lockscreen_on'); }); If you need to know which element was clicked in the event handler, evt.target is available: if( $(evt.target).is($('a#triggerMobileMenu')) ) { // do stuff } See http://jsfiddle.net/Mph6t/3/
has comment: http://stackoverflow.com/comment/39106683
type: Answer
accepted answer of: http://stackoverflow.com/q/25124476
answers question: http://stackoverflow.com/q/25124476

http://stackoverflow.com/q/25188452
has body: I'm using Java 8. I'm not a java expert (haven't looked at java since college 10 years ago) I create an instance of a ScriptEngine (Nashorn if it matters). I use it to eval several javascript files. The script chugs along quite happily in its own little javascript world. I love it. I also have a File System WatchService running, in case some of my java scripts get modified. When they get modified, I create a new ScriptEngine, and eval the new versions of the javascript files using the new ScriptEngine object. My problem is, I cant "kill" the old scriptEngine once I create the new one. The old script keeps on running indefinitely. I really want to free up the resources being used by the old scriptEngine object. AND I want it to stop doing the stuff its doing (since it could conflict with the new instance if they both try doing the same things). So ... How do I completely eliminate the old ScriptEngine, including any threads spawned inside of it?
tagged with: scriptengine
type: Question
tagged with: nashorn
score: 5
has answer: http://stackoverflow.com/a/25188587
tagged with: javascript
has comment: http://stackoverflow.com/comment/73321515
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/66617030
upvote count: 5
has comment: http://stackoverflow.com/comment/73321469
type: UnansweredQuestion
has title: How do I destroy a Java ScriptEngine Instance?
has comment: http://stackoverflow.com/comment/39473596
downvote count: 0
tagged with: java

http://stackoverflow.com/q/25114200
tagged with: javascript
favorite count: 0
has title: chrome extension - login in popup.html using django backend
linked to: http://stackoverflow.com/q/12783217
tagged with: google-chrome-extension
answer count: 1
has answer: http://stackoverflow.com/a/25125933
tagged with: google-chrome
downvote count: 1
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25125933
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/39105932
has body: I am trying to accomplish this login process. In the extension, there is popup.html, popup.js, background.js and content.js as usual. In popup.html, there are username and password inputfields and login button. My vision is: I will catch both inputs in popup.js and send them to background.js and from there, i will send them to django backend. django backend returns logged-in token. firstly, is this possible way? my first step is not working: i cannot send message from popup.js to background.js. no error in console, also no success. this is my code: popup.js handleLoginClick_: function(){ var email = this.email.value; var pwd = this.pwd.value; chrome.tabs.sendMessage(tab.id, {asking: "login"}, function(response) { sendToDjango(response.answer); }); } background.js chrome.extension.onMessage.addListener(function(request, sender, sendResponse) { if (request.asking === "login"){ console.log('got msg from popup.js'); return; } }); what am I doing wrong? this is the manifest.json: { "name" : "myBIZMark", "version" : "1.1", "description" : "collect competing company's keywords", "permissions": [ "tabs", "contextMenus", "&lt;all_urls&gt;", "storage" ], "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "background": { "persistent": false, "scripts": ["jquery111.js","background.js"] }, "manifest_version": 2, "content_scripts": [ { "matches": ["&lt;all_urls&gt;"], "js": ["jquery111.js", "contentscript.js","popup.js"] } ] }

http://stackoverflow.com/a/25196512
score: 4
type: Answer
has body: Took some time to set up a fiddle and figure it out, but this is how you'd get the latitude and longitude directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); var position = response.routes[0].legs[0].start_location; var lat = position.k; var lng = position.B; searchLocationsNear(lat, lng); } }); FIDDLE
accepted answer of: http://stackoverflow.com/q/25196317
upvote count: 4
answers question: http://stackoverflow.com/q/25196317
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25111612
has comment: http://stackoverflow.com/comment/39080815
tagged with: javascript
tagged with: jquery
tagged with: ejs
has body: I would like to seek help on undefined errors which I been trying to solve but no luck for 2 weeks already. I'm trying to create a button with On/Off function. If the users click On button, it will light up my LED and also store to mySQL database of what time that users click on it. Hope you guys could help me out with it as soon as possible, thanks in advance, guys. This is my app.js: var express = require('express'); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var index = require('./routes/index'); var pin = require('./routes/pin'); var app = express(); // View engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); app.set('port', process.env.PORT || 3000); app.use(favicon()); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded()); app.use(cookieParser()); app.use(express.static(path.join(__dirname, 'public'))); app.use('', index); app.use('/pin', pin); // 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; var server = app.listen(app.get('port'), function() { console.log('Listening on port %d', server.address().port); }); This is my index.js: var express = require('express'); var router = express.Router(); var mysql = require('mysql'); var gpio = require('pi-gpio'); var conn = { host: 'localhost', user: 'user', pa…
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25129210
has comment: http://stackoverflow.com/comment/39081812
type: UnansweredQuestion
tagged with: node.js
has title: Undefined errors in node.js
downvote count: 0
score: 1
tagged with: mysql
type: Question

http://stackoverflow.com/a/25181465
has body: Just try with following regex: (\d+)(?:(?: ?x ?)| )(\d+) demo
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25181350

http://stackoverflow.com/q/25124627
has body: Hopefully I can explain this :) If I attach an event listener via a template: &lt;some-node on-event='{{ eventHandler }}'&gt; I get a function signature of: function eventHandler( ev, data, node ){ However, if I attach it via JS: this.$.someNode.addEventListener( 'event', this.eventHandler.bind( this ) ); I don't receive data or node, only the event: function eventHandler( ev ); I realize that this data is available via ev.detail and ev.path, but it's annoying to have to constantly keep track of how I attached an event in order to determine the data I'm receiving. Is there a way to attach an event, in Polymer, that will natively unwrap the event object into the ev, data, node signature?
has title: How do I get a "template event" through a JS-event in Google Polymer?
tagged with: polymer
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: web-component
type: UnansweredQuestion
score: 3
answer count: 0
upvote count: 3
type: Question

http://stackoverflow.com/q/25183060
downvote count: 1
has body: The hash variable and the mycookie variable are the same but I don't get the message. What am I missing here? var hash= "f353fbe0acb344e5cc6240daef41de27"; if (hash == &lt;?php echo $_COOKIE[mycookie]; ?&gt;) var text = "the same"; document.write(text);
score: -1
type: Question
answer count: 2
upvote count: 0
has answer: http://stackoverflow.com/a/25183095
tagged with: javascript
has title: String comparison isn't working
favorite count: 0
has answer: http://stackoverflow.com/a/25183100
type: UnansweredQuestion

http://stackoverflow.com/q/25084780
possible better answer: http://stackoverflow.com/a/25084897
tagged with: javascript
has comment: http://stackoverflow.com/comment/39032060
score: 0
answer count: 2
has body: I want to make the currently active li element get some proper styling on click , and remove it when the other li's element are clicked, I am relying on this to do it : $('li').click(function() { $(this).siblings().removeClass('current'); $(this).addClass('current'); }); as you can see the code works when on jsFiddle, example on JsFiddle, except that it does not work for me, and I doubt that this is something has to do with Turbolinks and Jquery-turbolinks? , or is it just some css problem? CSS file goes in this order: .current /*I tried sidebar ul li.current but none happened.*/ .sidebar ul li .sidebar ul li:hover .sidebar ul li:active .sidebar ul li a a a:hover Update #1 : Solutions I tried. $('li').click(function() { $(this).siblings().removeClass('current'); $(document).on('page:load',function(){ $('li').addClass('current'); }); }); Not the best code in the world, this looks so wrong, however it was just a random try in vain. This has made the changes to the whole li's (obviously), after the page has loaded, that's a half solution ,except that I don't know how to get the clicked li. Update#2 : Html code structure Toggle navigation Brand <%= bootstrap_flash %> <%= yield %> I am targeting the second li's that are in the sidebar div.
has comment: http://stackoverflow.com/comment/39030043
has comment: http://stackoverflow.com/comment/39030524
has comment: http://stackoverflow.com/comment/39030247
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39030217
has title: Remove class if other element is clicked?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39030597
has answer: http://stackoverflow.com/a/25085498
tagged with: css
has comment: http://stackoverflow.com/comment/39030521
has comment: http://stackoverflow.com/comment/39029996
has comment: http://stackoverflow.com/comment/39030477
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39030230
accepted answer: http://stackoverflow.com/a/25085498
upvote count: 1
has answer: http://stackoverflow.com/a/25084897
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39030699
has comment: http://stackoverflow.com/comment/39031964

http://stackoverflow.com/a/25208355
has body: I don't see a way to do this without either using multiple series, or writing your own complex rendering script. Another alternative for using 2 series that works a little different than the one proposed by Sebastian: 1) User the alternateGridColor 2) set the fillColor of your series with an appropriate opacity for the alternate grid color to have the desired effect 3) use a 2nd series, which can be automatically created, to stack on top of the main data series, filled with white to cover the alternating color in the 'open' space. Example: http://jsfiddle.net/jlbriggs/mg4vs1dm/ Honestly, I would personally simply opt to use the alternateGridColor option as is, however.
answers question: http://stackoverflow.com/q/25201188
accepted answer of: http://stackoverflow.com/q/25201188
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/39291492
type: AnswerComment
has text: Good call. I also saw your solution and I realized I needed to add `e.preventDefault` to mine.
type: Comment
comment on: http://stackoverflow.com/a/25225230
score: 0

http://stackoverflow.com/q/25083083
accepted answer: http://stackoverflow.com/a/25085112
has answer: http://stackoverflow.com/a/25098078
has comment: http://stackoverflow.com/comment/39029202
tagged with: javascript
has body: I know the click action can be triggered by assigning ontap a specific function like so: { kind: "moon.Button",name :"search_button", content : "Search" , ontap : "searchAction", classes: "menu-button-style" } . . . searchAction : function(){ //do some stuff on click} I've tried $('#id_of_my_button').click(); $('#id_of_my_button').trigger('click'); and none of those seem to work. simplified jsFiddle Any ideas
answer count: 3
possible better answer: http://stackoverflow.com/a/25098078
downvote count: 0
has comment: http://stackoverflow.com/comment/39028554
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39028635
has comment: http://stackoverflow.com/comment/39026973
has answer: http://stackoverflow.com/a/25085112
tagged with: enyo
has answer: http://stackoverflow.com/a/25084338
score: 1
has title: Trigger a button click on a moon.Button or moon.IconButton with jQuery/Javascript directly
upvote count: 1
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/39245253
type: AnswerComment
type: Comment
score: 1
has text: What is the difference between `$(document).ready(function() {` and the function `addLoadEvent`? And `document.getElementsByTagName` returns a nodeList.
comment on: http://stackoverflow.com/a/25200563

http://stackoverflow.com/a/25183714
has comment: http://stackoverflow.com/comment/47359711
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47358403
type: Answer
upvote count: 2
score: 2
accepted answer of: http://stackoverflow.com/q/25180288
has body: You can add/insert new items to the dataSource that the multiselect uses and thus they will become part of the collection as the other initial items. e.g. var ms = $("#select").data('kendoMultiSelect'); ms.dataSource.insert(0,{text:"some text",value:"333"}) http://jsbin.com/uWEvulEn/2/edit
answers question: http://stackoverflow.com/q/25180288

http://stackoverflow.com/a/25081300
accepted answer of: http://stackoverflow.com/q/25080384
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: After some time I ended up creating a Node application run configuration and simply added in the arguments tab -> Node arguments the path of nodemon.js In my case : C:\Users\syd\AppData\Roaming\npm\node_modules\nodemon\bin\nodemon.js Now I'm able to get console feed as well stop the node server from eclipse and auto restart on file changes :)
has comment: http://stackoverflow.com/comment/97297709
upvote count: 2
answers question: http://stackoverflow.com/q/25080384
score: 2

variables
tag name: variables
tags question: http://stackoverflow.com/q/25221033
tags question: http://stackoverflow.com/q/25140815
tags question: http://stackoverflow.com/q/25127247
tags question: http://stackoverflow.com/q/25191716
type: Tag
tags question: http://stackoverflow.com/q/25205947
tags question: http://stackoverflow.com/q/25127615
tags question: http://stackoverflow.com/q/25112013
tags question: http://stackoverflow.com/q/25137959
tags question: http://stackoverflow.com/q/25110537
tags question: http://stackoverflow.com/q/25199439
tags question: http://stackoverflow.com/q/25212561
tags question: http://stackoverflow.com/q/25128129
tags question: http://stackoverflow.com/q/25126092

http://stackoverflow.com/comment/39106506
comment on: http://stackoverflow.com/a/25101567
has text: Javascript's `confirm` halts the browser until user acts. That's why it is able to be treated synchronously. Bootstrap's dialogue is not designed to operate that way. User will still be able to click on other parts of page when dialog appears, for instance, which he can't do with native confirm dialogue. The question is what do you want to happen when the user hits continue and confirms intent. Redirect to another page? Submit a form? That's what you put in `letUserExit` (or in Continue button callback directly).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39123488
has text: try to put your javascript inside a $(document).ready(function(){})
comment on: http://stackoverflow.com/a/25134376
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/a/25079820
answers question: http://stackoverflow.com/q/25079773
score: 1
has comment: http://stackoverflow.com/comment/39022498
upvote count: 1
has body: instead of this var devang = document.getElementById('devang').getElementsByTagName('li');
has comment: http://stackoverflow.com/comment/39022665
downvote count: 0
has comment: http://stackoverflow.com/comment/39022419
type: Answer

http://stackoverflow.com/comment/39107405
type: QuestionComment
type: Comment
has text: Do you want a count of the repeats, or an array that contains only unique items?
comment on: http://stackoverflow.com/q/25126054
score: 0

http://stackoverflow.com/a/25175634
has comment: http://stackoverflow.com/comment/39199351
type: Answer
has comment: http://stackoverflow.com/comment/39198933
has comment: http://stackoverflow.com/comment/39198973
has comment: http://stackoverflow.com/comment/39199318
answers question: http://stackoverflow.com/q/25175413
has body: I assume thread.comments.data is array / collection of string.. If you do something like this : var stringArr = ["This is string 1", "Hello, I am string 2", "Hola, I can say, I am string 3.,....", "Namaste, India"] var count = 0; for(i=0; i&lt; stringArr.length ; i++) { count += stringArr[i].length; } console.log("Total Count is - " + count); You should get the total count.. As per your API response, I have edited the demo. Problem was in some objects "messages" property wasn't defined. Demoed here : http://jsfiddle.net/rahulrulez/cs2xdsbp/
score: 0

http://stackoverflow.com/q/25133159
has comment: http://stackoverflow.com/comment/39120079
has comment: http://stackoverflow.com/comment/39120208
answer count: 3
has comment: http://stackoverflow.com/comment/39120139
has comment: http://stackoverflow.com/comment/39120122
accepted answer: http://stackoverflow.com/a/25133249
has body: I am trying to compare two strings and executing some expression based on the result. Below are the two sample expressions that I have written to compare two strings that doesn't match. String1 !== String2 !(String1 === String2) Which one is recommended from the above two in performance wise?
upvote count: 1
has comment: http://stackoverflow.com/comment/39120129
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25133214
has title: Logical ! (NOT) operator Difference in JavaScript
type: Question
score: 0
has answer: http://stackoverflow.com/a/25133249
possible better answer: http://stackoverflow.com/a/25133278
has comment: http://stackoverflow.com/comment/39120099
tagged with: javascript
has answer: http://stackoverflow.com/a/25133278
favorite count: 0
tagged with: operators

http://stackoverflow.com/a/25196939
accepted answer of: http://stackoverflow.com/q/25196441
has body: Heres the answer el.video.addEventListener("loadedmetadata", function(){ el.video.play(); }, false);
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25196441

http://stackoverflow.com/a/25227106
has comment: http://stackoverflow.com/comment/39294941
answers question: http://stackoverflow.com/q/25227032
has body: Your code doesn't work for me until I change: This mistake is apparent if you use a text editor with syntax checking or syntax highlighting.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39295078

http://stackoverflow.com/comment/39248516
comment on: http://stackoverflow.com/q/25202380
type: QuestionComment
has text: Have you tried to click on "Continue" instead of terminate it? Sometimes JS takes so much time to complete a task that the browser thinks it is blocked (or in an infinite loop) and prompts you to stop it
type: Comment
score: 2

http://stackoverflow.com/q/25208348
has answer: http://stackoverflow.com/a/25256198
upvote count: 2
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39299491
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39266418
has body: I have a simple DC.js bar chart. I have it set up so you can click on an element and it gets filtered. This is standard behavior. It remains lit up, and the others go dark. You can then select other elements and have them added to the filter. I'm looking for a way to replicate that functionality without clicking on the element. So like, i click a link outside the chart and the chart acts like I just clicked on some element. Has anyone seen this done before? Thanks, Edit: The reason I'm trying to do this is for accessibility. There's no way for keyboard users to interact as far as I can tell.
tagged with: dc.js
linked to: http://stackoverflow.com/q/9063383
tagged with: crossfilter
answer count: 1
has title: Filter a DC.js table with a link?
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/a/25096082
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25095658
has comment: http://stackoverflow.com/comment/39051086
type: Answer
accepted answer of: http://stackoverflow.com/q/25095658
upvote count: 1
score: 1
has body: It appears that your .elements are position relative. Since I don't see any css for that I'm assuming it's jquery that's making this adjustment. Position relative is not getting reset after you drop the item. Manually turning it off in a debug console resolves your problem. That's what's causing the problem. Consider resetting this attribute on drop.

http://stackoverflow.com/a/25126063
type: Answer
has comment: http://stackoverflow.com/comment/39107423
has comment: http://stackoverflow.com/comment/39107183
answers question: http://stackoverflow.com/q/25125992
has body: The showHide() can receive a parameter with the div id. function showHide(my_id) { var ele = document.getElementById("showHideDiv" + my_div); if(ele.style.display == "block") { ele.style.display = "none"; } else { ele.style.display = "block"; } } What lacks in this code is to hide all the other divs.
has comment: http://stackoverflow.com/comment/39107376
score: 0

http://stackoverflow.com/a/37425258
answers question: http://stackoverflow.com/q/25094387
score: 3
upvote count: 3
type: Answer
has body: In my case, var event = new CustomEvent('change'); did not work. I had to initialize the event like this: var evt = document.createEvent("HTMLEvents"); evt.initEvent("keyup", true, true); First arg 'bubbles' should be true so the event should bubble up through the event chain. event.initEvent(type, bubbles, cancelable); Source: https://developer.mozilla.org/en-US/docs/Web/API/Event/initEvent
downvote count: 0

http://stackoverflow.com/q/25170534
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has title: Iterating through Object nested within another Object with HtmlService in Google Apps Script
tagged with: object
has answer: http://stackoverflow.com/a/25171654
type: Question
tagged with: google-apps-script
has body: Please Help, I have created an object in a googleScript file which I have then have passed via a withSuccessHandler to an HTML file where I am then trying to iterate through the values in an object nested within the main object. We'll call it object_A, and it is defined below. object_A = { id=[axObsNum, axObAspect, axObElevation, axObLocation, axObCoordinates, axObDate, axObTrigger, axObType, axObSize, axObSlopeAngle, axObNotes], parsed=[{3=[,,,,,2014-08-06,,,,,],2=[,,,,,2014-08-06,,,,,],1=[,,,,,2014-08-06,,,,,]}], ob=[{"1":"","2":"","3":""}, {"1":"","2":"","3":""}, {"1":"","2":"","3":"","4":"","5":""}, {"1":"","2":"","3":""}, {"1":"","2":"","3":""}, {"1":"2014-08-06","2":"2014-08-06","3":"2014-08-06"}, {"1":"","2":"","3":""}, {"1":"","2":"","3":""}, {"1":"","2":"","3":""}, {"1":"","2":"","3":""}, {"1":"","2":"","3":""}], key=[1, 2, 3, 4, 5], header=[Ax Obs Num, Ax Ob Aspect, Ax Ob Elevation, Ax Ob Location, Ax Ob Coordinates, Ax Ob Date, Ax Ob Trigger, Ax Ob Type, Ax Ob Size, Ax Ob Slope Angle, Ax Ob Notes] } Specifically I want the parsed values of object_A. In the googleScript file I can easily get these be declaring object_A.parsed[0][2]. I know parsed is an array, so [0] gives me the first, and only, value in that array and then with the [2] i get the values for that key-value. My question is, why doesn't this work in the html file where I've declared a simple function to handle the return from the the withSuccessHandler function. That simple code is as follows, and the result will be undefined. function withSuccess(obj){ console.log(obj.parsed[0][2]) } Why? Please Help. Thank you.

http://stackoverflow.com/comment/39155232
has text: This is from (khakiout) answer and modified with a click to next picture -- http://jsfiddle.net/3E5Q9/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25151339
score: 1

http://stackoverflow.com/q/25145105
possible better answer: http://stackoverflow.com/a/25145189
has answer: http://stackoverflow.com/a/25145189
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25145175
score: 0
answer count: 3
has title: Sending PHP Strings Variables to a Javascript String Variables
has comment: http://stackoverflow.com/comment/39142338
has body: Hi I am trying to send a long string of numbers from a file to Javascript. One I get it in Javascript as a string the rest will be easy. This is the PHP code that grabs the series of numbers. It does grab them properly because it prints it out perfectly if I instruct it to do so. $data = readfile($dataFile); This is the Javascript Code: var data = &lt;?php echo json_encode($data, JSON_NUMERIC_CHECK); ?&gt;; When ever I run it the variable "data" is set to a random number. I assume it is the the number of characters in the sequence. I am relatively new to PHP and Javascript so a nice and clear explanation would be greatly appreciated. Thanks in advance.
has comment: http://stackoverflow.com/comment/39142375
has answer: http://stackoverflow.com/a/25145215
accepted answer: http://stackoverflow.com/a/25145215
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/q/25104902
has body: I'm currently developing a chat project.. I'm using a php framework and have managed to run it on node now the problem I'm currently experiencing is that the ajax query is not working it does not send a single data to my database.. the script that I used is perfectly working because I used this script when I was still using a long-polling of ajax for a chat app... It just didnt work now when I used it on the new chat app using node that I was developing... Here is my index.php &lt;?php startblock('script') ?&gt; &lt;script src="/socket.io/socket.io.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-1.11.1.js"&gt;&lt;/script&gt; &lt;script&gt; var socket = io(); $('form').submit(function(){ socket.emit('chat message', $('#m').val()); $('#m').val(''); return false; }); socket.on('chat message', function(msg){ var data2 = { text: msg }; $.ajax({ url: 'localhost:3000/includes/message/store_chat.php', dataType: 'json', type: 'POST', data: {json:JSON.stringify(data2)}, success: function (data2) { } }); }); &lt;/script&gt; &lt;script&gt; jQuery(function ($) { $(window).on("resize", function () { body = $("html,body"), menu = $("#side-menu").width(), gridW = body.width() - (menu + 30), gridH = body.height(); $("#message-app-wrapper").css("height", gridH); $("#views-wrapper").css("width", gridW); }).resize(); }); &lt;/script&gt; &lt;?php endblock(); ?&gt; And this is the database handler &lt;?php //Send some headers to keep the user's browser from caching the response. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); header("Cache-Control: no-cache, must-revalidate" ); header("Pragma: no-cache" ); header("Content-Type: text/plain; charset=utf-8"); $json2 = $_POST['json']; $data = json_decode($json2); $text = $data-&gt;text; $con = new PDO("mysql:host=localhost:3000;dbname=schat", "root" , ""); $con-&gt;setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $sql2 = "INSERT INTO chat_stora…
answer count: 1
has title: AJAX to PHP not sending data to database using NODEJS
tagged with: javascript
tagged with: jquery
tagged with: ajax
upvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25106139
has comment: http://stackoverflow.com/comment/39068470
tagged with: php
tagged with: node.js
has comment: http://stackoverflow.com/comment/39067681
has answer: http://stackoverflow.com/a/25106139
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39076903
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/comment/39191320
has text: I worked around and solved it. I deleted the additional applied-qtip.js and just added in the $(.standardsList).qtip() into the location were .standardsList was generated
score: 0
comment on: http://stackoverflow.com/q/25169936
type: Comment
type: QuestionComment

ms-office
tags question: http://stackoverflow.com/q/25200259
tag name: ms-office
type: Tag

http://stackoverflow.com/a/31320728
has body: Did you try to add in the header: &lt;head&gt; &lt;meta http-equiv="X-UA-Compatible" content="IE=8;"&gt; ... in order to force IE8 rendering even in IE9+ ?
answers question: http://stackoverflow.com/q/25140476
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/25094045
has comment: http://stackoverflow.com/comment/39047412
score: -1
has answer: http://stackoverflow.com/a/25518305
downvote count: 1
has comment: http://stackoverflow.com/comment/39047359
tagged with: less
answer count: 1
has title: Best approach to compress Less files and JS files
has body: It's not a poll, as I know it's not what stackoverflow is for it's more that I need a direction to handle my frontend elements. I'm creating websites that can be hosted on sharedhost or dedicated server (some are on Prestashop, other on Joomla, other with Laravel). So using something like Gulp or Grunt is hard (for the sharedhost part). I try to figure what is the best option to compress / minify / auto-prefix my less files and JS files. Do all of you use tools like Gulp (and how do you handle host that doesn't provide nodejs or commande line) or can it be done directly within an IDE like PHPStorm ? Thanks for your tips
has comment: http://stackoverflow.com/comment/39047559
has comment: http://stackoverflow.com/comment/39047323
tagged with: javascript
has comment: http://stackoverflow.com/comment/39047678
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/25518305
favorite count: 0
type: Question

http://stackoverflow.com/comment/39280347
type: QuestionComment
has text: I'm glad you sorted it out! Unfortunately I had two straight days of madness at work, so I wasn't able to check your fiddle. Sorry about that.
comment on: http://stackoverflow.com/q/25161128
score: 0
type: Comment

http://stackoverflow.com/q/25187767
has answer: http://stackoverflow.com/a/25187813
has comment: http://stackoverflow.com/comment/39221449
type: AnsweredQuestion
upvote count: 0
tagged with: http://stackoverflow.com/tag/xhtml
tagged with: javascript
has comment: http://stackoverflow.com/comment/39221304
has comment: http://stackoverflow.com/comment/39221689
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25187813
score: -2
has body: I have two XHTML forms (below). I am looking for a way to submit the two forms with one submit button. First Form Below &lt;form method= "post" action= "forum_add_111438076.xhtml" &gt; &lt;input type= "hidden" name="d_token" value="2ab5b36d7d0e5f9fee88cc9a67553db6" /&gt;First Name:&lt;br/&gt;&lt;input type="text" name="meno" maxlength="20"/&gt; &lt;br/&gt;Last Name:&lt;br/&gt;&lt;input type="text" name="text" maxlength="20000"/&gt; &lt;br/&gt;&lt;input type="submit" name="submit" value="Submit" /&gt;&lt;/form&gt; Second Form &lt;form method="post" action="forum_add_111438075.xhtml" &gt; &lt;input type="hidden" name="d_token" value="d0cb19bc6b0d162a11431213976206b8" /&gt; Phone Number:&lt;br/&gt;&lt;input type="text" name="meno" maxlength="20"/&gt; &lt;br/&gt;Address:&lt;br/&gt;&lt;input type="text" name="text" maxlength="20000"/&gt; &lt;br/&gt;&lt;input type="submit" name="submit" value="Submit" /&gt;&lt;/form&gt; Each form above has its own submit button, but I want to use only one submit button.
has comment: http://stackoverflow.com/comment/39221695
possible better answer: http://stackoverflow.com/a/25187833
has comment: http://stackoverflow.com/comment/39221257
has answer: http://stackoverflow.com/a/25187833
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/39222368
has answer: http://stackoverflow.com/a/25187838
has title: Submit two forms with one submit button

http://stackoverflow.com/comment/40679210
has text: You will need some sort of ability to "snap to roads", which isn't provided in the Mapbox API currently.
score: 0
comment on: http://stackoverflow.com/a/25210838
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25181100
answer count: 2
downvote count: 0
accepted answer: http://stackoverflow.com/a/25181166
has comment: http://stackoverflow.com/comment/39208475
favorite count: 0
possible better answer: http://stackoverflow.com/a/25181626
has answer: http://stackoverflow.com/a/25181626
has title: Bitwise test in JavaScript
type: AnsweredQuestion
has body: I hava a following bit string: var input = '11100001'; I want to check if eight bit is present, so I have tried with: input &amp; '10000000' but it gives me 8918528. How should I test it ?
score: 1
tagged with: bit-manipulation
upvote count: 1
tagged with: bitwise-operators
has answer: http://stackoverflow.com/a/25181166
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39208393

http://stackoverflow.com/q/25216021
has answer: http://stackoverflow.com/a/25216086
tagged with: bitwise-operators
has comment: http://stackoverflow.com/comment/39274616
type: Question
answer count: 1
tagged with: javascript
favorite count: 0
score: 0
accepted answer: http://stackoverflow.com/a/25216086
upvote count: 1
downvote count: 1
linked to: http://stackoverflow.com/q/2373791
type: AnsweredQuestion
has body: I noticed an odd behavior with Javascript: when I execute 1967779 &lt;&lt; 11 I get a negative result: -264955904 However, if I run that same line in a Python interpreter, I get the correct answer: 4030011392 Note that both Firefox's and Chrome's Javascript consoles returned the same negative number, so it must be an issue with Javascript itself and not the engine. Why am I getting different values between Python and Javascript? What can I do to work around this? How does the Javascript left shift operator work?
tagged with: bit-shift
has comment: http://stackoverflow.com/comment/39274611
has title: How does the Javascript left shift operator work?

http://stackoverflow.com/comment/39099677
has text: I've just tried it and it works only for sorting (rows reordering). I want to have access to the new data for reordering and hiding/showing columns.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25121852
type: AnswerComment

http://stackoverflow.com/q/25115861
has comment: http://stackoverflow.com/comment/39170807
downvote count: 1
has title: Dynamically toggling between rtl.jquery.mobile-1.4.0.js and jquery.mobile-1.4.2.min.js
has comment: http://stackoverflow.com/comment/39088336
has comment: http://stackoverflow.com/comment/39096402
type: Question
has comment: http://stackoverflow.com/comment/39088232
tagged with: jquery-mobile
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39119670
has comment: http://stackoverflow.com/comment/39124910
has body: I am working on an app which supports 2 languages(English and Arabic) using JQuery mobile. Hence I need to to dynamically toggle(adding and removing) between jquery.mobile-1.4.2.min.js and rtl.jquery.mobile-1.4.0.js. I have tried function loadjsfile(filename){ var fileref=document.createElement('script') fileref.setAttribute("type","text/javascript") fileref.setAttribute("src", filename) if (typeof fileref!="undefined") document.getElementsByTagName("head")[0].appendChild(fileref) } And similarly removing the js file. The app is navigating to the first screen(index.html). My assumption is that when either of the jquery.mobile-js is loaded, it initialises some values and when the js file is removed. Those variable values are lost hence navigating to first page. Please help if any one has faced and overcome this issue. Also I am open for any suggestions. Thanks in advance.
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1566595
score: 0
upvote count: 1

http://stackoverflow.com/a/25138411
has body: You can not make requests from the localhost to a remote domain via javscript environment, the error will be "cross browser" Recommend making an abstraction in order to pass the data for a webservice via java and not javascript.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25135354

http://stackoverflow.com/comment/39314660
comment on: http://stackoverflow.com/a/25223997
has text: When I load both external .js files in page initially, the last of them creates chat in specified div. When I change id of this div (to make load another chatbox in it) then initial chatbox dissappears and nothing happens because (I suppose) both scripts already made their initial run on page load and they don't modify the specified div to create another chatbox. Scripts are running just to execute user actions in the chatbox.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39009987
has text: Can you explain why `return false;` should be removed? I tried that just now and I could only toggle the nav, but not advance further into the menu.
type: AnswerComment
comment on: http://stackoverflow.com/a/25074190
type: Comment
score: 0

http://stackoverflow.com/comment/39244899
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25194310
has text: @Irfan That sounds like another question and is better expressed by posting a new question with all of the details. Don't forget to accept the answers that help you as quite of a few of us look to see if there are accepted answers in your history. Merging two arrays is possible, but the whole question deserves another full answer.
score: 0

http://stackoverflow.com/q/25102986
favorite count: 0
tagged with: ajax
has title: Why did the ajax call failed.The code below redirects to authenticate.php instead of echoeing text to login.html
has comment: http://stackoverflow.com/comment/39063678
downvote count: 0
has body: This is the markup Competitive Exams Login Copyright &copy 2013.All Rights Reserved.Created by :HACKSHAK & I-GOOGLEPLAY. /This is the javascript code for ajax call/ window.onload = function(){ var form = document.getElementById('login'); var output = document.getElementById('show'); form.onsubmit = function(e){ e.preventDefault(); var action = form.action; var method = form.method; var data = {}; var names = document.querySelectorAll('#login [name]'); for(var i=0;i<2;i++){ var name = names[i].name; var value = names[i].value; data[name] = value; } var transmit = new Transmit(method,action,data,output).bind(transmit); } function Transmit(method,action,data,output){ this.method = method; this.action = action; this.data = data; this.output = output; var xhr = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); alert(xhr); xhr.onreadystatechange = function(){ if(xhr.readyState == 4 && xhr.status == 200){ this.output.innerHTML = xhr.responseText; this.output.style.display = "inline-block"; } } xhr.open(this.method,this.action?this.data,true); xhr.send(); } } when I run the code even after the default behaviour of the form is prevented it redirects to authenticate.php instead of making ajax call.
type: UnansweredQuestion
score: 2
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39210765
has answer: http://stackoverflow.com/a/25103018
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25150815
has comment: http://stackoverflow.com/comment/48018123
upvote count: 74
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25150590
type: Answer
answers question: http://stackoverflow.com/q/25150590
has body: The problem is that [ 32.4586858, -110.8571443 ] is not a valid coordinate. The order should be longitude followed by latitude whereas that coordinate appears to be the reverse (judging by the fact that the valid latitude range is -90 to 90 and -110.8571443 is outside of that). I think you meant: { type: "Point", coordinates: [ -110.8571443, 32.4586858 ] } or there was some other entry error.
has comment: http://stackoverflow.com/comment/99014678
downvote count: 0
has comment: http://stackoverflow.com/comment/70036145
score: 74
has comment: http://stackoverflow.com/comment/54373430
has comment: http://stackoverflow.com/comment/41710871
has comment: http://stackoverflow.com/comment/39153194

http://stackoverflow.com/q/25191057
upvote count: 1
answer count: 1
favorite count: 0
has title: What determines the rendering of a confirm/alert?
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/5803305
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39227774
tagged with: modal-dialog
tagged with: javascript
has body: I came across this question referring to alerts and confirm dialogs, like the one created by alert('Hello World!'), while searching for a way to change the text in the 'ok' and 'cancel' buttons (there isn't one). That question, or rather, an answer to that question, indicated that somehow the OS is used to generate the confirm boxes, rather than the browser. I've hear them referred to as 'native' before, but I had assumed that meant that the dialogs were native to the browser, not the OS. My question is, what exactly determines the rendering of these dialogs? Is it the operating system, the browser, or some combination of the two? Does the browser handle these on its own, or does it ask the OS to display a dialog, and then catch the result of that?
has answer: http://stackoverflow.com/a/25191289
accepted answer: http://stackoverflow.com/a/25191289

http://stackoverflow.com/comment/39008677
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25073328
has text: @ryeballar Sorry for that missing, the answer is YES.
score: 0

http://stackoverflow.com/comment/39411914
comment on: http://stackoverflow.com/q/25135609
type: Comment
type: QuestionComment
has text: I am still coding collapsible circle and there is strange behaviour: http://jsfiddle.net/krancan/xqeh5cba/6/ What is wrong with transform? Why cannot increase after collapsing?
score: 0

http://stackoverflow.com/a/25095944
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25095910
score: 2
upvote count: 2
has body: The function in your javascript file is not used. Local Site for running weatherGetter script. To solve it
accepted answer of: http://stackoverflow.com/q/25095910

http://stackoverflow.com/comment/39428770
comment on: http://stackoverflow.com/a/25292115
has text: Thanks, The above answer is correct for fixed length. But my object structure like this...
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25096460
score: 0
type: Answer
has body: Figured it out, needed to give a unique ID to each post, so changed the href of the opening link to the post id and div id in the fancybox and that fixed it! Cheers
answers question: http://stackoverflow.com/q/25070280

http://stackoverflow.com/q/25184137
tagged with: angularjs
has answer: http://stackoverflow.com/a/25186368
tagged with: angularjs-ng-repeat
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25186368
has title: Nested data with ng-repeat table
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25189393
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25189393
score: 0
answer count: 2
has body: I'm in need of some help creating a table using angularjs to build my table. The issue here is my data has multiple nested levels, and my problem is that I cannot get the innermost level to display. In this example the task record is not shown. Here is a modified verison of my code which is defined as the templateUrl in my directive. HTML: Identifier Title {{incident.identifier}} {{incident.title}} 0"> {{ap.identifier}} {{ap.title}} 0"> {{task.task_number}} {{task.title}} JSON (sample data): [ { "event_id": "23", "event_number": "EVT-00000023", "title": "Test%20kc%20ml", "action_plans": [ { "event_id": "23", "action_plan_id": "46", "action_plan_number": "AP-00000046", "title": "What we do next is this.", "tasks": [ { "action_plan_id": "46", "task_id": "18", "task_number": "APT-00000018", "title": "ml task name" } ] } ], "selected": "false" } ]

http://stackoverflow.com/comment/39192115
comment on: http://stackoverflow.com/q/25170906
score: 0
type: Comment
has text: As it is shown above, yes three spans. It could be more on a narrower viewport or fewer on a wider viewport.
type: QuestionComment

http://stackoverflow.com/comment/39104014
score: 0
type: QuestionComment
type: Comment
has text: @Luka yes I did, I'm drivin nuts here. No erros are displayed when inspecting..
comment on: http://stackoverflow.com/q/25123126

http://stackoverflow.com/a/25230182
has comment: http://stackoverflow.com/comment/39301354
has comment: http://stackoverflow.com/comment/39301517
upvote count: 1
has comment: http://stackoverflow.com/comment/39301583
score: 1
has comment: http://stackoverflow.com/comment/39302408
has body: Will this work for you? http://jsfiddle.net/qkox62z5/ Uses map and assumes data is coming in as an array already so youd need to use JSON.parse on the json string from where it comes from function format( jsonData ){ return jsonData.map( function( item ){ return[ item.year, item.values] }); } Usage is like... format( JSON.parse( jsonString ) ) // where jsonString is your response from the json file
answers question: http://stackoverflow.com/q/25230135
downvote count: 0
has comment: http://stackoverflow.com/comment/39301650
has comment: http://stackoverflow.com/comment/39301402
type: Answer

http://stackoverflow.com/q/25077857
has body: I'm testing Enterprise Store and managed to invoke Admin Services from custom jaggery file using ws.WSRequest(); Now i'm trybing to do the same with simple javascript code with $ajax calls I've managed to call 172.27.11.44:9443/admin/services/AuthenticationAdmin/getAuthenticatorName but not succedd with 172.27.11.44:9443/admin/services/AuthenticationAdmin/login, for example The only diference is on the message payload Using the following message &lt;soapenv:Envelope xmlns:soapenv="http://authentication.services.core.carbon.wso2.org"&gt;&lt;soapenv:Body&gt; &lt;aut:login xmlns:aut="http://authentication.services.core.carbon.wso2.org"&gt; &lt;aut:username&gt;admin&lt;/aut:username&gt; &lt;aut:password&gt;admin&lt;/aut:password&gt; &lt;/aut:login&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; i got the following error ArrayIndexOutOfBoundException : 3 but the same payload works ok with SOAP UI Can anyone give light?
type: Question
tagged with: jaggery-js
has comment: http://stackoverflow.com/comment/39123786
has comment: http://stackoverflow.com/comment/39136607
has title: WSO2 Enterprise Store : Calling Services from Javascript
tagged with: javascript
score: 0
tagged with: admin
type: UnansweredQuestion
tagged with: wso2
tagged with: wso2-es
answer count: 0

http://stackoverflow.com/comment/39065298
type: QuestionComment
has text: thanks @jfriend00, I understand better this now :)
comment on: http://stackoverflow.com/q/25103793
score: 0
type: Comment

http://stackoverflow.com/a/25220209
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25217659
type: Answer
answers question: http://stackoverflow.com/q/25217659
score: 3
has body: Swap the color schemes by toggling a class on the body element. Make multiple versions in your CSS referencing this class for all elements that change with the color schemes. body.colorscheme-dark { /* Changes that are inheritable */ color: #fff; } body.colorscheme-dark #content #comment-section { /* Specific changes to this element */ border-color: whitesmoke; } You can create unlimited schemes like this. Now change them with a simple function like this: function swapTheme(theme) { $(body).removeClass().addClass(theme); } jQuery for clarity, just comment if you'd like that in vanilla js.
downvote count: 0
upvote count: 3

http://stackoverflow.com/comment/39236965
score: 0
comment on: http://stackoverflow.com/q/25196001
type: QuestionComment
type: Comment
has text: that's what dup question has...

http://stackoverflow.com/comment/39156171
score: 0
comment on: http://stackoverflow.com/q/25152417
type: Comment
has text: why not use a JSON string of an array of the objects as colors with their properties stored in client's local storage?
type: QuestionComment

http://stackoverflow.com/a/25223205
answers question: http://stackoverflow.com/q/25223169
downvote count: 1
has comment: http://stackoverflow.com/comment/39287833
upvote count: 0
score: -1
has body: I hope this you are looking for
type: Answer
has comment: http://stackoverflow.com/comment/39292631

http://stackoverflow.com/comment/39057016
comment on: http://stackoverflow.com/a/25097501
has text: yes, you can polyfill custom elements. if you just want to create `<my-awesome-element>` and don't need anything else, it will work everywhere with the htmlshiv
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39076120
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25104841
has text: I've changed my answer to run `setupEventHandlers()` after the regular code, instead of before.

http://stackoverflow.com/a/25096409
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25096387
upvote count: 1
answers question: http://stackoverflow.com/q/25096387
score: 1
has body: ! is the plan language equivalent of 'not'. it is the shorthand way of saying if (boolval != true), notice the ! in != also means not as in not equal. So the section of code you posted pretty much just says if the timer is NOT active, activate it.

http://stackoverflow.com/a/25205606
has comment: http://stackoverflow.com/comment/39254785
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25205563
has body: That is because you are not closing the " of Id attribute. And also you have omitted equal sign on your name attribute &lt;input type="checkbox" name="cleanse" id="id_cleanse" value="cleanse"&gt; Cleanse Selected Data?
answers question: http://stackoverflow.com/q/25205563
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/39254872
upvote count: 3

http://stackoverflow.com/q/25225080
has title: ng-style's variable not updating to the view
accepted answer: http://stackoverflow.com/a/25225133
type: AnsweredQuestion
has body: I would like to add 20 px to my loader bar each time a successful request is completed. a staggered set of data coming from various apis. $on each successful request, I would like to add 20 to var progress unfortunally even tho the number is incrementing $scope.progressWidth will not update the view. It stays static at width: 0px. when i tried $scope.apply() it says digest is already happening. HTML view: &lt;div class="loader" ng-style="progressWidth"&gt;&lt;/div&gt; js: var progress = 0; $scope.progressWidth = { 'width': progress + 'px' }; angular.forEach(['load::1', 'load::2', 'load::3', 'load::video'], function (value) { $scope.$on(value, function (event) { load = true; loaded.push(true); if (load === true ) { load = false; progress += 20; } if (loaded[0] === true &amp;&amp; loaded[1] === true &amp;&amp; loaded[2] == true &amp;&amp; loaded[3]) { $scope.$broadcast('load::menu'); } }); }); data: $http.jsonp('http://filltext.com/?rows=10&amp;delay=1&amp;fname={firstName}&amp;callback=JSON_CALLBACK'). success(function(data){ $scope.datas[0] = data; console.log($scope.datas); $scope.$emit('load::1'); }); $http.jsonp('http://filltext.com/?rows=10&amp;delay=2&amp;fname={firstName}&amp;callback=JSON_CALLBACK'). success(function(data){ $scope.datas[1] = data; console.log($scope.datas); $scope.$emit('load::2'); }); $http.jsonp('http://filltext.com/?rows=10&amp;delay=4&amp;fname={firstName}&amp;callback=JSON_CALLBACK'). success(function(data){ $scope.datas[2] = data; console.log($scope.datas); $scope.$emit('load::3'); });
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25225133
answer count: 1
score: 1
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/25187485
has body: Include all js files mentioned here in script tag. maps.google.com/maps/api/js?sensor=false, jquery.ui.map.js, jquery.ui.map.extensions.js, jquery.ui.map.overlays.js, jquery.ui.map.services.js &lt;div id="map_canvas" style="width:100%; height:500px;"&gt;&lt;/div&gt; var mapa = $('#map_canvas').gmap({'center': '-18.646245,35.815918'}); $('#map_canvas').gmap('option', 'zoom', 7); //create the layer (all countries except Mozambique) var world_geometry; $('#map_canvas').gmap().bind('init', function(event, map) { world_geometry = new google.maps.FusionTablesLayer({ query: { select: 'geometry', from: '1N2LBk4JHwWpOY4d9fobIn27lfnZ5MDy-NoqqRpk', where: "ISO_2DIGIT NOT EQUAL TO 'MZ'" }, styles: [{ polygonOptions: { fillColor: "#333333", fillOpacity: 0.3 } }], map: map, suppressInfoWindows: true }); }); $('#map_canvas').gmap().bind('init', function(event, map) { $(map).click(function(event) { $('#map_canvas').gmap('clear', 'markers'); $('#map_canvas').gmap('addMarker', { 'position': event.latLng, 'draggable': true, 'bounds': false }, function(map, marker) { }).dragend(function(event) { google.maps.geometry.poly.containsLocation(event.latLng, world_geometry); }).click(function() { }) }); }); for live demo check this jsfidlle "http://jsfiddle.net/Lq2p5/"
answers question: http://stackoverflow.com/q/25186323
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/39236651
has comment: http://stackoverflow.com/comment/39221396

http://stackoverflow.com/a/25084443
accepted answer of: http://stackoverflow.com/q/25084370
has body: parseInt(number, 10)= b; So you are saying to assigning b to parseInt. You have it reversed. var b = parseInt(number, 10) You have the problem in multiple places.
type: Answer
answers question: http://stackoverflow.com/q/25084370
score: 3
upvote count: 3
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39158371
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25153785
has text: have you tried solving this problem?
type: QuestionComment

http://stackoverflow.com/q/25183808
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25189253
has comment: http://stackoverflow.com/comment/39213515
linked to: http://stackoverflow.com/q/11363256
linked to: http://stackoverflow.com/q/18213309
score: -1
type: Question
upvote count: 0
tagged with: html5-canvas
answer count: 1
tagged with: javascript
favorite count: 0
has body: I have a problem in understanding the concept of changing an image source. I have a function that create an image on stage .I want the image to be changed when the user clicks on it. can any one give me an example? Thanks for Help
tagged with: kineticjs
has title: understanding the concept of changing an image source
has answer: http://stackoverflow.com/a/25189253

http://stackoverflow.com/q/25216956
tagged with: ajaxify
accepted answer: http://stackoverflow.com/a/25217000
answer count: 1
upvote count: 7
tagged with: history.js
type: AnsweredQuestion
has body: I have ajax calls made in jquery function which i call with onClick options placed on divs. example: &lt;div class='basic' onClick='example( &lt;?php echo numberIwant ?&gt; )'&gt; example &lt;/div&gt; and the functions than looks like this: function example(ID){ $.ajax({ type: "POST", url: "example.php", data: "ID="+ID, success: function(msg){$("#main").html(msg);} }); } Now I want to make browser back button to work, to open the previous page(ajax content). I googled and tried multiple scrips like ajaxify and history.js and so on but I just cannot get it working. I don't know if I either don't know how to use ajaxify properly or if it just doesent work with this kind of method.. Can anyone help me?
score: 7
has answer: http://stackoverflow.com/a/25217000
type: Question
has title: jquery ajax post call, ajaxify history and back button
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax

http://stackoverflow.com/q/25214835
type: Question
answer count: 1
tagged with: javascript
has title: Google Maps API- Formatted phone number shows up as undefined in List on side bar
tagged with: google-maps-api-3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25215043
score: 0
has body: I am trying to display a list of the places and their phone numbers on the ride side bar. the phone numbers work when i click on the markers but show up as undefined in the side bar. any help is great thanks. $(document).ready(function(){ var map = null; var gmarkers = []; var service = null; var infowindow = new google.maps.InfoWindow({size: new google.maps.Size(150,50)}); function initialize() { var slo = new google.maps.LatLng(35.2742, -120.6631); map = new google.maps.Map(document.getElementById('map'), { mapTypeId: google.maps.MapTypeId.ROADMAP, center: slo, zoom: 11 }); service = new google.maps.places.PlacesService(map); var request = { location: slo, radius: 30000, types: ['hospital'] }; infowindow = new google.maps.InfoWindow(); service.nearbySearch(request, callback); } function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i < results.length; i++) { createMarker(results[i]); } } } function createMarker(place) { var placeLoc = place.geometry.location; if (place.icon) { var image = new google.maps.MarkerImage( place.icon, new google.maps.Size(71, 71), new google.maps.Point(0, 0), new google.maps.Point(17, 34), new google.maps.Size(25, 25)); } else var image = null; var marker = new google.maps.Marker({ map: map, icon: image, position: place.geometry.location }); var request = { reference: place.reference }; google.maps.event.addListener(marker,'click',function(){ service.getDetails(request, function(place, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { var contentStr = ' '+place.name+' '+place.formatted_address; if (!!place.formatted_phone_number) contentStr += ' '+place.formatted_phone_number; if (!!place.website) contentStr += ' '+place.website+''; contentStr += ' '+place.types+' '; infowindow.setContent(contentStr); infowindow.open(map,marker); } else { var contentStr = " No Result, status="+status+" "; infowindow.setContent(contentStr); infowindow.open(map,marker); } }); }); …

http://stackoverflow.com/a/25099652
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39057760
type: Answer
has comment: http://stackoverflow.com/comment/39057776
score: 2
answers question: http://stackoverflow.com/q/25099510
has comment: http://stackoverflow.com/comment/39057852
accepted answer of: http://stackoverflow.com/q/25099510
has body: document.getElementsByClassName is going to return an array of elements, so to apply your style, you'll have to iterate through the array and set each one: http://jsfiddle.net/nGTN5/3/ When performing DOM manipulation like this, you'll save yourself a ton of bother by using jQuery - http://jquery.com/ Then it would be as simple as: $('.optioninfo').css('left', '9001%') And that will do them all.

http://stackoverflow.com/comment/39010245
type: Comment
has text: Wrapping code in an IIFE is **highly** recommended because it prevents pollution of the global scope (e.g. with your `clicks` variable). What is your new issue? Are your buttons working?
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25074285

http://stackoverflow.com/q/25108071
tagged with: loops
has body: My loop is counting how many charts are there present in the page and after that it will store those values of the chart in to variables. I'm trying to utilised those values and appending them into my DOM. Here's my dilemma, when I fetch the variable inside the loop, eg. visual_pie_val, it will return two values which is "20" and "10". On the other hand, If I fetch it outside the loop it will return the last value only which is "10". I need it to return their respective value Example: for visualization-80, it needs to return 20 and for for visualization-81, it needs to return 10. I also need to determine the chart type, so, I used if statement for that, if I put the if statement inside the loop, as expected, I can determine the type, but at the same time, I generate the element twice (current number of charts in the page) because it's inside the for loop. This what my code looks like: // CustomVisualizer function numAttrs(obj) { var count = 0; for(var key in obj) { if (obj.hasOwnProperty(key)) { ++count; } } return count; } var visual = visualizer.charts; // contains "visualization-80" and "visualization-81" visual_list = [], visual_title = [], visual_type = [], visual_pie_val = [], shadow_box = '&lt;div class="percent"&gt;&lt;/div&gt;&lt;div class="inner"&gt;&lt;/div&gt; &lt;div class="outer"&gt;&lt;/div&gt;'; // load key for(var k in visual) visual_list.push(k); var visual_target = '#' + visual_list.join(', #'); for ( i = 0; i &lt; numAttrs(visual); i++ ) { visual_title[i] = visual[visual_list[i]].settings.title; visual_type = visual[visual_list[i]].type; // currently it's "pie" visual_pie_val = visual[visual_list[i]].data[0][1]; // "visualization-80" value is 20, "visualization-81" value is 10 // remove title visual[visual_list[i]].settings.title = ''; if(visual_type == 'pie') { $(visual_target).parent().append(shadow_box); $(visual_target).parent().find('.percent').append(visual_pie_val) // visual_pie_val will return "2010" } else { console.log('not pie'); } }; …
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25108308
answer count: 1
tagged with: jquery
has title: Confused on the logic of my loops in creating variable inside the loop and using them outside the loop
type: UnansweredQuestion

http://stackoverflow.com/q/25090606
favorite count: 0
type: Question
score: 3
tagged with: asynchronous
has answer: http://stackoverflow.com/a/25090843
has comment: http://stackoverflow.com/comment/39041362
upvote count: 3
has title: Using setImmediate() over setTimeout(func,0) in IE
answer count: 1
tagged with: settimeout
tagged with: internet-explorer
accepted answer: http://stackoverflow.com/a/25090843
type: AnsweredQuestion
has body: As per IE docs setImmediate was introduced to address the core performance problem without negatively impacting power consumption. How can IE achieve this? (Specially if the reason for 4ms clamping of setTimeout was because 'trying to increase the number of callbacks per second' led to high power consumption) My questions are: Doesn't setImmediate() have all the drawbacks of setTimeout(func,0) before clamping of 4ms was introduced? Why should anyone use setImmediate() instead of setTimeout(func,0) at all then?
has comment: http://stackoverflow.com/comment/39041335
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25082027
tagged with: jquery
has body: I have several underlaying divs with hover effect. Sometimes I need to show modal dialog and all undelaying divs should be "disabled". This is done by placing semi-transparent high z-index div on top of them, but the problem is that hover effect on underlaying div stays until I move my mouse. Is there a way to "unhover" underlaying divs when overlaying semi-transparent div becomes visible? Simplified exanple HTML: &lt;div class="somediv"&gt;&lt;/div&gt; &lt;div id="modal"&gt;&lt;/div&gt; CSS: #modal { z-index: 1000; background:#000; position:fixed; top:0; left:0; width:100%; height:100%; display: none; opacity: 0.3; } .somediv { position: absolute; left: 20px; top: 20px; width: 100px; height: 100px; background-color: red; } .somediv:hover { background-color: blue; } JS: setTimeout(function(){ $("#modal").show(); }, 5000); Hover over square and wait 5 seconds.
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
has title: CSS remove hover effect when semi-transparent div overlays another div
accepted answer: http://stackoverflow.com/a/25082265
upvote count: 3
type: Question
possible better answer: http://stackoverflow.com/a/25082297
score: 3
has answer: http://stackoverflow.com/a/25082297
tagged with: javascript
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25082265

http://stackoverflow.com/comment/39124220
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25129198
score: 1
has text: No, it's not possible to put those directly in the resource instance. See: [angular-resource.js#L33](https://github.com/angular/angular.js/blob/v1.2.21/src/ngResource/resource.js#L33), all properties are cleared before mixing the new ones.

http://stackoverflow.com/q/25095401
answer count: 2
has body: I'm trying to add a glyphicon to my dynamically created button in my javascript file. I can add it in the actual html file but I can't figure out how to add it from javascript function createRemoveIcon(){ var icon = document.createElement("span"); icon.className ="glyphicon glyphicon-remove-circle"; alert("test" + icon); } Or this is how I was originally trying to create it function createRemoveRowButton(attendeeArrayIndex) { var removeIcon = document.getElementById("removeIcon"); var removeRowButton = document.createElement("BUTTON"); var icon = document.createTextNode(removeIcon); removeRowButton.appendChild(icon); removeRowButton.onclick = function() { deleteRow(attendeeArrayIndex); }; return removeRowButton; }
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39051284
has answer: http://stackoverflow.com/a/29317277
has answer: http://stackoverflow.com/a/25096243
accepted answer: http://stackoverflow.com/a/25096243
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
tagged with: glyphicons
type: Question
has title: Glyphicon on dynamic button
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/29317277
score: 4
upvote count: 4

http://stackoverflow.com/comment/39140231
type: QuestionComment
type: Comment
has text: @PaulRoub Make your comment an answer so I can give you rep.
score: 0
comment on: http://stackoverflow.com/q/25143978

http://stackoverflow.com/comment/39218638
has text: Yes, but the best is the resulat display on my webUI :/ because my friends aren't access to the terminal ( for security )
comment on: http://stackoverflow.com/a/25186153
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39084335
type: Comment
type: QuestionComment
has text: why not use the date object? Or search stackoverflow for: http://stackoverflow.com/questions/10123953/sort-javascript-object-array-by-date
score: 0
comment on: http://stackoverflow.com/q/25113909

http://stackoverflow.com/q/25115531
has answer: http://stackoverflow.com/a/25115782
accepted answer: http://stackoverflow.com/a/25115613
has comment: http://stackoverflow.com/comment/39087156
has body: I want to pass some selected value to another view. This is my HTML. There is a select field. On Button click the next page should be shown with the selected value as header title. Deine Stadt Gutscheine suchen The Controller: .controller('AccountCtrl', function($scope, $state) { $scope.cities = [ {id:'001', name:'Konstanz'}, {id:"002", name:"Freiburg"} ]; $scope.selectedCity = $scope.cities[0]; $scope.searchCity = function(selectedCity){ console.log(selectedCity.name); $state.go("tab.friends"); }; }); The console.log(selectedCity.name) works fine. But how can I bring this value to another controller to show it in header? I don´t need a service! Ty. UPDATE: The VIEW where the title should be shown: The Controller of the second view: .controller('FriendsCtrl', function($scope) { })
type: Question
has answer: http://stackoverflow.com/a/25115613
downvote count: 0
tagged with: javascript
has title: Angular.js pass value from select to another view
has comment: http://stackoverflow.com/comment/39087371
has comment: http://stackoverflow.com/comment/39087506
possible better answer: http://stackoverflow.com/a/25115782
tagged with: angularjs
answer count: 3
has answer: http://stackoverflow.com/a/25115672
has comment: http://stackoverflow.com/comment/39087232
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/39087621
upvote count: 2
type: AnsweredQuestion

http://stackoverflow.com/q/25183006
has comment: http://stackoverflow.com/comment/39212805
linked to: http://stackoverflow.com/q/15609139
type: Question
tagged with: delay
tagged with: javascript
has answer: http://stackoverflow.com/a/25183320
has answer: http://stackoverflow.com/a/25183488
has title: Javascript getElementById show div hidden before end loop
score: 0
accepted answer: http://stackoverflow.com/a/25183334
answer count: 3
tagged with: getelementbyid
possible better answer: http://stackoverflow.com/a/25183320
has body: I'm confused and tired of trying to make it work ... On one page, do a raffle (select SQL) and ride the divs (style.display = none) by echo (PHP). So far so good, each DIV with ID. I have a BUTTON that calls a Javascript function that will show the DIV's. Within this function, place a loop. But the browser only shows the DIV after traversing the loop, even working with the setTimeout function. EX. HTML: *NOTE: div id is creating depending rows SQL SELECT <button Onclick="ShowDivs(<?php echo $numParticipants ?>)">Raffle JAVASCRIPT: id=1; function ShowDivs(participants) { do { window.document.getElementById(id).style.display = "block"; delay(1000); alert(); // I need remove this alert id ++ ; } while (id<=participants); } function delay(millis){ var date = new Date(); var curDate = null; do { curDate = new Date(); } while(curDate-date < millis); } I need each DIV is displayed every 2 seconds. One by one every 2 seconds with a single click on the button Raffle. Please can someone help me?
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39213060
has comment: http://stackoverflow.com/comment/39212143
has answer: http://stackoverflow.com/a/25183334
tagged with: loops

http://stackoverflow.com/q/25218778
type: UnansweredQuestion
tagged with: scroll
has answer: http://stackoverflow.com/a/42707813
score: 3
downvote count: 0
type: Question
has title: How can I set focus to a div with overflow:scroll
tagged with: javascript
has body: When I go to the Gallery page of this website: http://roxannelin.azurewebsites.net I am unable to scroll down until after I click on the page. I would like to be able to scroll down using the mouse wheel as soon as I land on this page. I have tried setting the focus by placing a tabindex on the div and using jquery .focus() however this moves me to the 3rd tab (showreel) and messes up the layout. How can I bind the scroll event to this particular div without the user having to do anything?
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0

http://stackoverflow.com/q/25229368
has comment: http://stackoverflow.com/comment/39301079
tagged with: jquery
has body: I am making a view from json. I am able to that when I take json in a variable. But same thing when i read from file my view is not display. when comment the code which is working when I take json string in a variable. Second issue Please enter a valid textl Please enter the text When I am using static value of input field like that(value='login name').it doesn't display that field value in input field.actually there is parameter value in my json I want to show value in input field (it there is any value it should display with filled value). I take value like that "value":value.value, plunker: http://plnkr.co/edit/f3ZNtPbKeFkXnOOc3PNM?p=preview actually why i am ready from file because there mat 1000 json object .i need to make 1000 form using one method can I used this function function changeData(data) { var map = { NUMBER: "number", TEXT: "text", SWITCH: "select" }; // data is an object - use for .. in to enumerate for (var key in data.input) { var e = data.input[key]; // alias for efficient structure dereferencing e.label = e.displayName; e.title = e.displayDetail; e.type = map[e.inputType]; delete e.displayName; delete e.displayDetail; delete e.inputType; } }; or I used this plugin https://github.com/danhunsaker/angular-dynamic-forms
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39300826
answer count: 0
has comment: http://stackoverflow.com/comment/39300934
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39307863
has comment: http://stackoverflow.com/comment/39300869
linked to: http://stackoverflow.com/q/8312459
has comment: http://stackoverflow.com/comment/39301888
type: Question
tagged with: angularjs-directive
has title: how to set value in input field using angular js.?
tagged with: javascript
has comment: http://stackoverflow.com/comment/39301286
has comment: http://stackoverflow.com/comment/39301526
score: 0

http://stackoverflow.com/comment/39334416
has text: So, you need to clear `div_right` before appending childs? Try `divObject.innerHTML = '';` right after `var divObject = ...`.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25223997
type: Comment

http://stackoverflow.com/comment/39050981
has text: wait...you asked a question and just answered it a few seconds later...why?
comment on: http://stackoverflow.com/a/25096072
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39326065
type: AnswerComment
comment on: http://stackoverflow.com/a/25148372
type: Comment
has text: You can generate that array dynamically; what criteria would you like to use to determine the min and max tick marks, the number of tick marks, and/or the spacing between tick marks?
score: 0

c#
tags question: http://stackoverflow.com/q/25142325
tags question: http://stackoverflow.com/q/25093560
tags question: http://stackoverflow.com/q/25212591
tags question: http://stackoverflow.com/q/25191036
tags question: http://stackoverflow.com/q/25217480
tags question: http://stackoverflow.com/q/25228648
tags question: http://stackoverflow.com/q/25140755
tags question: http://stackoverflow.com/q/25076769
tags question: http://stackoverflow.com/q/25119281
tags question: http://stackoverflow.com/q/25091376
tags question: http://stackoverflow.com/q/25166932
tags question: http://stackoverflow.com/q/25174581
tags question: http://stackoverflow.com/q/25077150
tags question: http://stackoverflow.com/q/25161280
tags question: http://stackoverflow.com/q/25137725
tags question: http://stackoverflow.com/q/25227311
tag name: c#
tags question: http://stackoverflow.com/q/25118652
tags question: http://stackoverflow.com/q/25141622
tags question: http://stackoverflow.com/q/25150997
tags question: http://stackoverflow.com/q/25204863
tags question: http://stackoverflow.com/q/25197781
tags question: http://stackoverflow.com/q/25213904
tags question: http://stackoverflow.com/q/25174964
tags question: http://stackoverflow.com/q/25142594
tags question: http://stackoverflow.com/q/25193419
tags question: http://stackoverflow.com/q/25089190
tags question: http://stackoverflow.com/q/25126615
tags question: http://stackoverflow.com/q/25125851
tags question: http://stackoverflow.com/q/25154055
tags question: http://stackoverflow.com/q/25186555
tags question: http://stackoverflow.com/q/25195580
tags question: http://stackoverflow.com/q/25175136
tags question: http://stackoverflow.com/q/25123070
tags question: http://stackoverflow.com/q/25096971
tags question: http://stackoverflow.com/q/25120646
tags question: http://stackoverflow.com/q/25200867
tags question: http://stackoverflow.com/q/25119649
tags question: http://stackoverflow.com/q/25172343
tags question: http://stackoverflow.com/q/25188736
tags question: http://stackoverflow.com/q/25120131
tags question: http://stackoverflow.com/q/25203407
tags question: http://stackoverflow.com/q/25197153
tags question: http://stackoverflow.com/q/25141120
tags question: http://stackoverflow.com/q/25072480
tags question: http://stackoverflow.com/q/25228586
tags question: http://stackoverflow.com/q/25216911
tags question: http://stackoverflow.com/q/25088876
tags question: http://stackoverflow.com/q/25102036
tags question: http://stackoverflow.com/q/25087973
tags question: http://stackoverflow.com/q/25069734
tags question: http://stackoverflow.com/q/25121218
tags question: http://stackoverflow.com/q/25207313
tags question: http://stackoverflow.com/q/25144607
tags question: http://stackoverflow.com/q/25104215
tags question: http://stackoverflow.com/q/25073779
tags question: http://stackoverflow.com/q/25178061
tags question: http://stackoverflow.com/q/25220312
tags question: http://stackoverflow.com/q/25228339
tags question: http://stackoverflow.com/q/25162155
tags question: http://stackoverflow.com/q/25117790
tags question: http://stackoverflow.com/q/25085711
tags question: http://stackoverflow.com/q/25158447
tags question: http://stackoverflow.com/q/25076344
tags question: http://stackoverflow.com/q/25185168
tags question: http://stackoverflow.com/q/25153756
tags question: http://stackoverflow.com/q/25228507
tags question: http://stackoverflow.com/q/25118859
tags question: http://stackoverflow.com/q/25176493
tags question: http://stackoverflow.com/q/25136687
tags question: http://stackoverflow.com/q/25133931
tags question: http://stackoverflow.com/q/25147931
type: Tag
tags question: http://stackoverflow.com/q/25085897
tags question: http://stackoverflow.com/q/25080925
tags question: http://stackoverflow.com/q/25207319
tags question: http://stackoverflow.com/q/25218594
tags question: http://stackoverflow.com/q/25105392
tags question: http://stackoverflow.com/q/25193607
tags question: http://stackoverflow.com/q/25114242

http://stackoverflow.com/comment/39073297
type: QuestionComment
has text: do the file contents change between the script loads?
comment on: http://stackoverflow.com/q/25107820
score: 0
type: Comment

http://stackoverflow.com/comment/39376384
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25193847
has text: It is a really awesome system, I got how it works, but there is one problem - I also need to analyze all the records, not only display them (for example, count all studies that are in Phase 3). And as far as I can see, this system just takes the data and puts it into HTML. Plus, it reads all of them at the same time, not in chunks, like what I'm loooking for.
score: 0

http://stackoverflow.com/comment/39101877
comment on: http://stackoverflow.com/q/25123106
score: 0
type: QuestionComment
type: Comment
has text: There you go. You have not added library. Download from http://amsul.ca/pickadate.js/v2-(deprecated)/index.htm

http://stackoverflow.com/q/25198594
has comment: http://stackoverflow.com/comment/39242021
has comment: http://stackoverflow.com/comment/39242080
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39242093
has comment: http://stackoverflow.com/comment/39242188
has answer: http://stackoverflow.com/a/25199755
has comment: http://stackoverflow.com/comment/39241619
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39242050
has comment: http://stackoverflow.com/comment/39241822
type: Question
has comment: http://stackoverflow.com/comment/39242159
has comment: http://stackoverflow.com/comment/39241825
has comment: http://stackoverflow.com/comment/39241983
has title: Get line number clicked using jquery - (count of all inside a before a particular element clicked)
has comment: http://stackoverflow.com/comment/39241992
has comment: http://stackoverflow.com/comment/39242034
answer count: 1
tagged with: jquery
has body: I want to get the count of all the &lt;br&gt; (i.e. the number of lines before the clicked line) inside the &lt;div id="myTextFile"&gt;. &lt;div id="myTextFile" &gt; &lt;br&gt;Hello abc; &lt;br&gt; com.demo; &lt;br br&gt; import org.junit.Test; &lt;br&gt; import org.openqa.selenium.firefox.FirefoxDriver; &lt;br&gt; import com.jkl; &lt;br&gt; &lt;/div&gt; Any help would be highly appreciated.
has comment: http://stackoverflow.com/comment/39242184
favorite count: 0
accepted answer: http://stackoverflow.com/a/25199755
has comment: http://stackoverflow.com/comment/39242058
has comment: http://stackoverflow.com/comment/39241918
has comment: http://stackoverflow.com/comment/39242066
has comment: http://stackoverflow.com/comment/39241629
has comment: http://stackoverflow.com/comment/39242092
has comment: http://stackoverflow.com/comment/39242019
has comment: http://stackoverflow.com/comment/39242129
has comment: http://stackoverflow.com/comment/39241970
downvote count: 2
has comment: http://stackoverflow.com/comment/39241932
upvote count: 1

http://stackoverflow.com/comment/39025777
comment on: http://stackoverflow.com/q/25082659
type: QuestionComment
type: Comment
score: 3
has text: See http://api.jquery.com/wrap/

http://stackoverflow.com/comment/39162521
type: AnswerComment
score: 0
type: Comment
has text: If I do that, though, then the container DIV does not fit into the layout in the real world. It can't be assumed that the container DIV will be placed arbitrarily.
comment on: http://stackoverflow.com/a/25155856

http://stackoverflow.com/q/25191471
score: 0
has comment: http://stackoverflow.com/comment/39228581
type: Question
has body: I have a link that function as the submit button of the search bar: &lt;a href="#" id="search"&gt;&lt;img src="images/go.png" /&gt;&lt;/a&gt; Is there anyway I can set enter as the hotkey for that link? For example, when user press enter it will automatically fire the link and start searching, just like google. This is what I got so far, but seems like it doesn't work: addEventListener("keypress", function (event) { if (event.keyCode == 13) $('search').trigger('click'); });
answer count: 2
linked to: http://stackoverflow.com/q/6524288
tagged with: javascript
has answer: http://stackoverflow.com/a/25191819
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25191700
has title: How to set 'enter' to hotkey of a link in my webpage?
linked to: http://stackoverflow.com/q/905222
tagged with: asp.net
favorite count: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39228585

http://stackoverflow.com/comment/39286371
type: QuestionComment
comment on: http://stackoverflow.com/q/25221818
has text: Did you try "3rdParty/closure_linter" ?
score: 0
type: Comment

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/25095765
tags question: http://stackoverflow.com/q/25206567
tags question: http://stackoverflow.com/q/25191580
tags question: http://stackoverflow.com/q/25158688
tags question: http://stackoverflow.com/q/25091772
tags question: http://stackoverflow.com/q/25183263
tags question: http://stackoverflow.com/q/25101304
tags question: http://stackoverflow.com/q/25127064
tags question: http://stackoverflow.com/q/25150500
tags question: http://stackoverflow.com/q/25148622
tags question: http://stackoverflow.com/q/25175299

http://stackoverflow.com/q/25098376
accepted answer: http://stackoverflow.com/a/25098839
tagged with: javascript
score: 1
tagged with: kotlin
favorite count: 0
has body: I am setting up the interop layer for this ThreeJS class and the constructor of the class takes in a object which is used to set the properties. //PointCloudMaterial.js THREE.PointCloudMaterial = function ( parameters ) { THREE.Material.call( this ); this.color = new THREE.Color( 0xffffff ); this.map = null; this.size = 1; this.sizeAttenuation = true; this.vertexColors = THREE.NoColors; this.fog = true; this.setValues( parameters ); }; Below is what I would like to be able to do in Kotlin, is it possible to use anomalous objects in should a fashion? I was originally thinking of creating an object equivalent to the possible perimeters to pass in, problem with that is it would override the current values which is not something I want. //Interop Layer native("THREE.PointCloudMaterial") public class PointCloudMaterial(parameters: object) { } //This doesn't compile "Type Expected" //Example usage var sizeObject = object { var size: Double = size } PointCloudMaterial(sizeObject);
upvote count: 1
type: Question
type: AnsweredQuestion
has title: How to use Kotlin anonymous classes as arguments for native JavaScript Functions?
has answer: http://stackoverflow.com/a/25098839
tagged with: interop
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25168733
has comment: http://stackoverflow.com/comment/39187125
score: 0
type: Answer
has body: For a PHP server all you have to do to enable CORS is to add this line. header("Access-Control-Allow-Origin: *"); Make sure this is set before any other content is sent. That means above any echo statements or html. Putting it towards the top should work. The website http://enable-cors.org/index.html is a good resource for learning more about CORS and how to allow it on different server setups.
has comment: http://stackoverflow.com/comment/39186807
answers question: http://stackoverflow.com/q/25168025

http://stackoverflow.com/a/78182180
score: 0
has body: we need another ajax request to get the other information of option such as 'text' or 'label'. currently select2 does not provide a built in method where you can set a pre selected that only need is 'id'. yes you can set element.val(id) but this method only works in a non ajax select2 or ajax but the user need to select manually the item before val works. async sel2_set_value(ref_instance, id_key, id_value, text_key) { const $element = this.getElementByRef(ref_instance); const select2Instance = $element.data('select2'); const options = select2Instance.options.options; const where_statement = {}; where_statement[id_key] = id_value; const response = await jQuery.ajax({ "url" : options.url, "data" : { "where" : JSON.stringify(where_statement)} }); if(response.data.length <= 0) { return; } const text = response.data[0].attributes[text_key]; const option = new Option(text, id_value, true, true); $element.append(option).trigger('change'); }
answers question: http://stackoverflow.com/q/25187926
type: Answer

http://stackoverflow.com/comment/39052027
has text: I picked this one as the answer, because it comes closest to the one I figured out myself (see Update 2). But the other solution on this page is very good as well; They both do their job - thx!
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25096193

http://stackoverflow.com/a/25222777
has comment: http://stackoverflow.com/comment/39288894
has body: Because submit() is the reserved function to submit a form in core JS. For example, if your form had an id like myform, you could do this to submit it via JS: document.form['myform'].submit(); So calling that function you're actually submitting the form and not calling your custom function. EDIT: I forgot to mention, it only works inside the form because it's calling the submit function of that form. Out of it it's not available anymore (since the body tag doesn't have a submit function).
has comment: http://stackoverflow.com/comment/39288912
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39287099
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25222715
accepted answer of: http://stackoverflow.com/q/25222715
downvote count: 0

http://stackoverflow.com/a/25208809
accepted answer of: http://stackoverflow.com/q/25207703
downvote count: 2
answers question: http://stackoverflow.com/q/25207703
upvote count: 178
type: AcceptedAnswer
has body: I suggest storing it on the instance but not in its state. Whenever state is updated (which should only be done by setState as suggested in a comment), React calls render and makes any necessary changes to the real DOM. Because the value of timeout has no effect on the rendering of your component, it shouldn't live in state. Putting it there would cause unnecessary calls to render.
type: Answer
score: 176

http://stackoverflow.com/q/25169994
answer count: 0
has comment: http://stackoverflow.com/comment/72070172
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/39189165
tagged with: geocode
has body: I'm trying to run through a loop in Wordpress and for each item in the loop I need to geocode the address, then add the LatLng into an array. I think I have it coded right but it will not work. Here is the code: &lt;script type="text/javascript"&gt; var locs = [] function initialize() { var geo = new google.maps.Geocoder; var address = "&lt;?php echo $arrayAddress; ?&gt;"; geo.geocode({'address':address},function(results, status){ if (status == google.maps.GeocoderStatus.OK) { var myLatLng = results[0].geometry.location; locs.push(myLatLng); } else { alert("Geocode was not successful for the following reason: " + status); } }); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; I've verified that the myLatLng variable does contain the lat and long like it should. I just can't get it to push it into the variable. Is this some simple syntax I've missed?
tagged with: google-maps
has comment: http://stackoverflow.com/comment/39188911
tagged with: javascript
has comment: http://stackoverflow.com/comment/39190519
linked to: http://stackoverflow.com/q/24894023
score: 0
has title: How can I push the Lat/Long that Google Maps Geocoded into an array? Won't work.
type: UnansweredQuestion

http://stackoverflow.com/comment/39054280
score: 0
comment on: http://stackoverflow.com/q/25097737
type: QuestionComment
type: Comment
has text: @CamilleHodoul nope, nothing comes up. And nothing happens. I use Firebug.

http://stackoverflow.com/a/25135934
type: Answer
answers question: http://stackoverflow.com/q/25105938
score: 1
accepted answer of: http://stackoverflow.com/q/25105938
upvote count: 1
has body: I don't think using multiple references is a problem in any way. The connection to server is only one. however if you want to reuse the instance you can try doing something like this: var ref = new Firebase("https://url.firebaseio.com/user" + $scope.auth.user.id + '/routines/' + $scope.routineId); var sync = $firebase(ref); var pagesSync = $firebase(ref.child('pages')); and here is the documentation I refer to.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25277842
score: 0
type: AcceptedAnswer
has body: <?php //display 10 posts with title and date $args=array( 'post_type' => 'post', 'post_status' => 'publish', 'post_category' => '123', 'posts_per_page' => 12, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?> <?php the_time('F jS, g:i a') ?> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?> Make sure PHP is enabled though a plugin. This code works.
type: Answer
accepted answer of: http://stackoverflow.com/q/25170183
answers question: http://stackoverflow.com/q/25170183

http://stackoverflow.com/comment/39090733
type: Comment
has text: If you want to catch the case of A being extended you should also store the rects' width and treat the case where the left and right edges are to either side of your current location as optimum (0°, say). (And you'll need the height for the east-west directions, of course.)
comment on: http://stackoverflow.com/q/25115931
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39280387
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25218683
has text: Before you were returning plain text, and now you are returning an `` tag which is interpreted as an xml node. Your code for extracting the xml data will have to change. What are you doing in your ajax success callback function? Please provide code.
score: 0

http://stackoverflow.com/comment/39288589
type: QuestionComment
has text: I dont understand why is your code fails in the third item. I see an error because you don't set "counter" to 1 when it's value is greater than 5 (it's not an img with id hs6).
comment on: http://stackoverflow.com/q/25223664
score: 0
type: Comment

http://stackoverflow.com/a/25177941
has comment: http://stackoverflow.com/comment/39203129
has body: If you want to acces a property of your json array, you should simply do like this: var test = json.camp.name
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25177848
has comment: http://stackoverflow.com/comment/39203063
type: Answer

http://stackoverflow.com/comment/39219253
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25186377
has text: I'd like to have the ability to add and delete blank fields for each one.

http://stackoverflow.com/comment/39258648
comment on: http://stackoverflow.com/a/25207575
type: AnswerComment
score: 0
has text: it doesnt provide an api and developer key at current stage :(
type: Comment

http://stackoverflow.com/q/25186043
has comment: http://stackoverflow.com/comment/39218259
upvote count: 4
type: AnsweredQuestion
tagged with: sum
has answer: http://stackoverflow.com/a/25186213
has comment: http://stackoverflow.com/comment/39218467
accepted answer: http://stackoverflow.com/a/25186213
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
score: 4
has comment: http://stackoverflow.com/comment/39218102
has comment: http://stackoverflow.com/comment/39218725
has title: Jquery to sum values of all elements with specific attr value
has body: I have this short menu: Holidays (0) Travel deals (1) Hotel offers (2) Villas offers(1) and this js which has to collect all subcategories values in () and add that sum as (value ) for the main category Holidays: var sum = 0; $('.counter').each(function () { var counter = $(this).html(); var id = $(this).attr('id'); if (counter == 0) { // here I want to find and sum all values in ( ) for span that has attr data equal to 119 which is the id of the main category Holidays sum += parseInt($('span').find("[data='" + id + "']").html(), 10) || 0; alert(sum); //here I want the sum of all subcategories -Holidays ( 4 ) $(this).html(sum); } }); but it doesn't work.. No errors, just doesnt sum correct and returns always 0 Please help with this if you are OK with JS, Here is jsfiddle: http://jsfiddle.net/europe77/w1uL5a8o/1/
favorite count: 0
has comment: http://stackoverflow.com/comment/39218568
has comment: http://stackoverflow.com/comment/39218682

http://stackoverflow.com/comment/39180012
score: 0
has text: Untagging ColdFusion as it's got nothing to do with ColdFusion
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25165201

http://stackoverflow.com/q/25159457
type: Question
tagged with: javascript
tagged with: ejs
upvote count: 1
answer count: 1
tagged with: arrays
favorite count: 0
has answer: http://stackoverflow.com/a/25160101
accepted answer: http://stackoverflow.com/a/25160101
has body: As i am trying to dive into js world, its my first attempt to encounter and learn ejs. Now my problem is i am getting following error: for(i in data.result){ 22| var intime = data.result[i].intime; undefined is not a function and related code goes like following: Project Name Date Login Logout Time Spend <% var fraction = 1000 * 60 * 60; for(i in data.result){ var intime = data.result[i].intime; var outtime = data.result[i].outtime; var difftime = ((outtime.getTime() - intime.getTime()) / fraction); var date = data.result[i].date; %> Ninja <%=date%> <%=intime%> <%=outtime%> <%=difftime%> <% } %> My Attempt: As exception is saying that something is undefined and i am trying to call the function on it, so exception is raised. So to verify this i omiited the whole table tag and added following code only; <%= JSON.stringify(data.result[0].outtime)%> <%= JSON.stringify(data.result[1])%> <%= JSON.stringify(data.result)%> which resulted in "14:44:45" {"empId":3,"projectId":1,"intime":"09:44:45","outtime":"14:44:45","date":"2014-08-05T18:30:00.000Z"} [{"empId":3,"projectId":1,"intime":"09:44:45","outtime":"14:44:45","date":"2014-08-04T18:30:00.000Z"},{"empId":3,"projectId":1,"intime":"09:44:45","outtime":"14:44:45","date":"2014-08-05T18:30:00.000Z"}] Now i am not able to figure out what is the problem and what mistake i am making here. Thanks
tagged with: node.js
has title: undefined is not a function in ejs
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/q/25155319
has body: I wonder if you could help. Just starting using KnockoutJS and I have a problem with populating textboxes based on a selected . I am sure this is very obvious to the well-trained eyes but I can't seem to locate the cause of the problem. Below is my implementation. public class RoleViewModel { public int RoleID { get; set; } public string RoleName { get; set; } public string Description { get; set; } public int ApplicationID { get; set; } public string ApplicationName { get; set; } } public class RoleIndexViewModel { public List<RoleViewModel> RolesList { get; set; } public RoleViewModel Rvm { get; set; } } Index.cshtml below @model ExpensesOrganiser4.ViewModels.RoleIndexViewModel @section scripts{ @Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/jqueryui") } @Html.DisplayNameFor(model => model.Rvm.RoleName) @Html.DisplayNameFor(model => model.Rvm.Description) @Html.DisplayNameFor(model => model.Rvm.ApplicationName) @foreach (var item in Model.RolesList) { @Html.DisplayFor(modelItem => item.RoleName) @Html.DisplayFor(modelItem => item.Description) @Html.DisplayFor(modelItem => item.ApplicationName) } Role ID: Role Name: Role Description: Application: Definition for Knockout var RoleVM = { EditFields: ko.observable(false), ReadOnlyMode: ko.observable(true), DisplayEditRoleButton: ko.observable(true), DisplayUpdateRoleButton: ko.observable(false), RoleID: ko.observable($("#RoleID").val()), RoleName: ko.observable($("#RoleName").val()), OriginalRoleName: ko.observable($("#RoleName").val()), Description: ko.observable($("#Description").val()), OriginalDescription: ko.observable($("#Description").val()), ApplicationName: ko.observable($("#ApplicationName").val()), OriginalApplicationName: ko.observable($("#ApplicationName").val()), MessageBox: ko.observable(""), SelectedRow: ko.observable(), GetSelectedRole: function (roleData) { RoleVM.RoleID(roleData.RoleID); RoleVM.RoleName(roleData.RoleName); RoleVM.Description(roleData.Description); RoleVM.Applicatio…
favorite count: 0
tagged with: asp.net-mvc-4
upvote count: 1
has answer: http://stackoverflow.com/a/25157106
type: AnsweredQuestion
tagged with: c#
has title: Populate textbox using knockout "data-bind=click"
score: 1
accepted answer: http://stackoverflow.com/a/25157106
tagged with: knockout.js
type: Question
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39162450
tagged with: javascript
has answer: http://stackoverflow.com/a/25155769
has comment: http://stackoverflow.com/comment/39163661
possible better answer: http://stackoverflow.com/a/25155769

http://stackoverflow.com/q/25203124
linked to: http://stackoverflow.com/q/17992578
has answer: http://stackoverflow.com/a/47657303
score: 281
has answer: http://stackoverflow.com/a/52344173
has comment: http://stackoverflow.com/comment/39249723
has answer: http://stackoverflow.com/a/63289147
has answer: http://stackoverflow.com/a/59176202
has title: How to get base url with jquery or javascript?
has answer: http://stackoverflow.com/a/25204351
has answer: http://stackoverflow.com/a/27944062
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/49299675
has answer: http://stackoverflow.com/a/63517061
has answer: http://stackoverflow.com/a/25203434
has comment: http://stackoverflow.com/comment/39418045
has answer: http://stackoverflow.com/a/50596887
has answer: http://stackoverflow.com/a/70657337
has answer: http://stackoverflow.com/a/43108346
has answer: http://stackoverflow.com/a/25205643
has answer: http://stackoverflow.com/a/48597186
has answer: http://stackoverflow.com/a/58549933
has answer: http://stackoverflow.com/a/25203231
has answer: http://stackoverflow.com/a/50502667
has comment: http://stackoverflow.com/comment/39249684
has answer: http://stackoverflow.com/a/54505988
type: Question
has comment: http://stackoverflow.com/comment/81529867
answer count: 25
has answer: http://stackoverflow.com/a/56025841
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/59417011
favorite count: 0
has body: In joomla php there I can use $this-&gt;baseurl to get the base path, but I wanted to get the base path in jquery. The base path may be any of the following example: http://www.example.com/ http://localhost/example http://www.example.com/sub/example The example may also change.
upvote count: 281
has answer: http://stackoverflow.com/a/49300325
has answer: http://stackoverflow.com/a/52163517
has answer: http://stackoverflow.com/a/65325906
has answer: http://stackoverflow.com/a/47112123
has answer: http://stackoverflow.com/a/48670071

http://stackoverflow.com/comment/39146211
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25123593
has text: Third, have you put a console.log in your .then in your service so you can see what response2 contains?
score: 0

http://stackoverflow.com/q/25159306
has answer: http://stackoverflow.com/a/25159328
type: UnansweredQuestion
downvote count: 3
type: Question
has body: I would like to know how to save the output of this into a "var a=" navigator.plugins.refresh(false); var numPlugins = navigator.plugins.length; for (var i = 0; i &lt; numPlugins; i++){ var plugin = navigator.plugins[i]; if (plugin) { document.write(plugin.name + plugin.description + plugin.filename) } }
score: -3
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: How to save this in a JS variable?

http://stackoverflow.com/comment/39246302
score: 0
type: Comment
type: QuestionComment
has text: .me { -webkit-animation: rotation 2s infinite linear; -moz-animation: rotation 2s infinite linear; height:2%; width:3%; } @-webkit-keyframes rotation { from {-webkit-transform: rotate(0deg);} to {-webkit-transform: rotate(359deg);} }
comment on: http://stackoverflow.com/q/25201257

http://stackoverflow.com/comment/39249247
has text: Thank you for you answer, Philipp. Could you explain (maybe by example) how this map reduce would look like. As you could've guessed, I'm not really experienced with this.
type: AnswerComment
comment on: http://stackoverflow.com/a/25202603
type: Comment
score: 2

http://stackoverflow.com/comment/39218102
type: Comment
type: QuestionComment
has text: Try using `.val()` or `.text()` instead of `.html()`
score: 0
comment on: http://stackoverflow.com/q/25186043

rundll32
tags question: http://stackoverflow.com/q/25131484
tag name: rundll32
type: Tag

http://stackoverflow.com/q/25096116
tagged with: php
type: Question
score: 0
answer count: 1
tagged with: yii
tagged with: javascript
tagged with: jquery
tagged with: ajax
has title: Yii framework: Save uploaded file
has body: I'm using Yii framework for developing website. Here, I have a problem in save image file which uploaded to server. Here is the code which I used for uploading image. &lt;input type="file" onChange="uploadImage(this);"&gt; function uploadImage(obj) { var request_url = server_url + "uploadImage"; var formData = new FormData(); formData.append("photo", obj.files[0]); $.ajax({ url: request_url, type: 'POST', data: formData, processData: false, contentType:false }); } And in server part, I can see the file has uploaded but can't get the file. public function actionUploadImage() { if (ISSET($_FILES['photo'])) { var_dump('is set photo'); $temp = CUploadedFile::getInstanceByName('photo'); var_dump($temp); } } It returns "is set photo" and "array(0){}". Please help me.
has answer: http://stackoverflow.com/a/25096413
type: UnansweredQuestion

http://stackoverflow.com/a/25194250
score: 1
has body: Try this code : Option Explicit Const TriStateTrue = -1 ' Pour la prise en charge de l'Unicode Dim URL,ie,Titre,objFSO,ws,strFileHTML,strFileTxt,strFileHTMLAscii Dim objHTMLFile,objTxtFile,strFileTxtAscii,DataHTML,DataTxt URL = InputBox("Entrez l'URL pour y extraire son Code Source HTML "&amp;vbcr&amp;vbcr&amp;_ "Exemple ""http://www.google.fr""","Extraction du Code Source © Hackoo © 2014",_ "http://stackoverflow.com/questions/25193018/getting-web-content-that-has-javascript-using-vbscript") If URL = "" Then WScript.Quit Titre = "Extraction du Code Source de " &amp; URL Set ie = CreateObject("InternetExplorer.Application") Set objFSO = CreateObject("Scripting.FileSystemObject") strFileHTML = "CodeSourceHTML.txt" strFileTxt = "CodeSourceTxt.txt" strFileHTMLAscii = "SourceCodeHTML.txt" strFileTxtAscii = "SourceCodeTxt.txt" ie.Navigate(URL) ie.Visible=false DO WHILE ie.busy wscript.sleep 100 LOOP '***********************To Get Data in HTML mode**************************** DataHTML = ie.document.documentElement.innerHTML DataTxt = ie.document.documentElement.innerText Set objHTMLFile = objFSO.OpenTextFile(strFileHTML, 2, True, TriStateTrue) objHTMLFile.WriteLine(Titre&amp;vbcr&amp;String(120,"*")) objHTMLFile.WriteLine(DataHTML) objHTMLFile.Close '************************To Get Data in Texte mode************************** Set objTxtFile = objFSO.OpenTextFile(strFileTxt, 2, True, TriStateTrue) objTxtFile.WriteLine(Titre&amp;vbcr&amp;String(120,"*")) objTxtFile.WriteLine(DataTxt) objTxtFile.Close ie.Quit Set ie=Nothing Call Convert(strFileTxt,strFileTxtAscii) objfso.DeleteFile strFileTxt Call Ouvrir(strFileTxtAscii) Call Convert(strFileHTML,strFileHTMLAscii) objfso.DeleteFile strFileHTML Call Ouvrir(strFileHTMLAscii) wscript.Quit '************************************************************************* Function Ouvrir(File) Dim ws Set ws=CreateObject("wscript.shell") ws.run "Notepad.exe "&amp; File,1,True end Function '****************************************************…
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39248228
has comment: http://stackoverflow.com/comment/39263225
has comment: http://stackoverflow.com/comment/39263320
type: Answer
accepted answer of: http://stackoverflow.com/q/25193018
downvote count: 0
has comment: http://stackoverflow.com/comment/39331533
answers question: http://stackoverflow.com/q/25193018

http://stackoverflow.com/a/25206913
has body: Here is some code for the 2-async approach: async.each(openFiles, function( file, callback) { async.each([task1, task2], function(task, cb) { task(file); // exec tasks 1, 2 cb(); // one completed }, callback); // both completed }, function(err){ console.log("done"); });
has comment: http://stackoverflow.com/comment/39257652
score: 0
answers question: http://stackoverflow.com/q/25206610
type: Answer

http://stackoverflow.com/comment/39225350
type: AnswerComment
comment on: http://stackoverflow.com/a/25188415
type: Comment
has text: do I need to repeat the entire piece for the other field, or just call the button again?
score: 0

http://stackoverflow.com/q/25087009
has body: I want to download a file which is created from DOM element. So a user clicks a button on web page and it invokes a javascript method which may grab the contents of DOM element and prompt user for download. I am able to grab contents of the DOM element inside a Javascript Var. But not sure how to proceed further. For grabbing the DOM element i am using: var elem = document.getElementById("userDownload");
score: 3
upvote count: 3
tagged with: dom
type: Question
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/28020434
favorite count: 0
has answer: http://stackoverflow.com/a/25087107
type: UnansweredQuestion
has title: Trigger a file download on click of button Javascript with contents from DOM
has comment: http://stackoverflow.com/comment/39034490
has answer: http://stackoverflow.com/a/25088995

http://stackoverflow.com/comment/39149607
type: QuestionComment
has text: @btf217 It's a bit confusing because your print function actually assigns a value to a member of the user, what is the main goal of your function here?
score: 0
comment on: http://stackoverflow.com/q/25148354
type: Comment

http://stackoverflow.com/comment/39078564
type: Comment
type: QuestionComment
has text: For jsfiddle to work like that you need "No wrap" enabled. I've updated it for you http://jsfiddle.net/4tD5M/7/ notice now the logging statements are working in the console
comment on: http://stackoverflow.com/q/25110166
score: 0

http://stackoverflow.com/q/25114882
has comment: http://stackoverflow.com/comment/39085923
tagged with: javascript
has answer: http://stackoverflow.com/a/25115043
has title: Arrange objects by property with specific order using javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25115031
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25115031
has body: Is there a way that I could arrange an array of objects according to a certain property whose order is based on an external array (not just alphabetically, numerically, etc.)? For example, let's say I have a temporary array: var tempArray = ["b", "a", "d", "c"]; and an array of objects: var objectArray = [ { name: "John", section: "a" }, { name: "Joe", section: "b" }, { name: "Mike", section: "c" }, { name: "Mark", section: "d"} ]; Can I rearrange objectArray so that the object order would follow the contents of tempArray hence returning objectArray as: objectArray = [ { name: "Joe", section: "b" }, { name: "John", section: "a" }, { name: "Mark", section: "d" }, { name: "Mike", section: "c"} ]; // desired output Any help is very much appreciated.
accepted answer: http://stackoverflow.com/a/25115043
score: 0
tagged with: object

http://stackoverflow.com/q/25158445
has answer: http://stackoverflow.com/a/25158600
has comment: http://stackoverflow.com/comment/39166548
type: AnsweredQuestion
has title: Get selected radio button value in javascript
has answer: http://stackoverflow.com/a/25158512
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39166515
tagged with: javascript
has body: I have dynamically created radio buttons and have assigned them ids. Now when i try, function updateAO(id2) { var status = $('input[name=id2]:checked').val(); alert(status); } It prints undefined. Can anyone please tell how to get this value. Thanks in advance!!
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25158512
possible better answer: http://stackoverflow.com/a/25158493
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25158493
tagged with: css

http://stackoverflow.com/a/44007538
has body: I know I am a bit late to the party but I had the same problem and that's how I got here. After I did some research, I fell that the answer is a bit incomplete. In case that first parameter is an application setting, the following table must be read. Property -> Type -> Description case sensitive routing -> Boolean -> Enable case sensitivity. When enabled, "/Foo" and "/foo" are different routes. When disabled, "/Foo" and "/foo" are treated the same. env -> String -> Environment mode. Be sure to set to "production" in a production environment; see Production best practices: performance and reliability. process.env.NODE_ENV (NODE_ENV environment variable) or “development” if NODE_ENV is not set. etag -> Varied -> Set the ETag response header. For possible values, see the etag options table. jsonp callback name -> String -> Specifies the default JSONP callback name. json replacer -> Varied -> The 'replacer' argument used by JSON.stringify. NOTE: Sub-apps will inherit the value of this setting. json spaces -> Varied -> The 'space' argument used by JSON.stringify. This is typically set to the number of spaces to use to indent prettified JSON. NOTE: Sub-apps will inherit the value of this setting. query parser -> Varied -> Disable query parsing by setting the value to false, or set the query parser to use either “simple” or “extended” or a custom query string parsing function. The simple query parser is based on Node’s native query parser, querystring. The extended query parser is based on qs. A custom query string parsing function will receive the complete query string, and must return an object of query keys and their values. strict routing -> Boolean -> Enable strict routing. When enabled, the router treats "/foo" and "/foo/" as different. Otherwise, the router treats "/foo" and "/foo/" as the same. NOTE: Sub-apps will inherit the value of this setting. subdomain offset -> Number -> The number of dot-separated parts of the host to remove to access subdomain. trust prox…
upvote count: 8
type: Answer
score: 8
has comment: http://stackoverflow.com/comment/84898955
answers question: http://stackoverflow.com/q/25229129
downvote count: 0

http://stackoverflow.com/q/25176300
type: Question
tagged with: arangodb
has title: Storing functions in ArangoDB documents as plain text
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25177118
upvote count: 2
answer count: 1
has body: I would like to be able to store functions in ArangoDB documents. From what I have seen, this is actually possible, since user-defined AQL functions seem to be stored that way, as plain strings. My question goes in that direction: how are those strings converted to callable functions afterwards? Right now I found a working solution which I don't really like (eval usage seems to be discouraged). I am looking for a better solution. I can store functions and use them afterwards in the following way: var fnString = "['a','b', function(a,b) { return a + b }]"; var fn = Function.apply(null, eval(fnString)); var someValue = fn(1,2) //returns 3 Is there out a better way to achieve this?
favorite count: 0
has answer: http://stackoverflow.com/a/25177118
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39200652

http://stackoverflow.com/q/25104358
linked to: http://stackoverflow.com/q/10081593
has comment: http://stackoverflow.com/comment/39066590
downvote count: 0
tagged with: javascript
favorite count: 0
has title: JavaScript object instantiation options
has answer: http://stackoverflow.com/a/25104462
has answer: http://stackoverflow.com/a/25104397
type: UnansweredQuestion
has body: Given: function MyCtor() {} var myInstance = new MyCtor(); //myInstance.constructor ==== MyCtor var MyCtor = function() {} var myInstance = new MyCtor(); //myInstance.constructor ==== Function If you instantiate an object using the former pattern the constructor is "more meaningful". Is one of these approaches preferred? Are there circumstances where one is more idiomatic?
linked to: http://stackoverflow.com/q/336859
has comment: http://stackoverflow.com/comment/39066433
upvote count: 5
has comment: http://stackoverflow.com/comment/39066367
type: Question
answer count: 2
score: 5

http://stackoverflow.com/q/25112233
tagged with: http://stackoverflow.com/tag/html
has title: Javascript Displaying screen-wide version from thumbnail image onclick
has answer: http://stackoverflow.com/a/25112252
type: AnsweredQuestion
has body: I have a set of thumbnail images which I want, upon clicking one, to display nicely a screen-wide version of it, greying the rest of the site, until another click is made. I have seen a few website doing it but have not been lucky for the past few days. I do use HTML Bootstrap (for the time being anyway) for this website and therefore use jQuery as well. I am sure there is an easy way to do so but Javascript is just not my language and I seem to not be good at searching for it ^^' In any case, thanks for your help.
has comment: http://stackoverflow.com/comment/39081185
tagged with: image
type: Question
accepted answer: http://stackoverflow.com/a/25112252
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/25175000
answers question: http://stackoverflow.com/q/25174934
has body: This would be easy to understand: if(a &lt; b){ return -1; } else if( a &gt; b){ return 1; } else { return 0; }
score: 0
type: Answer

http://stackoverflow.com/a/25228033
answers question: http://stackoverflow.com/q/25218684
score: 0
has body: This makes no sense at all: CKEDITOR.instances.MyToolbar.getData() == 0 I guess you wanted to do: CKEDITOR.instances.MyToolbar.getData().length == 0
type: Answer

http://stackoverflow.com/comment/39020347
score: 0
type: Comment
has text: `array` is a reference to an array object. When it's passed to a function, it's the reference that's copied, not the array. The call to `shift` modifies the same array that's referenced from every function. This doesn't happen with numbers because they're either primitive or immutable. Overwriting array with a copy of itself gives each function its own copy which can be mutated without affecting the others.
comment on: http://stackoverflow.com/a/25071152
type: AnswerComment

http://stackoverflow.com/a/25109802
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25109691
has body: function loadData() { $.getJSON('data.json', function(data) { window.data = data; // Data loaded }); } function search(query) { var output=" Search results for " + query + " "; for (var i in data.places) { // consider jQuery.each for (var ind in data.places[i].service[0].type) { if (data.places[i].service[0].type[ind].name == query) { output+=" " + data.places[i].name + " "; } else {} }; }; $('#main').html(output); } $(document).ready(function() { // Choose which data to load propably? loadData(); // Load data when you're ready // and anything else }); $('#fetch form').on('submit', function() { var query = $('#query').val(); search(query); // Call search function whenever you want, using any query });

http://stackoverflow.com/q/25229509
tagged with: jquery
has body: I am trying to work with SignalR and JavaScript and I came across the error "Uncaught TypeError: Undefined", which I don't understand. Below is the code which is causing the problem. HTML Send Message Message Code public class Chat : Hub { public void Send(string message) { Clients.All.broadcastMessage(message); } }
has comment: http://stackoverflow.com/comment/39299519
has answer: http://stackoverflow.com/a/25229751
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25229788
has comment: http://stackoverflow.com/comment/39299560
has title: Uncaught TypeError: undefined is not a function
type: Question
tagged with: c#
tagged with: javascript
score: 0
answer count: 2

http://stackoverflow.com/a/25133889
type: Answer
has comment: http://stackoverflow.com/comment/39121712
has body: Because .* matches a zero-length string. At the end of the string, it can always match this again.
upvote count: 2
has comment: http://stackoverflow.com/comment/39121389
accepted answer of: http://stackoverflow.com/q/25133843
score: 2
answers question: http://stackoverflow.com/q/25133843
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39121725

http://stackoverflow.com/comment/39244657
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25200235
type: QuestionComment
has text: I'm guessing you're trying to scan other domains than your own, and javascript has a same origin policy

content-length
type: Tag
tag name: content-length
tags question: http://stackoverflow.com/q/25170898

http://stackoverflow.com/a/25321509
answers question: http://stackoverflow.com/q/25142111
score: 0
has body: This is my code, it might not be the best approach but at least it's working. Hope this could help you a bit. FabricOrder Model Ext.define('MyApp.model.FabricOrder', { extend: 'Ext.data.Model', requires: [ 'MyApp.model.SizeInfo' ], fields: [ {name: '_id', type: 'string'}, {name: 'styleno', type: 'string'}, {name: 'modelname', type: 'string'}, {name: 'colour', type: 'string'}, {name: 'contractno', type: 'string'}, {name: 'total', type: 'int'}, {name: 'deliverydate', type: 'date', dateFormat: 'Y-m-d'}, {name: 'comment', type: 'string'} ], hasMany: [{ model: 'MyApp.model.SizeInfo', name: 'sizes' // This is not working in Extjs 5.0.0 //storeConfig: { // autoSync: true, // proxy: {//etc.} //} }], idProperty: '_id' }); SizeInfo Model Ext.define('MyApp.model.SizeInfo', { extend: 'Ext.data.Model', fields: [ {name: 'size', type: 'string'}, {name: 'amount', type: 'int'} ] }); ViewModel Ext.define('MyApp.view.fabric.FabricModel', { extend: 'Ext.app.ViewModel', requires: [ 'MyApp.model.FabricOrder' ], alias: 'viewmodel.fabric', data: { }, stores: { fabricOrders: { model: 'MyApp.model.FabricOrder', pageSize: 20, proxy: { type: 'ajax', actionMethods: { create: 'POST', read: 'POST', update: 'POST', destroy: 'POST' }, api: { create: '/createFabricOrder', read: '/loadFabricOrder', update: '/updateFabricOrder', destroy: '/deleteFabricOrder' }, reader: { type: 'json', rootProperty: 'fabricorders', totalProperty: 'total' } }, autoSync: true, autoLoad: {start: 0, limit: 20}, onCreateRecords: function(records, operation, success) { console.log(records); }, onUpdateRecords: function(records, operation, success) { // If update failed, reject all changes if(!success) { // Call rejectChanges method of the store this.rejectChanges(); Ext.Msg.show({ title: 'Update Failed', message: 'The changes you have made are rejected.', buttons: Ext.Msg.OK, icon: Ext.Msg.ERROR }); } }, onDestroyRecords: function(records, operation, success) { console.log(records); } }, sizeInfos: { model: 'MyApp.model.Size…
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25142111

http://stackoverflow.com/a/25167212
score: 0
has body: $.ajax({ type: "POST", url: "check_id.php", data: { id:id; //the id requested by the user.You should set this }, dataType: "json", success: function(data){ $('#chkresult').html(data); } }, failure: function(errMsg) { alert(errMsg); } }); In your php &lt;?php require 'connect.php'; $id_query = mysql_query("SELECT COUNT(*) AS TOTAL FROM `Table4` WHERE `Unique ID` = '$id'"); list ($total) = mysql_fetch_row($id_query); if ($total == 0) { header('Content-type: application/json'); echo CJavaScript::jsonEncode('Available'); } else if ($total &gt; 0) { header('Content-type: application/json'); echo CJavaScript::jsonEncode('Not available'); } ?&gt;
has comment: http://stackoverflow.com/comment/39276456
answers question: http://stackoverflow.com/q/25167047
type: Answer
has comment: http://stackoverflow.com/comment/39280838

http://stackoverflow.com/q/25169354
favorite count: 0
tagged with: angularjs
has body: I want to disable all of the form elements in a large form with many tabs when a certain condition is true. I could use something like &lt;input ng-disabled="myCondition()"&gt; but I'd need to add that in quite a few places and that seems like bad code duplication. After some consideration I decided to go with the following in my controller. (I'm using coffeescript btw) $scope.$watch 'myCondition()', -&gt; if $scope.myCondition() $('.my-form').find('input, select, textarea').attr('disabled', true) else $('.my-form').find('input, select, textarea').attr('disabled', false) This works but it seems brittle. If for example I have some other reason that a form element will need to be conditionally disabled then this may behave strangely. What is the correct way to do this. Does it have to do with $compile?
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/25169747
has title: applying angular directives to a set of elements
has answer: http://stackoverflow.com/a/25169561
accepted answer: http://stackoverflow.com/a/25169561
type: Question
has answer: http://stackoverflow.com/a/25169747
answer count: 2
upvote count: 1
tagged with: javascript

http://stackoverflow.com/comment/39269926
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25213297
has text: I'm pretty irrational I guess. edit: didn't mean to post this so soon so continued: I'm making myself a small app that takes images that I've dragged and dropped into the webpage and will use tagging etc. I don't need to save it to a database. To be honest I could do this in many simpler ways. My aim is to use an event listener to grab the file when it's dropped and use it. I just thought that jQuery would be a little bit easier and this problem seems so minor it was irritating me.

http://stackoverflow.com/comment/39275848
comment on: http://stackoverflow.com/q/25197171
score: 0
type: QuestionComment
type: Comment
has text: As you recommended, use proj4 to convert it to [this](http://jsonblob.com/53e5db51e4b0bab7bd401bda),will this data work?

http://stackoverflow.com/comment/39070522
has text: Thanks wrote that on a train ride without testing :)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25106247

http://stackoverflow.com/q/25218296
type: UnansweredQuestion
has body: I have a simple little javascript count up timer on my page that I want to tweak, but really don't know where to begin. The goal is that instead of it counting straight up in timed intervals is to have it jump randomly upward. for example, if my timer is showing 100 and is set to increase again in 1 second, instead of it showing 101, I want it to show some random number between 101 &amp; 106. Any nods in the right direction would be greatly appreciated. I appreciate the help you guys gave me (posts 1&amp;2) ... but i'm still missing it somehow. Here is the link to what i currently have... http://jsfiddle.net/FQSAH/19/ As you see it run, it's moving up by 1, but i'm wanting it to move up by a random number between 1&amp;5 each time.
type: Question
has title: Twisted count up timer
score: 0
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25218317
has answer: http://stackoverflow.com/a/25218338
tagged with: timer

http://stackoverflow.com/comment/39061039
has text: @Drew. Can you do it in jsfiddle and comment the link please.
type: AnswerComment
comment on: http://stackoverflow.com/a/25101394
score: 0
type: Comment

http://stackoverflow.com/q/25108574
has body: For future viewers, I was able to solve it by using mesh.material.map.image.src = texture; Original question: As part of my ThreeJS project, I need to change the texture on a mesh. Unfortunately, I can't get Three to update to the new texture. I've tried all the things mentioned in the following SO questions, but nothing has worked so far: three.js change texture on material How to update texture in ThreeJS with loaded image data? Three.js Update Texture image Changing texture and color on Three.js collada object and more... The texture that I am trying to change is scene.children[0].children[1].material.map.sourceFile and the structure looks like this: SCENE scene 3DOBJECT banner MESH flag MESHBASICMATERIAL flag_M TEXTURE flag_MT flag_MT texture is the one I want to update and these are the following methods I've tried: flag_M.needsUpdate = true; flag_MT.needsUpdate = true; flag_MT = THREE.ImageUtils.loadTexture(texture); with texture being a base64 data string practically remaking the entire object and replacing that into the scene Thanks. Edit: The important parts of code: init() flag_MT = THREE.ImageUtils.loadTexture(app.setFlagTexture()); flag_MT.magFilter = THREE.NearestFilter; flag_MT.minFilter = THREE.NearestFilter; flag_M = new THREE.MeshBasicMaterial({map: flag_MT}); flag_M.needsUpdate = true; flag_T = { //easyVectory64 just provides a clean function for making vector maps u: easyVector64(2, 62, 20, 1), //up face d: easyVector64(22, 62, 20, 1), //down face f: easyVector64(1, 23, 20, 40), //front face b: easyVector64(22, 23, 20, 40), //back face l: easyVector64(0, 23, 1, 40), //left face r: easyVector64(41, 23, 1, 40)}; //right face flag_G.faceVertexUvs[0] = []; //Map texture to mesh flag_G.faceVertexUvs[0][0] = [flag_T["r"][0], flag_T["r"][1], flag_T["r"][3]]; flag_G.faceVertexUvs[0][1] = [flag_T["r"][1], flag_T["r"][2], flag_T["r"][3]]; flag_G.faceVertexUvs[0][2] = [flag_T["l"][0], flag_T["l"][1], flag_T["l"][3]]; flag_G.faceVertexUvs[0][3] = [flag_T["l"]…
accepted answer: http://stackoverflow.com/a/25119173
downvote count: 0
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/15025319
has title: Update texture map in ThreeJS
tagged with: three.js
type: AnsweredQuestion
upvote count: 3
linked to: http://stackoverflow.com/q/13583103
type: Question
score: 3
linked to: http://stackoverflow.com/q/18436431
linked to: http://stackoverflow.com/q/23718005
tagged with: javascript
has answer: http://stackoverflow.com/a/25119173

http://stackoverflow.com/q/25194457
tagged with: typeerror
tagged with: flexslider
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39238275
accepted answer: http://stackoverflow.com/a/25196821
type: Question
has comment: http://stackoverflow.com/comment/39234201
has title: JS error after AJAX get/load
has body: i have a wordpress blog where i have post with a flexslider (plugin's name is meta slider). Now i have a page on that blog that loads a div's content dynamically with AJAX from posts. code is the following: $(".post-link").click(function(){ var post_link = $(this).attr("href"); $("#refpage-single-post-container").html("content loading"); $.get(post_link, function(result){ $result = $(result); $result.find('div.entry-content').appendTo('#refpage-single-post-container'); $result.find('script').appendTo('#refpage-single-post-container'); }, 'html'); //e.preventDefault(); return false; }); This basically works fine, but the slider JS afterwards is failing with the following error: (VM error from Chrome) Uncaught TypeError: undefined is not a function VM4036:3 metaslider_531 VM4036:3 timer_metaslider_531 VM4036:18 (anonymous function) VM4036:20 (anonymous function) The following is the slider script (begins with an empty line): var metaslider_531 = function($) { --&gt; $('#metaslider_531').flexslider({ slideshowSpeed:3000, animation:"fade", controlNav:true, directionNav:false, pauseOnHover:true, direction:"horizontal", reverse:false, animationSpeed:600, prevText:"&amp;lt;", nextText:"&amp;gt;", slideshow:true }); }; var timer_metaslider_531 = function() { var slider = !window.jQuery ? window.setTimeout(timer_metaslider_531, 100) : !jQuery.isReady ? window.setTimeout(timer_metaslider_531, 1) : metaslider_531(window.jQuery); }; timer_metaslider_531(); So the question to me is: How i can fix this? Can i re-init that JS somehow? To me it looks like the .flexslider function call fails because the prototype is not set on that (new) html div with the id $('#metaslider_531'), thus being "Undefined"(?). Wild guess, perhaps. What i checked out is which versions of jQuery might be loaded, but it looks only v1.11.0 is loaded once, so i should be "conflict free". I am quite new to JS and AJAX, so any help lifting the fog in my brain would be appreciated. :)
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25195569
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25195569
tagged with: ajax
has answer: http://stackoverflow.com/a/25196821

http://stackoverflow.com/comment/39269616
has text: debugging does not mean "check for error flags", it meany you have to use echo/var_dump/whatever to...well...debug ;) - and again, you are still using FB.api in your code, without any page token. make sure not to just copy code, you need to understand what you are doing and when to use javascript and php and all that jazz.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25210316

http://stackoverflow.com/q/25107177
score: 0
has comment: http://stackoverflow.com/comment/39071757
has body: I want to sort four dimensional array based on 1 column by using following method, var main_arr = [ [] ]; var hdnFromValues = [11,16,12,17,14,18,15]; var hdnToValues = [12,17,13,18,15,19,16]; var hdnSPIDs = [11,12,13,14,0,0,0]; var hdnFlag = [D,E,E,D,A,A,A]; for (var j = 0; j &lt; hdnFromValues.length; j++) { var temp_arr = []; var HdnToValue; temp_arr.push(hdnFromValues[j]); temp_arr.push(hdnToValues[j]); temp_arr.push(hdnSPIDs[j]); temp_arr.push(hdnFlag[j]); main_arr.push(temp_arr); temp_arr = null; } main_arr.sort(sort_by_col); hdnFrom = ""; hdnTo = ""; spid = ""; flags = ""; for (var i = 1; i &lt; main_arr.length; i++) { hdnFrom = hdnFrom.concat(main_arr[i][0], ","); hdnTo = hdnTo.concat(main_arr[i][1], ","); spid = spid.concat(main_arr[i][2], ","); flags = flags.concat(main_arr[i][3], ","); } hdnFrom = hdnFrom.substring(0, hdnFrom.length - 1); hdnTo = hdnTo.substring(0, hdnTo.length - 1); spid = spid.substring(0, spid.length - 1); flags = flags.substring(0, flags.length - 1); alert(hdnFrom); alert(hdnTo); alert(spid); alert(flags); function sort_by_col(a, b) { return a[0] - b[0]; } Sometimes, 3 &amp; 4th column not arranging correctly as per 1st column. Will someone help me? JSFilddle
has title: Sorting Four Dimensional array - Javascript
answer count: 1
has comment: http://stackoverflow.com/comment/39071668
has comment: http://stackoverflow.com/comment/39072019
tagged with: jquery
has answer: http://stackoverflow.com/a/25157606
has comment: http://stackoverflow.com/comment/39071946
has comment: http://stackoverflow.com/comment/39071890
linked to: http://stackoverflow.com/q/1129216
tagged with: multidimensional-array
has comment: http://stackoverflow.com/comment/39071719
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39072105
has comment: http://stackoverflow.com/comment/39071602
has comment: http://stackoverflow.com/comment/39072823
accepted answer: http://stackoverflow.com/a/25157606
type: Question
has comment: http://stackoverflow.com/comment/39071588
tagged with: javascript

http://stackoverflow.com/q/25170702
has title: Get specific array value
type: Question
has body: var stored = [{subject:"farm",name:"John Doe"}, {subject:"steam",name:"Michael Buck"}, {subject:"finance",name:"Ron Ruckle"}, //need this {subject:"geo",name:"Ben Bond"}]; I need to get an specific array value. I know it is possible to do this: getitem = stored[2]["name"]; but since I don't know the row, only the first item's value I need something like this: getitem = stored["subject:finance"]["name"];
tagged with: arrays
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25170724
possible better answer: http://stackoverflow.com/a/25170780
has answer: http://stackoverflow.com/a/25170780
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25170724

http://stackoverflow.com/comment/39055389
type: AnswerComment
has text: if (window.event.keyCode == 8) table.rows[i].style.display = 'table-row';
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25098039

http://stackoverflow.com/a/25199619
type: Answer
score: 2
has body: According to MDN it uses strict comparison. The program first looks for a case clause whose expression evaluates to the same value as the input expression (using strict comparison, ===) and then transfers control to that clause, executing the associated statements.
downvote count: 0
answers question: http://stackoverflow.com/q/25199560
upvote count: 2

http://stackoverflow.com/comment/68034073
type: Comment
has text: the link to the compress tool is broken
comment on: http://stackoverflow.com/a/35272479
score: 7
type: AnswerComment

http://stackoverflow.com/comment/39251217
type: Comment
has text: Change `i + 3` in `i+= 3`
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25203845

http://stackoverflow.com/q/25194344
type: Question
has answer: http://stackoverflow.com/a/25235023
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39306940
score: 0
accepted answer: http://stackoverflow.com/a/25235023
tagged with: requirejs
has body: My example code looks like this: /*global define, require*/ define('api', ['app'], function (app) { 'use strict'; return { init: function () { app.init(); } }; }); (function () { 'use strict'; var newrequire, requireConfig = { baseUrl: 'http://localhost/app/' }; newrequire = require.config(requireConfig); newrequire(['api'], function (api) { api.init(); }); })(); But I noticed that in some cases (app being big JS file, and server or internet connection is slow) it throws me an error: Uncaught TypeError: Cannot read property 'init' of undefined Basically I want to be 100% sure if I can trust, that api module is fully loaded and ready to use (not only defined), when I need it inside my immediate function.
type: AnsweredQuestion
has title: Is it safe to use asynchronous loading with RequireJS to define a module, and use it right after in immediate function?
has comment: http://stackoverflow.com/comment/39233962

http://stackoverflow.com/q/25101953
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25101989
has answer: http://stackoverflow.com/a/25101989
has title: Jquery - detect and get the url from text using jquery
has answer: http://stackoverflow.com/a/25102031
has comment: http://stackoverflow.com/comment/39061961
accepted answer: http://stackoverflow.com/a/25102031
type: AnsweredQuestion
has body: I have textarea and I want to detect when the user will finish TYPING or PASTING a url. I want to catch that url an send it to php. I looked at many solutions from google, but they all seems to add a anchor tag around the link which I don't want to do. I tried using this regexp I found in a solution on this website, but it did not work: /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&amp;%@!\-\/]))?/ the problem with it is that as soon I type something like http://, it will automatically send that string only. I don't want to write a regexp with finite list of TLDs. What ways can I archive this? this is the code: $(document).ready(function() { $('#write-post-textarea').keyup(function() { if(isUrl($(this).val())){ //Show the url in an alert box alert($(this).val()); }else{ //do something if its not a url } }); function isUrl(s) { //var regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&amp;%@!\-\/]))?/ return regexp.test(s); } });
type: Question
tagged with: javascript
score: 0
answer count: 2

dom-events
tags question: http://stackoverflow.com/q/25132864
tags question: http://stackoverflow.com/q/25205839
tags question: http://stackoverflow.com/q/25100987
tags question: http://stackoverflow.com/q/25212531
tags question: http://stackoverflow.com/q/25101943
type: Tag
tags question: http://stackoverflow.com/q/25164625
tags question: http://stackoverflow.com/q/25177704
tags question: http://stackoverflow.com/q/25182408
tag name: dom-events
tags question: http://stackoverflow.com/q/25150038
tags question: http://stackoverflow.com/q/25185512

http://stackoverflow.com/comment/39131157
has text: awesome :), i'm sure i'll have some questions when i take a better look at it.
type: Comment
comment on: http://stackoverflow.com/a/25133627
score: 0
type: AnswerComment

http://stackoverflow.com/q/25224327
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39289691
linked to: http://stackoverflow.com/q/10934234
tagged with: external
favorite count: 0
has title: External JavaScript does not work with jquery
linked to: http://stackoverflow.com/q/2486832
type: AnsweredQuestion
score: -5
has answer: http://stackoverflow.com/a/25224396
possible better answer: http://stackoverflow.com/a/25224521
has answer: http://stackoverflow.com/a/25224521
has comment: http://stackoverflow.com/comment/39289703
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/4643990
upvote count: 0
downvote count: 5
tagged with: javascript
tagged with: jquery
has body: I wrote a small page with jQuery and an external .js file. But it won't load the jQuery part. Here my Code: Oh my Goood... testText And here is my external Script: alert("no jQuery"); $("button#testBtn").click(function(){ alert("Works!"); }); As you can see, jQuery will load before all other scripts. The alert pops up fine. But if I click the button, nothing happens. If I put the script inside the html document directly, the button event works as expected. I reviewed these questions: Link and Link. But still not working as expected.
accepted answer: http://stackoverflow.com/a/25224396

http://stackoverflow.com/q/25209979
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/63025569
score: 13
has answer: http://stackoverflow.com/a/25210094
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/25210094
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25210007
has title: JavaScript if string is in comma delimited string
has body: I have string like this: str = "ball, apple, mouse, kindle"; and I have another text to search in this string: search = 'apple'; How to determine using JavaScript if apple exist in comma delimited string? P.S: str can be with or without spaces between comma and next item.
has answer: http://stackoverflow.com/a/25210059
upvote count: 13
has answer: http://stackoverflow.com/a/25210042
has answer: http://stackoverflow.com/a/25210053
has answer: http://stackoverflow.com/a/25210055
has answer: http://stackoverflow.com/a/25211790
accepted answer: http://stackoverflow.com/a/25210007
has answer: http://stackoverflow.com/a/61872111
answer count: 9

http://stackoverflow.com/comment/39270416
score: 0
type: Comment
has text: You can't do anything about the time-delay, that's a function of the network. As far as the asynchronous nature of things, I don't think there's anything you can do about that either; as someone pointed out the A in AJAX means Asynchronous. You could create a callback parameter for getQuandlData so the caller can specify what happens when the JSON is received.
type: AnswerComment
comment on: http://stackoverflow.com/a/25212849

http://stackoverflow.com/comment/39085923
score: 1
comment on: http://stackoverflow.com/q/25114882
has text: Yes, you can. Start from [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25211136
has comment: http://stackoverflow.com/comment/39265241
answers question: http://stackoverflow.com/q/25210797
has body: This is terribly wrong and you should by any means to structure your data as valid json and follow Rajkumar Madhuram's answer, but here you go, as an exsercise in regEx: function(margin){ var values = margin.match(/(\w+:\d+)+/); var keyValues = []; for (var i=0 ; i&lt; values.length; i++) { var keyValue = values[i].split(":"); keyValues.push({ key: keyValue[0], value: keyValue[1] }); } // now you have an array with key-value pairs; }
has comment: http://stackoverflow.com/comment/39265301
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39265435

http://stackoverflow.com/comment/39277305
type: AnswerComment
score: 0
type: Comment
has text: It does work,but then again-only the first button works-10/63.The rest are static.
comment on: http://stackoverflow.com/a/25217470

http://stackoverflow.com/comment/39166515
type: Comment
comment on: http://stackoverflow.com/q/25158445
type: QuestionComment
has text: add your html as well.
score: 3

http://stackoverflow.com/q/25112521
tagged with: function
downvote count: 0
has answer: http://stackoverflow.com/a/25121291
tagged with: javascript
has body: I think this means I'm missing something basic about the working of nested functions in javascript, but I'm failing to add or remove a layer from a leaflet map using a click function. Specifically, I have a leaflet map with numerous vector layers defined. One of these layers is added to the map on page load, and then subsequent layers are supposed to load on a click event in a layer selector. Here's the function that handles the click, then updates the sidebar legend, updates classes in the layer selector, and is supposed to update the visible layer: // ADD THE LAYER CONTROL FUNCTION $('.layer').click(function() { var oldLayer = $('.active').attr('id'); var newLayer = $(this).attr('id'); console.log(oldLayer + ' --&gt; ' + newLayer); $('#infobits').html('&lt;h2&gt;' + this.text + '&lt;/h2&gt;&lt;hr&gt;' + legendFormatter( this.id)); map.removeLayer(oldLayer); $('.layer').removeClass('active'); $(this).addClass('active'); map.addLayer(newLayer); }); Every time I click on a new layer I get Uncaught TypeError: undefined is not a function, no matter where I put the function (I even had it inside the .getJSON() call for a bit). What's perplexing is that is I go to the JS console in my browser and type verbatim what the function is producing on line 49 of the above script (map.removeLayer(Percent_TC_bg)), the map removes the layer in question. What can I do to get my map adding and removing layers without error?
tagged with: jquery
has answer: http://stackoverflow.com/a/25113743
possible better answer: http://stackoverflow.com/a/25121291
has comment: http://stackoverflow.com/comment/39081652
favorite count: 0
has comment: http://stackoverflow.com/comment/39084067
has comment: http://stackoverflow.com/comment/39081758
has title: Leaflet .addLayer() fails in function, works at the console
accepted answer: http://stackoverflow.com/a/25113743
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/39090781
tagged with: leaflet
upvote count: 3
type: Question
answer count: 2

http://stackoverflow.com/comment/39297603
comment on: http://stackoverflow.com/a/25228523
score: 1
has text: `complex(2,3)` gives `InternalError: too much recursion`
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25222153
accepted answer of: http://stackoverflow.com/q/25221146
answers question: http://stackoverflow.com/q/25221146
score: 1
type: AcceptedAnswer
downvote count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/39542735
has body: The best approach (assuming your have an array of markers) would be to use circle's contains() function. An example: function isMarkerInArea(circle, marker){ return (circle.getBounds().contains(marker.getPosition()); }; This function will return a boolean. If it is true you set display the marker, otherwise you hide it.
type: Answer

http://stackoverflow.com/a/25191137
has body: You don't need any javascript to do this just set your action of your form as below: Submit <\script> <\script>
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25191028
answers question: http://stackoverflow.com/q/25191028

http://stackoverflow.com/q/25181197
has body: I'm using socket.io for realtime communication. When inetrnet is not available for few seconds, then it will connect to server when the connection is establish and then it will immediately trigger event which will log in my clinet. After establishing connection, (i think) my socket.io on server side fire disconnect event after ~one minute (in callback function I log off my client), and that is my problem. This is my server side. (a have server.js and he run other.js files, in object 'files' a have that files). server.js : io = require('socket.io').listen(server);//server listening on 8080 port io.configure(function () { io.set('transports', ['websocket', 'xhr-polling']); io.set('log level', 1); io.disable('browser client'); }); var files = { control: null, terminal: null, messages: null }; for (var game in games) { games[game] = require('./game_modules/' + game + '.js').listen(io, create_waiter(game)); } require('http').createServer(function (req, res) { var resultCode = 500; var resultText = ''; var parts = require('url').parse(req.url, true); var matches = parts.pathname.match('^/([a-z_-]+)/([a-z_-]+)/$'); if (matches) { var game = matches[1]; var command = matches[2]; resultText = games[game][command](parts.query); resultCode = 200; res.writeHead(resultCode, {'Content-Type': 'text/plain'}); res.end(resultText); }).listen(8081, "127.0.0.1"); control.js : var control = module.exports = function() { }; control.listen = function(io) { this.server = io.of('/control'); this.onTerminate = onTerminate; //******************************************************************************** this.server.on('connection', function(socket) { socket.on('disconnect', function(data) { console.log(data); //after my client reconnect, disconnect event is triggered, and //console.log write 'close timeout' After client reconnect, I do not want trigger disconnect event, or if disconnect event was triggered I want check in callback function: is my client connected and prevent "log off" for m…
score: 0
has comment: http://stackoverflow.com/comment/39214694
has comment: http://stackoverflow.com/comment/39214177
answer count: 0
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/39214616
has comment: http://stackoverflow.com/comment/39251757
tagged with: socket.io
type: Question
has title: Disconnect event fired after cilent reconnect - socket.io
has comment: http://stackoverflow.com/comment/39211388
tagged with: javascript

http://stackoverflow.com/comment/39108831
type: QuestionComment
has text: move `features/support/env.rb` content in `spec/spec_helper.rb`
score: 0
comment on: http://stackoverflow.com/q/25126935
type: Comment

http://stackoverflow.com/comment/39191378
type: AnswerComment
comment on: http://stackoverflow.com/a/25170400
has text: I really appreciate your help! Your solution deserves more than one like! Is it also possible to merge with the previous result if already that key exist?
type: Comment
score: 0

http://stackoverflow.com/comment/39103347
type: QuestionComment
has text: `gem 'jquery-rails', '~> 3.0'`
comment on: http://stackoverflow.com/q/25123716
score: 0
type: Comment

http://stackoverflow.com/comment/39134309
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25135558
has text: Oh, agreed - minification is good, especially on mobile networks. And JavaScript that won't survive minification is probably bad JavaScript anyway :)
score: 0

http://stackoverflow.com/comment/39140095
has text: So I can simply change `id` to `class'?
score: 0
comment on: http://stackoverflow.com/q/25143978
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39257198
comment on: http://stackoverflow.com/q/25206719
score: 0
type: QuestionComment
has text: downvoter, please remove your downvote. i am fixing my request.
type: Comment

http://stackoverflow.com/comment/39102366
type: AnswerComment
has text: I don't need to send it in 'yyyy/mm/dd' value when the user has not selected any date, but that is what is being returned. I would love to have something radically different that would be easy to detect server/side, but pickadate.js is passing it that way automagically..
type: Comment
comment on: http://stackoverflow.com/a/25123530
score: 0

http://stackoverflow.com/a/25117704
answers question: http://stackoverflow.com/q/25117383
has comment: http://stackoverflow.com/comment/39091559
has comment: http://stackoverflow.com/comment/39091297
has body: To show in image with a data/base64 url, you need to encode it in Base64 format (see http://en.wikipedia.org/wiki/Base64). You could modify your backend to write your image into base64 format (see Java BufferedImage to PNG format Base64 String), as a string rather than an array. It's also way more compact for your JSON!
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39092494
upvote count: 1

http://stackoverflow.com/a/25138825
score: 2
has body: Your example does not relate to the == vs === operator difference. As people explained before, your example simply creates two different object and in the next example reference the same. Both == and === would act the same there. Since objects litterals are always objects litterals and not in any way implicitly convertible, == and === will always act the same for objects litterals. Some other types like NaN, null and the like, you get weird/funny results when comparing with == and ===
answers question: http://stackoverflow.com/q/25132255
downvote count: 0
upvote count: 2
type: Answer

http://stackoverflow.com/a/25097126
score: 0
has body: Yes it is the same format assuming the Array[2] are of the format [Number, Number]. And from what I can see of the C# code it is generating the format you want.
type: Answer
answers question: http://stackoverflow.com/q/25096971

http://stackoverflow.com/comment/39375652
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25192255
has text: I am getting one error, it is "Unable to get the value of the property 'getValues': object is null or undefined".

http://stackoverflow.com/a/25219854
accepted answer of: http://stackoverflow.com/q/25219820
has comment: http://stackoverflow.com/comment/39567563
type: Answer
has comment: http://stackoverflow.com/comment/39431636
has comment: http://stackoverflow.com/comment/39293388
has comment: http://stackoverflow.com/comment/39290226
has comment: http://stackoverflow.com/comment/39390317
has comment: http://stackoverflow.com/comment/39288796
answers question: http://stackoverflow.com/q/25219820
score: 0
has body: It may be the variable scoping. Try to write out the method with a global variable definition: getSearchUsers = function(query) { var re = new RegExp(query, "i"); return Users.find({name: {$regex: re}}); }
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39404810

http://stackoverflow.com/comment/52438183
comment on: http://stackoverflow.com/a/25173725
score: 0
type: AnswerComment
type: Comment
has text: This solution works but has anyone experienced an issue where the modal will fail after nav.popPage(); is executed? Any way to resolve that?

http://stackoverflow.com/comment/39379069
has text: WOW that was it, how insane is that? I must have done that at some point because of some grammatical OC nonsense. Post that as an answer and I'll accept it... boy I feel dumb but THANK YOU!
comment on: http://stackoverflow.com/q/25210566
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25097342
has comment: http://stackoverflow.com/comment/39053386
linked to: http://stackoverflow.com/q/14028959
tagged with: element
type: Question
duplicate of: http://stackoverflow.com/q/14028959
possible better answer: http://stackoverflow.com/a/25097388
has answer: http://stackoverflow.com/a/25097388
accepted answer: http://stackoverflow.com/a/25097375
has comment: http://stackoverflow.com/comment/39053407
upvote count: 2
has answer: http://stackoverflow.com/a/25097403
answer count: 3
tagged with: document
linked to: http://stackoverflow.com/q/12340871
downvote count: 1
duplicate of: http://stackoverflow.com/q/12340871
tagged with: javascript
has body: I have a problem, document.getElementById doesn't work. I get this error: "'null' is not an object (evaluating document.getElementById("alls").innerHTML = pixs)". This is my code: Javascript: var pixs = ""; for(var ia = 1; ia &lt;= 400 * 500; ia++) { var r = Math.floor(Math.random() * 257); var g = Math.floor(Math.random() * 257); var b = Math.floor(Math.random() * 257); pixs += "&lt;div class='pix' style='background-color:rgb("+r+","+g+","+b+");'&gt;&lt;/div&gt;"; } document.getElementById("alls").innerHTML = pixs; Body: &lt;div id="alls"&gt;&lt;/div&gt; Can anyone help me?
has comment: http://stackoverflow.com/comment/39053412
has comment: http://stackoverflow.com/comment/39053367
has answer: http://stackoverflow.com/a/25097375
type: AnsweredQuestion
has title: document.getElementById doesn't work
tagged with: getelementbyid
score: 1
favorite count: 0

http://stackoverflow.com/comment/39037057
comment on: http://stackoverflow.com/a/25086411
score: 0
type: Comment
type: AnswerComment
has text: Yes, but as said, they have access to the caller.

http://stackoverflow.com/q/25144819
has answer: http://stackoverflow.com/a/25159418
has body: I'm trying to get some visualisation set up with dc.js to draw some some data from django. I was following a tutorial on codeproject.com (http://www.codeproject.com/Articles/693841/Making-Dashboards-with-Dc-js-Part-Using-Crossfil) but the graph from it won't render for me in either Firefox or Chrome. The code is here on JSFiddle: http://jsfiddle.net/e5gC2/115/ It clearly draws there, and I'm using the exact same css/js files on my server. My actual source for the .html file I have the graph in is here: --> --> &lt;script type="text/javascript"&gt; function print_filter(filter){ var f=eval(filter); if (typeof(f.length) != "undefined") {}else{} if (typeof(f.top) != "undefined") {f=f.top(Infinity);}else{} if (typeof(f.dimension) != "undefined") {f=f.dimension(function(d) { return "";}).top(Infinity);}else{} console.log(filter+"("+f.length+") = "+JSON.stringify(f).replace("[","[\n\t").replace(/}\,/g,"},\n\t").replace("]","\n]")); } var hitslineChart = dc.lineChart("#chart-line-hitsperday"); var data = [ {date: "12/27/2012", http_404: 2, http_200: 190, http_302: 100}, {date: "12/28/2012", http_404: 2, http_200: 10, http_302: 100}, {date: "12/29/2012", http_404: 1, http_200: 300, http_302: 200}, {date: "12/30/2012", http_404: 2, http_200: 90, http_302: 0}, {date: "12/31/2012", http_404: 2, http_200: 90, http_302: 0}, {date: "01/01/2013", http_404: 2, http_200: 90, http_302: 0}, {date: "01/02/2013", http_404: 1, http_200: 10, http_302: 1}, {date: "01/03/2013", http_404: 2, http_200: 90, http_302: 0}, {date: "01/04/2013", http_404: 2, http_200: 90, http_302: 0}, {date: "01/05/2013", http_404: 2, http_200: 90, http_302: 0}, {date: "01/06/2013", http_404: 2, http_200: 200, http_302: 1}, {date: "01/07/2013", http_404: 1, http_200: 200, http_302: 100} ]; var ndx = crossfilter(data); var parseDate = d3.time.format("%m/%d/%Y").parse; data.forEach(function(d) { d.date = Date.parse(d.date); d.total= d.http_404+d.http_200+d.http_302; }); var dateDim = ndx.dimension(function(d) {retu…
tagged with: dc.js
tagged with: crossfilter
type: AnsweredQuestion
has title: dc.js not rendering - works in JSFiddle
type: Question
accepted answer: http://stackoverflow.com/a/25159418
tagged with: http://stackoverflow.com/tag/html
tagged with: django
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/39017771
score: 0
has text: @jbyrne2007 OP needs an updated variable if they stay. I understand what you're saying and yes, in many cases my solution won't work, but in this case it works just fine because the problem here is more about thinking outside the box than coding.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25077449

http://stackoverflow.com/q/25171921
answer count: 4
type: AnsweredQuestion
has body: I am using debounce on an input: &lt;input type="text" ng-model="model.qty" ng-model-options="{ debounce : 1000 }" min="{{model.min}}" max="{{model.max}}" step="1" qty-input validate-model-setting&gt; I have a directive that handles the disabling of an increment button and a decrement button for this input: app.directive('qtyInput', function() { return { restrict: 'A', require: '?ngModel', link: function(scope, element, attrs, ngModelCtrl) { scope.$watch(attrs.ngModel, function(n, o) { var val = parseInt(n); if(!isNaN(val)) { if(val + 1 &gt; model.max) { scope.quantityIncDisabled = true; } else { scope.quantityIncDisabled = false; } if(val - 1 &lt; model.min) { scope.quantityDecDisabled = true; } else { scope.quantityDecDisabled = false; } } }); } } }); The problem is, the watch on this directive is looking at the model. I need it to look at the $viewValue instead. This is because, due to debounce, there is a race condition between typing in the input and using the increment/decrement buttons. For example, you can keep on clicking the decrement button over and over for exactly 1 second after the input has reached 1 (the min), and only then, after the debounce finishes, will the decrement button become disabled. Instead, I want the button to be disabled immediately when the input reaches 1, not after waiting the full debounce second. My best guess is that this means putting a $watch on the $viewValue, but I don't know how to get to it in the directive. For your reference, the buttons themselves avoid the race condition by changing the input's value and then triggering the input, which makes the debounce work fluidly with both typing in the input and using the buttons. link: function(scope, element, attrs) { element.bind('click', function() { $timeout(function() { var input = element.parent().find('input'); var changingTo = parseInt(input[0].value) + parseInt(scope.inc); if(scope.inc &lt; 0 || isNaN(changingTo)) { var min = parseInt(input[0].min); if(isNaN(changingTo)…
possible better answer: http://stackoverflow.com/a/45454195
favorite count: 0
has answer: http://stackoverflow.com/a/45454195
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25172729
type: Question
has answer: http://stackoverflow.com/a/30670311
tagged with: watch
upvote count: 7
downvote count: 1
has answer: http://stackoverflow.com/a/32436859
has answer: http://stackoverflow.com/a/25172729
tagged with: javascript
has title: AngularJS how do I watch $viewValue instead of ngModel?
score: 6

http://stackoverflow.com/q/25160700
tagged with: instance
has comment: http://stackoverflow.com/comment/39171602
score: 1
duplicate of: http://stackoverflow.com/q/122102
type: Question
has title: Creating new instance of an object
has comment: http://stackoverflow.com/comment/39171254
tagged with: javascript
linked to: http://stackoverflow.com/q/728360
has answer: http://stackoverflow.com/a/25160746
has comment: http://stackoverflow.com/comment/39171945
has answer: http://stackoverflow.com/a/25160912
has answer: http://stackoverflow.com/a/25160900
linked to: http://stackoverflow.com/q/122102
favorite count: 0
has answer: http://stackoverflow.com/a/25160804
has body: I began writing code assuming that: person1 = person will give me a new instance, it doesn't. person1 is actually a reference/pointer to person. person = {age : 2} person1 = person; person.age = 3; alert(person1.age); //gives us 3. How do I make a new instance without changing much code around? I have like 300 lines of code inside the object, functions(methods?) and everything. Wouldn't want to rewrite as a constructor.
upvote count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39171219
downvote count: 1
answer count: 4
tagged with: object

postback
tag name: postback
tags question: http://stackoverflow.com/q/25102036
type: Tag
tags question: http://stackoverflow.com/q/25080925

http://stackoverflow.com/comment/39196505
has text: and what about the argument,i'm passing to the function via onclick event in html? This gonna work still?
comment on: http://stackoverflow.com/a/25165988
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39105887
type: Comment
comment on: http://stackoverflow.com/a/25123497
has text: Excellent! By the way, I tried to remove the ``realSave`` proxy from the debounce call (``Em.run.debounce(this, this.save, 500);``), and it seem to work just fine. Am I missing something?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25078340
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25078466
has answer: http://stackoverflow.com/a/25079072
has comment: http://stackoverflow.com/comment/39017973
has answer: http://stackoverflow.com/a/25078469
has comment: http://stackoverflow.com/comment/60556040
favorite count: 0
has comment: http://stackoverflow.com/comment/39017658
answer count: 5
has answer: http://stackoverflow.com/a/25078383
accepted answer: http://stackoverflow.com/a/25079072
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39017607
tagged with: http://stackoverflow.com/tag/json
possible better answer: http://stackoverflow.com/a/25078607
has body: I have {"Title":"Movie1","Year":"2013"} JSON data. I want to get a string "Movie12013" for that JSON. How to achieve that?
has answer: http://stackoverflow.com/a/25078607
downvote count: 7
type: Question
has title: How to concatenate JSON data into string?
score: -2
upvote count: 5

http://stackoverflow.com/comment/54205500
type: Comment
has text: @mycargus glad to hear!
score: 1
comment on: http://stackoverflow.com/a/25129277
type: AnswerComment

http://stackoverflow.com/comment/39233868
comment on: http://stackoverflow.com/q/25193508
score: 0
type: Comment
type: QuestionComment
has text: Answer here http://stackoverflow.com/questions/16709866/threejs-cube-texture-strange-visual/16720261#16720261

http://stackoverflow.com/comment/39169045
type: Comment
type: QuestionComment
has text: when a file is in ie cache, the $.load() isn't trigger, so with this function you just prevent ie from caching the file ;)
score: 1
comment on: http://stackoverflow.com/q/25159696

http://stackoverflow.com/comment/39088945
type: Comment
has text: Are the initial `data-*` attribute values copied upon the first `.data()` call, or when jQuery is loaded? Out of curiosity.
comment on: http://stackoverflow.com/a/25116413
type: AnswerComment
score: 0

http://stackoverflow.com/comment/74124805
comment on: http://stackoverflow.com/q/25126731
type: Comment
has text: Note from the future: cdn.mathjax.org is nearing its end-of-life, check https://www.mathjax.org/cdn-shutting-down for migration tips (and perhaps update your answer for future readers).
score: 0
type: QuestionComment

http://stackoverflow.com/q/25224252
type: Question
has comment: http://stackoverflow.com/comment/39292622
score: 0
upvote count: 1
answer count: 1
downvote count: 1
has title: Node.js async.each does not wait to iterate
accepted answer: http://stackoverflow.com/a/25224624
tagged with: node.js
has answer: http://stackoverflow.com/a/25224624
has body: I'm going mad trying to figure out what I am doing wrong with this synchronous iterator in node.js, using async: async.each(ids, function(id,next) { console.log(id); tokens.addID(id,function (id_uuid) { console.log('Added ID '+id_uuid); next(); }); }); The problem is that the inner call back is not being waited on before the next iteration occurs. But that makes no sense. I've wasted hours, very grateful for any help.
has comment: http://stackoverflow.com/comment/39289751
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/54034456
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/39259320
comment on: http://stackoverflow.com/a/25207603
score: 0
type: Comment
has text: @Barmar, You are right. The group is only needed in the case the OP needs just the number.
type: AnswerComment

http://stackoverflow.com/q/25104092
tagged with: time
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has answer: http://stackoverflow.com/a/25104162
has title: Validate a time from the
type: Question
has answer: http://stackoverflow.com/a/25104228
tagged with: validation
downvote count: 0
linked to: http://stackoverflow.com/q/7294131
tagged with: javascript
has body: I would like to validate the field for the input type of time. Currently, I am trying to use the javascript method to validate the field(s). This is the code that I have used. My current time format is example: 12:00 pm Just wondering on how I can validate the fields for the input type of time. I am not sure on how to achieve on the validation. I was hoping if I can get some tips on how to validate it.
favorite count: 0
has comment: http://stackoverflow.com/comment/39067506
has comment: http://stackoverflow.com/comment/39065879
has comment: http://stackoverflow.com/comment/39065743
answer count: 3
has answer: http://stackoverflow.com/a/53406598

http://stackoverflow.com/a/30212776
answers question: http://stackoverflow.com/q/25118911
has body: I was struggeling with the same problem - I had a div popup with an iframe pointing to a html page containing the twitter button. I had the popup hidden from start. This apparently causes the twitter button not to render.. instead of hiding it with display:none / visibility:hidden position the popup far far away (left : -10000px) and reset the left position when you want to show the popup.. Hope it might help someone..
score: 0
type: Answer

http://stackoverflow.com/comment/39047412
comment on: http://stackoverflow.com/q/25094045
has text: Terry : But where to ask this kind of question to get the right direction ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39152991
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25149978
has text: ok but can you please solve first problem..open this http://plnkr.co/edit/OYiawflIBnpJ1PKx02LG?p=preview click any one of star icon .and click again it show 2 at a time
score: 0

http://stackoverflow.com/comment/39249923
has text: That is setting it. OP wants to get it.#
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25203258

http://stackoverflow.com/q/25084063
has title: 'If' statement in D3.js
answer count: 0
type: UnansweredQuestion
score: 0
has body: There is an online feed available in the following format in the link http://www.tfl.gov.uk/tfl/syndication/feeds/cycle-hire/livecyclehireupdates.xml Using D3 i am plotting a circle, on a map of London, wherever these stations are located. I want to implement the following. If the number of bikes (given as nbBikes in the XML file) are less than 5 the "fill" of the circle should be red else green. I got the circles rightly plotted but the IF statement is not working. $.ajax({ url: "http://localhost:56854/WebForm1.aspx?webURL=http://www.tfl.gov.uk/tfl/syndication/feeds/cycle-hire/livecyclehireupdates.xml", dataType: 'xml', data: data, success: parseXml, error: MyMessage }); function parseXml(data) { var stations = d3.select(data).selectAll("station")[0]; g.selectAll("circle") .data(stations) .enter() .append("circle") .attr("r", 3) .style("fill", function (d) { // if (d.getElementsByTagName("nbBikes").childNodes[0].nodeValue &lt;= 5) { return "red" } // else { return "black" } // ; }) .attr("cx", function (d) { return projection([d.getElementsByTagName("long")[0].childNodes[0].nodeValue, d.getElementsByTagName("lat")[0].childNodes[0].nodeValue])[0]; }) .attr("cy", function (d) { return projection([d.getElementsByTagName("long")[0].childNodes[0].nodeValue, d.getElementsByTagName("lat")[0].childNodes[0].nodeValue])[1]; })
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39029066
has comment: http://stackoverflow.com/comment/39030818
has comment: http://stackoverflow.com/comment/39031058
tagged with: d3.js

http://stackoverflow.com/comment/39120560
has text: Is there any other solution ?
comment on: http://stackoverflow.com/q/25133444
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39204674
has text: @tau your welcome. I have add it as a answer.
type: QuestionComment
comment on: http://stackoverflow.com/q/25164927
score: 0
type: Comment

http://stackoverflow.com/q/25097309
accepted answer: http://stackoverflow.com/a/25097588
score: 3
has title: How to make some text content in a div editable on click?
possible better answer: http://stackoverflow.com/a/25097512
tagged with: javascript
has body: I want a editbox editable when we click on div as we accomplish this by clicking on "Div editable".It work great for single id Can you please tell how to make it for multiple id's.Thanks in advance. Editable Div (double click text to the right, to enter edit mode) : Div editable (function($) { $.fn.editable = function() { var textBlock = $(this); // Create a new input to allow editing text on double click var textBox = $(' '); textBox.hide().insertAfter(textBlock).val(textBlock.html()); // Hiding the div and showing a input to allow editing the value. textBlock.dblclick(function() { toggleVisiblity(true); }); // Hiding the input and showing the original div textBox.blur(function() { toggleVisiblity(false); }); toggleVisiblity = function(editMode) { if (editMode == true) { textBlock.hide(); textBox.show().focus(); // workaround, to move the cursor at the end in input box. textBox[0].value = textBox[0].value; } else { textBlock.show(); textBox.hide(); textBlock.html(textBox.val()); } }; }; })(jQuery); $(function() { var $edit = $('#makeEditable').editable(); });
upvote count: 3
answer count: 3
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25097512
has answer: http://stackoverflow.com/a/25097343
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25097588
type: Question

http://stackoverflow.com/comment/39154407
comment on: http://stackoverflow.com/a/25151418
score: 0
type: AnswerComment
type: Comment
has text: What is the `.prototype` member?

http://stackoverflow.com/q/25105094
has comment: http://stackoverflow.com/comment/39068223
has comment: http://stackoverflow.com/comment/39067670
has body: I have this code: var ST = { city: 'a#cityId:eq(2)', state: 'div.location:eq(1)', zip: 'p#zipcodes:eq(3)', people: 'div.population :input', autoload: function(selector) { var elem = $(selector).get(0); if (!elem || elem == 'undefined' || elem.length == '0') { return false; } return elem; }, }; Can I request the variable City for example, and have it automatically executed through autoload function? This is what I'm trying to achieve: ST.city ? ST.city.click() : '';
has title: Javascript/Jquery Object Literal version, perform function on variable request
type: Question
has comment: http://stackoverflow.com/comment/39067770
possible better answer: http://stackoverflow.com/a/25105219
has comment: http://stackoverflow.com/comment/39068820
answer count: 2
has comment: http://stackoverflow.com/comment/39067753
has answer: http://stackoverflow.com/a/25105219
has comment: http://stackoverflow.com/comment/39068074
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39067943
score: 0
has answer: http://stackoverflow.com/a/25105210
has comment: http://stackoverflow.com/comment/39072444
has comment: http://stackoverflow.com/comment/39068523
has comment: http://stackoverflow.com/comment/39068294
has comment: http://stackoverflow.com/comment/39067942
has comment: http://stackoverflow.com/comment/39068267
has comment: http://stackoverflow.com/comment/39067791
has comment: http://stackoverflow.com/comment/39067671
has comment: http://stackoverflow.com/comment/39067857
has comment: http://stackoverflow.com/comment/39068543
has comment: http://stackoverflow.com/comment/39068987
tagged with: object
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39068383
accepted answer: http://stackoverflow.com/a/25105210

http://stackoverflow.com/comment/39030603
comment on: http://stackoverflow.com/a/25084973
type: AnswerComment
has text: The only problem with that example is the initial value isn't set in the select, thanks for the input.
score: 0
type: Comment

http://stackoverflow.com/comment/39047281
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25076537
type: Comment
has text: I update with 2.X but same issue

http://stackoverflow.com/q/25078590
tagged with: android
answer count: 0
has body: I have the script below and it works amazingly for the needs of what i am doing, is there any method that would allow me to use this script so that it can be used on both a machine using a mouse as well as a a touch screen tablet or ipads/iphone or mobiles, any idea how this can be achieved. $(function () { $(".ui-widget-content").draggable({containment: "#content1" }); $('.ui-widget-header').each(function (i, ele) { // Gets the accepted from the HTML property "data-accept" var accept = $(this).data('accept'); // This is just to show what the item accepts. you can remove it. $(this).find('p').text('accepts: ' + accept); // Init the jQuery UI droppable() $(this).droppable({ accept: accept, drop: function (event, ui) { $(this) .removeClass("ui-widget-header") .addClass("correct") }, out: function (event, ui) { $(this).removeClass("correct").addClass("ui-widget-header") } }); }); });
has title: jQuery draggable on computer and touch screens
type: Question
tagged with: ios
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39018303
has comment: http://stackoverflow.com/comment/39017903
type: UnansweredQuestion

http://stackoverflow.com/q/25075745
downvote count: 0
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/10852988
tagged with: ember.js
linked to: http://stackoverflow.com/q/24176061
tagged with: node.js
duplicate of: http://stackoverflow.com/q/10852988
score: 2
answer count: 0
has body: How can i override a mixin but still keep the old mixin functionality. I have a mixin that uses beforeModel, and have a route: App.PlayRoute = Ember.Route.extend("beforeModelMixin", { beforeModel: { // Here i want to have mixin beforeModel functionality as well as my own hook. } } Above example beforeModelMixin gets overriden and doesn't work anymore, because i defined beforeModel again. Is that possible?
upvote count: 2
duplicate of: http://stackoverflow.com/q/24176061
type: UnansweredQuestion
tagged with: oop
has title: emberJS mixin super override
type: Question
tagged with: mixins

http://stackoverflow.com/comment/39053174
score: 0
type: QuestionComment
type: Comment
has text: @adeneo I am also polling to see if objects in a priority queue (based on time) have to be removed. The animations aren't really based on when another animation completes. I just need to prevent them from overlapping and pause the polling if they are.
comment on: http://stackoverflow.com/q/25097074

http://stackoverflow.com/comment/39180155
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25147836
type: Comment
has text: What issues did you have using the TextChanged event? Can you post some code?

http://stackoverflow.com/q/25225515
has answer: http://stackoverflow.com/a/25225528
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39292079
has title: Trouble formatting .join() separators
type: Question
accepted answer: http://stackoverflow.com/a/25225528
has body: Working on a twitter bootstrap wizard page and outputting selected check-box values to next tab-pane. Because there can be multiple selections (ie. :checked), I'm using map function and join(). I'm trying to wrap each output in a but the first item does not get wrapped -- only every item after the 1st. Eg. Checkbox 1 Checkbox 2 Checkbox 3 Here is my code: $(document).ready(function() { $('#rootwizard').bootstrapWizard({ onNext: function(tab, navigation, index) { if (index == 1) { if (!$('.selection:checked').val()) { alert('Please select a solution to try'); $('.selection').focus(); return false; } } $('#showSelection').html($('.selection:checked').map(function() { return $(this).val(); }).get().join(' ')); } }); Not sure if I should be using a different method? Or... if there is a way to pre-append and force a separator "wrap" around all selections. Any insight/clarity would be appreciated.
tagged with: twitter-bootstrap
score: 0
answer count: 1

http://stackoverflow.com/comment/39189106
score: 0
type: QuestionComment
has text: Well where are you echoing it? What file? Cake is still PHP and leaves a lot of it up to you, including HTML. It just puts it together nicely.
type: Comment
comment on: http://stackoverflow.com/q/25169936

http://stackoverflow.com/q/25178540
score: 1
tagged with: javascript
tagged with: jshint
has body: for example, my code below (function ($) { window.FOO || (FOO = {}); }(jQuery)); caused jshint error: Expected an assignment or function call and instead saw an expression. Are there any better way to write my above code? i.e. if FOO is not defined in global window scope, init it as {}
upvote count: 1
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25178574
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25178574
downvote count: 0
has title: Default argument in JavaScript caused jshint error
type: Question

http://stackoverflow.com/comment/39159300
comment on: http://stackoverflow.com/q/25154135
score: 0
has text: I dont know promises with node. Does it need a specific module ?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25173074
has comment: http://stackoverflow.com/comment/39195056
has comment: http://stackoverflow.com/comment/39195838
has comment: http://stackoverflow.com/comment/39195022
has comment: http://stackoverflow.com/comment/39195756
has comment: http://stackoverflow.com/comment/39195089
downvote count: 0
answers question: http://stackoverflow.com/q/25173040
type: Answer
has comment: http://stackoverflow.com/comment/39195157
has body: You can just select by class and filter if ($("[required]").filter(function() { return !this.value.length; }).length) { //stuff is not filled in } else { //filled in } or you can just use any of the validation libraries for jQuery. HTML: &lt;input type="text" required /&gt; &lt;input type="text" required /&gt; &lt;input type="text" required /&gt; JavaScript: $("[required]").on("change", function() { var color; if ($("[required]").filter(function() { return !this.value.length; }).length) { color = "red"; } else { color = "green"; } $("body").css("background-color", color); }).eq(0).trigger("change");
score: 2
upvote count: 2

http://stackoverflow.com/q/25100034
score: -1
type: Question
answer count: 1
tagged with: javascript
has title: Toggle Dropdown but not from checkbox
tagged with: jquery
favorite count: 0
has body: http://liveweave.com/Yyss6U All headers toggle the visibility of the my next element. However I put a checkbox element inside one of the header tags, and I don't want to toggle the dropdown when I'm adjusting the checkbox. I tried using the .not event handler and the not css selector. How can I solve this problem? $("#toolbox header:not(input[type=checkbox])").on('mouseup touchend', function() { $(this).toggleClass("activedrop").next().toggle(); });
has answer: http://stackoverflow.com/a/25100068
accepted answer: http://stackoverflow.com/a/25100068
downvote count: 2
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39058848

http://stackoverflow.com/comment/39102183
score: 2
has text: It's not in the *line*, the error is thrown by the called `JSON.parse` function itself because `response` is not a valid JSON string.
comment on: http://stackoverflow.com/q/25123388
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25194283
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25189394
upvote count: 1
type: Answer
has body: Person.prototype.name = 'Nicholas' and this.name = 'Nicholas' are NOT the same. Let's see for ourselves: var PersonA = function () { this.name = 'Nicholas'; this.species = 'Homo Sapiens' return this; // optional }; var PersonB = function () { return this; }; PersonB.prototype.name = 'Nicholas'; PersonB.prototype.species = 'Homo Sapiens' var personA = new PersonA(); console.log(Object.keys(personA)); // logs ["name", "species"] var personB = new PersonB(); console.log(Object.keys(personB)); // logs [] console.log(personA.species === personB.species); // logs true Clearly, personA has a 2 keys, "name" and "species"; while personB no keys!. However, the prototype of personB 2 keys, "name" and "species" Now, if you create a million objects of PersonA, each such object would have a "name": "Nicholas" and "species": "Homo Sapiens" key-value pairs. On the other hand, creating a million objects of PersonB would be much more memory-efficient as each such object would have no key-value pairs at all! At the same time, both "name" and "species" will be available through prototype (prototypal inheritance). A closer look at refinements: Lets examine the refinement on an object obj, say obj.foo: If "foo" is a property of obj, the corresponding value is returned. Otherwise, the prototype of obj is looked at. If that prototype has a property "foo", the corresponding value is returned. Otherwise that prototype's prototype is looked at. The process continues till we hit Object.prototype. So in terms of memory, PersonB is superior to PersonA. This is the beauty of prototypal inheritance. Hope this helps.

http://stackoverflow.com/comment/39033057
type: AnswerComment
comment on: http://stackoverflow.com/a/25085498
type: Comment
has text: I dunno why in the world wouldn't work , you technically gave the best answer, I'll take it as a solution and figure out if the problem lays somewhere else... Thanks for the vast time!
score: 0

http://stackoverflow.com/q/25180348
has body: I have been developing a webserver application using Flask. So far, I created a small framework, where the users can draw some boxes in a image, using canvas and javascript. I keep the boxes information in a vector in javascript as well as the image information. However, all this data must be submitted and stored in a database the server side. Therefore, I have a button to submit all this content, but I have no idea how to retrieve the javascript data I have, i.e.: boxes and image information. Is it possible to get the javascript information to submit like that? I have come up with some ideas such as printing the information in hidden HTML elements, or, maybe, using AJAX for sending the information to the server, but I don't think those are the "correct" methods for dealing with this problem in Flask. So, does anyone have a idea. Here follow part of my code that may seem relevant for understanding my problem: Models.py: My classes here are a little different: Blindmap=Image, Label=boxes. My database is modelled using SQLAlchemy. blindmap_label = db.Table('blindmap_label', db.Column('blindmap_id', db.Integer, db.ForeignKey('blindmap.id', ondelete = 'cascade'), primary_key = True), db.Column('label_id', db.Integer, db.ForeignKey('label.id', ondelete = 'cascade'), primary_key = True)) class Blindmap(db.Model): __tablename__ = 'blindmap' id = db.Column(db.Integer, primary_key = True) description = db.Column(db.String(50)) image = db.Column(db.String) labels = db.relationship('Label', secondary = blindmap_label, backref = 'blindmaps', lazy = 'dynamic') def __init__(self, label = None, **kwargs): if label is None: label = [] super(Blindmap, self).__init__(**kwargs) def add_label(self, label): if label not in self.labels: self.labels.append(label) db.session.commit() def __repr__(self): return '&lt;Blindmap %r:&gt;' % (self.id) class Label(db.Model): __tablename__ = 'label' id = db.Column(db.Integer, primary_key = True) name = db.Column(db.String(50)) x = db.Column(db.Inte…
has answer: http://stackoverflow.com/a/25237021
tagged with: python
accepted answer: http://stackoverflow.com/a/25242841
type: AnsweredQuestion
tagged with: sqlalchemy
has answer: http://stackoverflow.com/a/25242841
type: Question
score: 3
possible better answer: http://stackoverflow.com/a/25237021
tagged with: javascript
tagged with: flask
upvote count: 3
answer count: 2
downvote count: 0
has title: Flask with Javascript
favorite count: 0

http://stackoverflow.com/a/25115613
has comment: http://stackoverflow.com/comment/39087356
accepted answer of: http://stackoverflow.com/q/25115531
upvote count: 1
has comment: http://stackoverflow.com/comment/39087283
answers question: http://stackoverflow.com/q/25115531
score: 1
has body: You can pass the value as a route params to the other view, provided if the other view points to some other route.. in your routes.js, you can put it like viewName/:paramName. And then in your controller, you can access it like $routeParams.paramName.. [paramName is the name of the parameter you're passing :D]
has comment: http://stackoverflow.com/comment/39087249
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39203941
type: Comment
type: QuestionComment
has text: Have you checked this discussion - http://stackoverflow.com/questions/496052/jquery-setting-the-selected-value-of-a-select-control-via-its-text-description? What's in your cityVariable?
comment on: http://stackoverflow.com/q/25178416
score: 0

http://stackoverflow.com/comment/39278705
comment on: http://stackoverflow.com/q/25218101
type: QuestionComment
has text: Possible duplicate of [Why is my variable unaltered after I modify it inside of a function? - Asynchronous code reference](http://stackoverflow.com/q/23667086/1048572)
type: Comment
score: 0

http://stackoverflow.com/q/25083421
type: AnsweredQuestion
upvote count: 3
has title: Overriding CTRL+Click behavior on a link
has body: I need to override the crtl+click on a link in HTML or Javascript. I would like it so that when an user does a crtl+click on a link, instead of the doing the default behavior of the browser, it performs my function instead. I'm unable to use jQuery to do this. Any ideas? This is the function that I want to call: function alertMe() { alert('overwrote the crtl click'); }
accepted answer: http://stackoverflow.com/a/25083555
type: Question
has comment: http://stackoverflow.com/comment/39028056
has comment: http://stackoverflow.com/comment/39027439
tagged with: javascript
score: -5
has comment: http://stackoverflow.com/comment/39027762
answer count: 1
has comment: http://stackoverflow.com/comment/39027517
favorite count: 0
has answer: http://stackoverflow.com/a/25083555
has comment: http://stackoverflow.com/comment/39027997
downvote count: 8
has comment: http://stackoverflow.com/comment/39027417
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39027481
has comment: http://stackoverflow.com/comment/39027475

http://stackoverflow.com/a/25094089
type: Answer
has comment: http://stackoverflow.com/comment/39055175
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25094019
answers question: http://stackoverflow.com/q/25094019
has body: There are a couple of issues in your code: The ID for your second button should be p2 instead of p12. You have to assign your event handlers like this p1.onclick = show; instead of like this p1.onclick = show(); Adding the brackets will execute the method, instead of binding it as an event handler. Here's a fiddle.

http://stackoverflow.com/q/25105950
has comment: http://stackoverflow.com/comment/39069326
type: AnsweredQuestion
has body: I have appended an textarea to the element using: $('#first').after(' '); I would like to call a wysiwyg() function on that text area: $('#textarea').wysiwyg(); This does not work because the element is appended after. Any advice how to get an element that is appended with the id #textarea in order to call that function on it?
accepted answer: http://stackoverflow.com/a/25105990
answer count: 1
has title: Accessing element appended by after()
score: 0
has comment: http://stackoverflow.com/comment/39069364
has answer: http://stackoverflow.com/a/25105990
has comment: http://stackoverflow.com/comment/39069317
tagged with: javascript
tagged with: jquery
type: Question

http://stackoverflow.com/q/25130157
answer count: 1
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25130424
has title: snapscroll plugin not activating
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25130424
has body: I'm trying to get snapscroll to work as per the documentation but can't quite get it to behave. It says "SnapScroll only works with containers set to 100% window height for single page sites." Snapscroll: http://wtm.github.io/jquery.snapscroll/ Fiddle: http://jsfiddle.net/L649M/1/ $(function() { $(".content").snapscroll(); });
tagged with: javascript
score: 0

http://stackoverflow.com/comment/39157538
type: Comment
type: QuestionComment
has text: You seem to be confusing JavaScript with the [DOM](http://en.wikipedia.org/wiki/Document_Object_Model) APIs here.
comment on: http://stackoverflow.com/q/25152160
score: 0

http://stackoverflow.com/q/25153798
has comment: http://stackoverflow.com/comment/39158482
has comment: http://stackoverflow.com/comment/39158510
has comment: http://stackoverflow.com/comment/39158436
has comment: http://stackoverflow.com/comment/39158425
has comment: http://stackoverflow.com/comment/39158440
has comment: http://stackoverflow.com/comment/39158495
has comment: http://stackoverflow.com/comment/39158509
score: 0
has comment: http://stackoverflow.com/comment/39158447
upvote count: 1
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39158648
has body: I am trying to submit a form with jquery and ajax, but code does not work. What am I doing wrong? &lt;script&gt; $( function() { $( '#myForm' ).submit( function( evt ) { evt.preventDefault(); var $form = $( this ); $.ajax( { type: $form.prop( 'method' ), url: $form.prop( 'action' ), data: $form.serialize(), dataType: "json", traditional: true, success: function( response ) { alert("it works!"); document.body.innerHTML = response; } }); }); }); &lt;/script&gt; Solved my problem by changing code a bit: I solved my problem by changing url,type. And I settled to change div with id=mylist. Now it works. &lt;script&gt; $( function() { $( '#paieska' ).submit( function( evt ) { evt.preventDefault(); $.ajax({ url: "/Transport/Lentele", type: 'POST', data: $("#paieska").serialize(), success: function (response) { $("#mylist").html(response); } }); }); }); &lt;/script&gt; I'll add this as solution when I will be available to.
has answer: http://stackoverflow.com/a/25154018
has comment: http://stackoverflow.com/comment/39158505
has comment: http://stackoverflow.com/comment/39158508
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39158594
has comment: http://stackoverflow.com/comment/39158490
has title: Form submitting with jQuery Ajax
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39158530
tagged with: ajax
has comment: http://stackoverflow.com/comment/39158636
type: Question

http://stackoverflow.com/comment/39185481
type: QuestionComment
has text: To retrieve CSS properties: http://api.jquery.com/css/
score: 1
comment on: http://stackoverflow.com/q/25168279
type: Comment

http://stackoverflow.com/q/25201623
has comment: http://stackoverflow.com/comment/39247079
has body: I am using some used code in my project The following code is used to add the product in the wishlist written in view &lt;p class="p"&gt;&lt;a&lt;?php echo "onclick='addtowishlist($product-&gt;id)'"; ?&gt;&gt;Add To Wishlist&lt;/a&gt;&lt;/p&gt; The Javascript code for this function addtowishlist(pid) { remoteCall("cart/addtowishlist/"+pid,"","loadlist"); } function loadlist() { alert(sResponse); } This is my controller naming cart public function addtowishlist($pID) { $data=$this-&gt;Product_model-&gt;addtowishlist($pID); echo $data; } This is my Model naming Product_model function addtowishlist($ProductID) { echo "Added succesfully"; } This is my ajax for remote call function used in javascript enter code herefunction remoteCall(sUrl, sQueryStr, sCalledBy){ uri = sUrl; callingFunc = sCalledBy; xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("Your browser does not support AJAX!"); return; } if (xmlHttp) { xmlHttp.onreadystatechange = stateHandler; xmlHttp.open("POST", sUrl, true); xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(sQueryStr); } } I only want to show the message written in my controller to displayed when clicked on the Add to wishlist link
tagged with: codeigniter
has answer: http://stackoverflow.com/a/25201808
has comment: http://stackoverflow.com/comment/39247158
type: Question
has comment: http://stackoverflow.com/comment/39249664
tagged with: javascript
has answer: http://stackoverflow.com/a/25202917
tagged with: jquery
tagged with: ajax
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39249435
type: UnansweredQuestion
tagged with: php
has title: Javascript code is not executing with php codeigniter

http://stackoverflow.com/comment/39303491
comment on: http://stackoverflow.com/a/25231174
score: 0
type: AnswerComment
type: Comment
has text: @MarzSocks also I replaced your newly mixed regex with mine in the demo page but it didn't match `a1` yet.

http://stackoverflow.com/comment/39104679
has text: Yes, you are right. Although this of course doesn't solve this issue ..
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25122810

http://stackoverflow.com/comment/39212341
type: Comment
score: 0
has text: Did you try my latest version?
type: AnswerComment
comment on: http://stackoverflow.com/a/25182872

http://stackoverflow.com/comment/39183191
comment on: http://stackoverflow.com/a/25166645
score: 0
type: Comment
has text: @hsoto Then the fail handler must be called, add `.fail(function( jqxhr, textStatus, error ) { var err = textStatus + ", " + error; console.log( "Request Failed: " + err );` and try again. http://api.jquery.com/jquery.getjson/
type: AnswerComment

highcharts
tags question: http://stackoverflow.com/q/25088277
tags question: http://stackoverflow.com/q/25214470
tags question: http://stackoverflow.com/q/25103134
tags question: http://stackoverflow.com/q/25073510
tags question: http://stackoverflow.com/q/25155697
tags question: http://stackoverflow.com/q/25217479
tags question: http://stackoverflow.com/q/25069907
tags question: http://stackoverflow.com/q/25084790
tags question: http://stackoverflow.com/q/25180085
tags question: http://stackoverflow.com/q/25228767
tags question: http://stackoverflow.com/q/25176418
tags question: http://stackoverflow.com/q/25151490
tags question: http://stackoverflow.com/q/25104314
tags question: http://stackoverflow.com/q/25173559
tags question: http://stackoverflow.com/q/25088306
tags question: http://stackoverflow.com/q/25151721
tags question: http://stackoverflow.com/q/25228969
tags question: http://stackoverflow.com/q/25129119
tags question: http://stackoverflow.com/q/25134218
tags question: http://stackoverflow.com/q/25221025
tags question: http://stackoverflow.com/q/25082034
tags question: http://stackoverflow.com/q/25116192
tags question: http://stackoverflow.com/q/25201188
tags question: http://stackoverflow.com/q/25185112
tags question: http://stackoverflow.com/q/25082666
tags question: http://stackoverflow.com/q/25123271
tags question: http://stackoverflow.com/q/25157552
tags question: http://stackoverflow.com/q/25119323
tags question: http://stackoverflow.com/q/25134435
type: Tag
tags question: http://stackoverflow.com/q/25145610
tags question: http://stackoverflow.com/q/25091254
tag name: highcharts
tags question: http://stackoverflow.com/q/25214060
tags question: http://stackoverflow.com/q/25159226

http://stackoverflow.com/q/25191740
has comment: http://stackoverflow.com/comment/39229260
type: UnansweredQuestion
tagged with: php
upvote count: 0
has comment: http://stackoverflow.com/comment/39229709
has answer: http://stackoverflow.com/a/25200683
type: Question
tagged with: javascript
score: -1
has body: I have an html form with an input file where user can upload files to my server. When the file arrives in my PHP I can only access file name and content. Is it possible to have access to file attributes/properties or metadata? Like, last modified date, creation date, folder path, owner...? If it's not possible using PHP (I believe it's not cause when I debug the request there is no information like that being sent to the server) is it possible to have access to these information using JS?
answer count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has title: Pass file attributes/properties/metadata in form upload

http://stackoverflow.com/comment/39194636
type: Comment
type: QuestionComment
has text: Can you add the `pageScroll` function's code?
comment on: http://stackoverflow.com/q/25173036
score: 0

http://stackoverflow.com/q/25095252
score: 0
has answer: http://stackoverflow.com/a/25100899
has title: Jetbrains adding Closure as an external library
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25100899
has body: I am trying to add Closure as an external library in PyCharm. These lines demonstrate where I installed closure: Chriss-MacBook-Pro:closure chris$ pwd /Users/chris/DevLibrary/closure-library/closure Chriss-MacBook-Pro:closure chris$ ls bin css goog known_issues I've tried adding various directories in the edit libraries dialog such as: /Users/chris/DevLibrary/closure-library/ /Users/chris/DevLibrary/closure-library/closure /Users/chris/DevLibrary/closure-library/closure/goog I've also tried adding the individual files. But every time my File Watcher runs I still get: java -jar /Users/chris/Projects/housemaps/compiler.jar --compilation_level SIMPLE_OPTIMIZATIONS --js housemap.js housemap.js:1: ERROR - required "goog.dom" namespace never provided goog.require('goog.dom'); ^ 1 error(s), 0 warning(s)
tagged with: pycharm
type: AnsweredQuestion

http://stackoverflow.com/comment/39284056
type: QuestionComment
comment on: http://stackoverflow.com/q/25106621
score: 0
has text: How about this as a debugging step: add a div to the page, say just after the video tag, and give it a unique id, `foo`. Then, just after calling `applyBindings`, set `window.theInitialElement = document.getElementById('foo')`. Once the page has loaded, when it seems that the bindings have not been applied, run `document.getElementById('foo') === window.theInitialElement` in the console. If there is still only one `foo` on the page, but it is a different foo, then there might be some code doing `body.innerHTML = body.innerHTML` or something similarly crazy which is breaking the page.
type: Comment

http://stackoverflow.com/q/25154982
answer count: 0
type: UnansweredQuestion
has body: I want to set a number of columns of datatable with type "formatted-num". I can't use the static way because I don't know the number of columns; they are created dynamically. How can I accomplish this? here is the way for a number known of columns : "aoColumns": [ null, null, { "sType": "formatted-num" }, { "sType": "formatted-num" }, { "sType": "formatted-num" }, { "sType": "formatted-num" } ] and here is my datatable js : And here is my html code : nom <?php for($i = 0 ; $i < $nbre ; $i++) { ?> <?php echo $nom[$i]; ?> <?php } ?> <?php for($i = 0 ; $i < $total ; $i++) { ?> <?php echo $totals_ca[$i]['nom']; ?> <?php for($j = 0 ; $j < $nbre ; $j++) { ?> <?php echo $totals_ca[$i][$nom[$j]]; ?> <?php } ?> <?php } ?> Regards , thanks.
tagged with: php
has comment: http://stackoverflow.com/comment/39161768
has comment: http://stackoverflow.com/comment/39160490
linked to: http://stackoverflow.com/q/16156230
has title: setting a number unkonwn of columns of datatable jquery with specific type "formatted-num" dynamicaly?
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: datatables

validation
tags question: http://stackoverflow.com/q/25134524
tags question: http://stackoverflow.com/q/25084390
tags question: http://stackoverflow.com/q/25163171
tags question: http://stackoverflow.com/q/25127088
tags question: http://stackoverflow.com/q/25143761
tags question: http://stackoverflow.com/q/25214650
tags question: http://stackoverflow.com/q/25220959
tags question: http://stackoverflow.com/q/25229784
tags question: http://stackoverflow.com/q/25126710
tags question: http://stackoverflow.com/q/25167047
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/25216111
tags question: http://stackoverflow.com/q/25110596
tags question: http://stackoverflow.com/q/25182192
tags question: http://stackoverflow.com/q/25203108
tags question: http://stackoverflow.com/q/25093897
tags question: http://stackoverflow.com/q/25106096
tags question: http://stackoverflow.com/q/25207544
tags question: http://stackoverflow.com/q/25197067
tags question: http://stackoverflow.com/q/25119196
tags question: http://stackoverflow.com/q/25170749
tags question: http://stackoverflow.com/q/25104092
tags question: http://stackoverflow.com/q/25198933
tags question: http://stackoverflow.com/q/25226134
tags question: http://stackoverflow.com/q/25210614
tags question: http://stackoverflow.com/q/25075418
tags question: http://stackoverflow.com/q/25203048
tags question: http://stackoverflow.com/q/25143556
tags question: http://stackoverflow.com/q/25096552
tags question: http://stackoverflow.com/q/25204231
tags question: http://stackoverflow.com/q/25168464
tags question: http://stackoverflow.com/q/25130543
tags question: http://stackoverflow.com/q/25118433
tags question: http://stackoverflow.com/q/25173040
tags question: http://stackoverflow.com/q/25071378
tags question: http://stackoverflow.com/q/25122340

http://stackoverflow.com/q/25133945
has body: I have an html code where there are two parent checkboxes and their children respectively. Onclick of parent checkbox the children belonging to that parent should be checked. In my case , if I check a parent checkbox all child checkboxes are selected. I know its the problem with the classname I can name with two different class names and solve the problem. But i cannot change the classnames. It should be the same. how do I fix this?? index.html Parent1&lt;input name="parent" class="pc-box" type="checkbox"&gt; Child 1&lt;input class="check" name="child" type="checkbox"&gt; Child 2&lt;input class="check" name="child" type="checkbox"&gt; Child 3&lt;input class="check" name="child" type="checkbox"&gt; &lt;br&gt; Parent2&lt;input name="parent" class="pc-box" type="checkbox" &gt; Child 1 &lt;input class="check" name="child" type="checkbox"&gt; Child 2 &lt;input class="check" name="child" type="checkbox"&gt; Child 3 &lt;input class="check" name="child" type="checkbox"&gt; index.js $(document).ready(function() { $(".pc-box").click(function() { if (this.checked) { ('.check').prop('checked',$(this).prop('checked')); } }); }); here is my fiddle
tagged with: javascript
has answer: http://stackoverflow.com/a/25134000
answer count: 2
downvote count: 0
has title: Check the child checkboxes onclick of parent checkbox
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25133989
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/25134000
possible better answer: http://stackoverflow.com/a/25133989
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question

http://stackoverflow.com/comment/39306847
type: Comment
type: AnswerComment
has text: Yes, at that zoom level, my Galaxy Nexus as well as Galaxy S4 running Chrome can only reach 40-45 fps. It's not terrible but I would prefer better. However, my camera does not zoom out or in, the blocks are always 40px, which gives an average of 80-100 images drawn per frame. I did a lot of testing in jsPerf and noticed the actual image size does not matter as it will be scaled up to 40px eitherway.
score: 0
comment on: http://stackoverflow.com/a/25216529

http://stackoverflow.com/comment/39277785
comment on: http://stackoverflow.com/a/25217461
type: AnswerComment
type: Comment
score: 0
has text: Hi Dave, glad I could be of assistance

http://stackoverflow.com/a/25212671
answers question: http://stackoverflow.com/q/25212560
has body: Make sure you included the jQuery library. In your fiddle you are using 2.1, so try including jQuery 2.1 into your .html file like so:
score: 0
type: Answer

http://stackoverflow.com/a/25130574
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25130465
has body: When using .success or .error from a promise, Angular does nothing with the return value, so there is no point in returning anything. The value passed to the .success/.error callbacks is the result from the original promise. If you use .then(success,error) however, then the return value is passed to the next promise in the promise chain. For example, you could modify your service to use .then and return the uri: Service // Resolves an API endpoint link to its Http counterpart function resolveJSONEndpointToHttpUrl(JSONEndpointUrl) { return $http({ method: 'GET', url: JSONEndpointUrl }). then(function (data, status, headers, config) { console.log("resolveJSONEndpointToHttpUrl : data"); console.log(data); return data.data.uri; }); } Controller Then, in your controller, you can handle the result: function redirectViaJSONLink(url) { return musicCollectionService.resolveJSONEndpointToHttpUrl(url).then(function (uri) { // Perform redirection $window.location.href = uri; }); }
answers question: http://stackoverflow.com/q/25130465
type: AcceptedAnswer

http://stackoverflow.com/a/26528555
accepted answer of: http://stackoverflow.com/q/25210156
answers question: http://stackoverflow.com/q/25210156
score: 16
type: AcceptedAnswer
downvote count: 0
has body: There is an option "-X" ("explain") which creates a JSON file with parsed AST. jsdoc -X ./mylib/ &gt; jsdoc-ast.json To understand this JSON you can use documented schema: https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/schema.js
has comment: http://stackoverflow.com/comment/113124713
type: Answer
upvote count: 16
has comment: http://stackoverflow.com/comment/41761755
has comment: http://stackoverflow.com/comment/113088136

http://stackoverflow.com/comment/39172986
type: QuestionComment
comment on: http://stackoverflow.com/q/25161284
has text: You should add the Javascript / jQuery tagg to your question.
score: 0
type: Comment

http://stackoverflow.com/comment/39294941
score: 0
type: AnswerComment
type: Comment
has text: no that's not the problem , i didn't copy paste that right.
comment on: http://stackoverflow.com/a/25227106

http://stackoverflow.com/comment/115115716
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/64693106
has text: Hi, I have a similar issue even after I changed my S3 like yours. I also added the '?origin=localhost'. However, nothing changes. I use CloudFront and I request it from Angular 10. Could you help me? Thx

http://stackoverflow.com/comment/39259165
has text: I didnt put that in the post for the clarity. If you just download the library and put an extra div to wrap it around the collapse does not work. The other ones where there is no div seems to work fine(collapse function)
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25195662

http://stackoverflow.com/comment/39282683
score: 0
comment on: http://stackoverflow.com/q/25218550
type: Comment
type: QuestionComment
has text: React components should be reusable, so can you just render it twice?

http://stackoverflow.com/comment/39073146
type: QuestionComment
comment on: http://stackoverflow.com/q/25107740
score: 0
has text: Have you looked into using Vector Graphics? This would be trivial to do as an SVG in Inkscape. All modern browsers support SVG (http://caniuse.com/svg-img).
type: Comment

http://stackoverflow.com/comment/39010058
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25072874
has text: @Dreamonic same user asked both questions.
score: 0

http://stackoverflow.com/comment/39081751
comment on: http://stackoverflow.com/q/25112565
type: Comment
score: 1
has text: ajax is meant for asynchronous ops. Your setting `async: false` defies it. Bad design.
type: QuestionComment

http://stackoverflow.com/a/25193704
type: Answer
has body: Okay I see what the issue is. Hoping this will help other people out there having this same issue. grunt-contrib-jasmine does not display errors or failed expects inside of beforeEach or afterEach with the display option set to short. Setting this option to full will once again display Errors and failed expects.
accepted answer of: http://stackoverflow.com/q/25175762
answers question: http://stackoverflow.com/q/25175762
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25081805
has comment: http://stackoverflow.com/comment/39026679
has comment: http://stackoverflow.com/comment/39025866
favorite count: 0
has comment: http://stackoverflow.com/comment/39024188
has comment: http://stackoverflow.com/comment/39025497
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39025206
accepted answer: http://stackoverflow.com/a/25082028
has comment: http://stackoverflow.com/comment/39024445
has body: I am not sure why my grunt-watch is not running for the JS or CSS configurations My Grunt file is in a 'tools' folder. The project folder structure looks like this: -index.html -js -css -tools --package.json --node modules --gruntfile.js Here is my CSS folder structure: -css --src ---styles.css ---third-party ----bootstrap.css Here is my JS folder structure: -js --src ---app.js ---third-party ----jquery.js Here is my package.json { "name": "my-project-name", "version": "0.1.0", "devDependencies": { "grunt": "~0.4.5", "grunt-contrib-cssmin": "^0.10.0", "grunt-contrib-jshint": "~0.10.0", "grunt-contrib-uglify": "~0.5.0", "grunt-contrib-watch": "^0.6.1", "matchdep": "^0.3.0" } } Here's my gruntfile, it is the watch task that does not seem to work: module.exports = function(grunt){ //Loads the necessary tasks for this Grunt file. require('matchdep').filterDev('grunt-contrib-*').forEach(grunt.loadNpmTasks); // Project configuration grunt.initConfig({ // Load package.json file so that access is given to the project name and version number. pkg: grunt.file.readJSON('package.json'), // Constants for the Gruntfile so we can easily change the path for our environments. //note: end with / BASE_PATH: '../', JS_SOURCE_PATH: '../js/src/', JS_BUILD_PATH: '../js/build/', CSS_SOURCE_PATH: '../css/src/', CSS_BUILD_PATH: '../css/build/', uglify: { files: { expand: true, cwd: '&lt;%= JS_SOURCE_PATH %&gt;', src: '**/*.js', dest: '&lt;%= JS_BUILD_PATH %&gt;', flatten: false, } }, jshint: { options: { jshintrc: '&lt;%= JS_SOURCE_PATH %&gt;.jshintrc', force: true }, all: [ '&lt;%= JS_SOURCE_PATH %&gt;**/*.js', '!&lt;%= JS_SOURCE_PATH %&gt;third-party/**/*.js' ] }, cssmin: { options: { keepBreaks: true, report: 'gzip' }, minify: { expand: true, cwd: '&lt;%= CSS_SOURCE_PATH %&gt;', src: '**/*.css', dest: '&lt;%= CSS_BUILD_PATH %&gt;' } }, watch: { options: { livereload: true, nospawn: true }, js: { files: ['&lt;%= JS_SOURCE_PATH %&gt;**/*.js'], tasks: ['jshint'] }, css: { files: ['&lt;%= CSS…
answer count: 1
has title: Grunt Watch no running task for JS or CSS
tagged with: node.js
has comment: http://stackoverflow.com/comment/39024769
has comment: http://stackoverflow.com/comment/39025895
has comment: http://stackoverflow.com/comment/39026527
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/39026514
score: 2
has comment: http://stackoverflow.com/comment/39024985
downvote count: 0
has answer: http://stackoverflow.com/a/25082028
tagged with: javascript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39024652

http://stackoverflow.com/q/25175798
tagged with: arrays
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/51887667
type: AnsweredQuestion
downvote count: 0
type: Question
accepted answer: http://stackoverflow.com/a/25176872
has title: How to shuffle a NodeList
possible better answer: http://stackoverflow.com/a/51887667
tagged with: javascript
has answer: http://stackoverflow.com/a/25176872
tagged with: nodelist
answer count: 2
score: 5
has body: Let's say I have a Nodelist: list = document.querySelectorAll('div'); and I want to shuffle it. How would I do this? The only answer I came across, here suggests turning the nodelist into an array using var arr = [].concat(x); Similarly, the MDN suggests the following (to turn a NodeList into an array): var turnObjToArray = function(obj) { return [].map.call(obj, function(element) { return element; }) }; My question is, is there no way to do this without turning a NodeList into an array? And, which of the above two methods is better? And, once you have turned a NodeList into an array, does anything change when you operate on certain members of the array? (I.e. does deleting one node from the array delete it from the NodeList)?

http://stackoverflow.com/comment/39014657
has text: WOW, I never thought that would be it and here I was scratching my head for a couple of days. Thanks a lot it worked :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25076688
type: Comment

http://stackoverflow.com/comment/39212760
comment on: http://stackoverflow.com/a/25183380
has text: @bharat There are suggested resources in the [tag:regex] tag info.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/39162754
score: 0
has text: i check my query is working fine.. its resulting me count of 5 , as in my table there is 5 record .. but dont know why its not showing with server side events
comment on: http://stackoverflow.com/q/25155818
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/39117122
type: Comment
comment on: http://stackoverflow.com/q/25129845
has text: @pankajparkar I am not getting an console errors.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25197184
possible better answer: http://stackoverflow.com/a/29881817
has body: Does anyone know if it's possible to get just the height of an element (minus vertical padding, border, and margin) when there is no inline height declaration? I need to support IE8 and above. el.style.height doesn't work because the styles are set in an external style sheet. el.offsetHeight or el.clientHeight doesn't work because they include more than just the element's height. And I can't just subtract the element's padding, etc. because those values are also set in a CSS stylesheet, and not inline (and so el.style.paddingTop doesn't work). Also can't do window.getComputedStyle(el) because IE8 doesn't support this. jQuery has the height() method, which offers this, but I'm not using jQuery in this project, plus I just want to know how to do this in pure JavaScript. Anyone have any thoughts? Much appreciated.
score: 98
has answer: http://stackoverflow.com/a/29881817
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25197206
tagged with: css
favorite count: 0
has title: Get the height of an element minus padding, margin, border widths
type: Question
has comment: http://stackoverflow.com/comment/39239263
has comment: http://stackoverflow.com/comment/39239206
has answer: http://stackoverflow.com/a/38929456
has comment: http://stackoverflow.com/comment/39239159
upvote count: 98
has comment: http://stackoverflow.com/comment/39239358
answer count: 5
has answer: http://stackoverflow.com/a/25197206
linked to: http://stackoverflow.com/q/13435604
has comment: http://stackoverflow.com/comment/39239394
linked to: http://stackoverflow.com/q/13382516
has comment: http://stackoverflow.com/comment/39239335
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/56531945
has answer: http://stackoverflow.com/a/28879630

opencv
type: Tag
tag name: opencv
tags question: http://stackoverflow.com/q/25228583

http://stackoverflow.com/comment/39182540
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25165234
type: Comment
has text: @Cmndo use this instead: ` `, then just set a single active property based on the indexRef of the event: `set('active', e.indexRef.i)`

http://stackoverflow.com/a/25145312
answers question: http://stackoverflow.com/q/25145242
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: The issue here is the declaration of the variable. If you think about how this is evaluated var will be declared for foo before anything else is evaluated. bar is essentially pointing to something the namespace is completely unaware of. Once you declare var foo the namespace is aware of the variable regardless of the actual value. In this way without var the namespace tries to look for a built in function or some other non variable definition.

http://stackoverflow.com/a/25076285
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: If you want to add the ID cat to .dog, use this: $(".horse:visible .dog").attr("id", "cat"); Here is an example.
answers question: http://stackoverflow.com/q/25076189

http://stackoverflow.com/q/25081449
favorite count: 0
has title: how to skip confirm pop up on beforeunload and show my own bootstrap modal?
has answer: http://stackoverflow.com/a/25081949
tagged with: twitter-bootstrap
upvote count: 3
downvote count: 1
score: 2
type: AnsweredQuestion
has body: I want to skip the default pop up which will come on beforeunload event and want to show my own modal which is asking the user to give feedback on browser/tab close. In that modal if user click "OK" then I want to redirect the user to my feedback page and if the user clicks "NO" then the particular tab should close. Is there a way to do this?
has comment: http://stackoverflow.com/comment/50246232
accepted answer: http://stackoverflow.com/a/25081949
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25122056
answers question: http://stackoverflow.com/q/25121371
has body: As I was saying in comment: We had to solve this for a group of plugins that needed to be arbitrarily applied to loaded pages. Solution: We trigger our own "panel.loaded" event inside the Ajax load(s), passing the new panel as a property. The top-level page code catches the panel.loaded event and applies plugins based on matching classes within in the loaded page. e.g. Inside your Ajax load: var e = jQuery.Event("panel.loaded", {$panel: data}); $(document).trigger(e); Inside your master page: $(document).on('panel.loaded' function(e){ // 1) Find a specific part of the loaded panel tabs(e.$panel.find('.tabswrap')); // Or 2) simply pass the loaded panel to tabs tabs(e.$panel); // Or 3) you don't really care about the panel loaded and // will simply apply tabs again to the entire page tabs(); }); This implementation implies a version of tabs() that can take the loaded panel as an argument. Otherwise it may be reapplying to the entire page. That is your call as you have not provided the code for tabs(). Simple Mockup: http://jsfiddle.net/TrueBlueAussie/z4GK7/3/ Simpler version. You can also pass an additional, separate, property object to trigger, avoiding the need to create an Event object. e.g. $(document).trigger("panel.loaded", {$panel: data}); and use with: $(document).on('panel.loaded' function(e, params){ // 1) Find a specific part of the loaded panel tabs(params.$panel.find('.tabswrap')); // Or 2) simply pass the loaded panel to tabs tabs(params.$panel); // Or 3) you don't really care about the panel loaded and // will simply apply tabs again to the entire page tabs(); });
has comment: http://stackoverflow.com/comment/39133197
downvote count: 0
has comment: http://stackoverflow.com/comment/39150041
has comment: http://stackoverflow.com/comment/39161537
type: Answer
has comment: http://stackoverflow.com/comment/39134140
score: 1
upvote count: 1

http://stackoverflow.com/q/25075748
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39013547
score: 0
linked to: http://stackoverflow.com/q/757232
answer count: 3
possible better answer: http://stackoverflow.com/a/25077828
tagged with: asp.net
has title: Obtaining textbox values from jquery modal popup which has repeater control within it
has answer: http://stackoverflow.com/a/25082849
accepted answer: http://stackoverflow.com/a/25082849
has comment: http://stackoverflow.com/comment/39014645
has comment: http://stackoverflow.com/comment/39014106
has comment: http://stackoverflow.com/comment/39013755
tagged with: vb.net
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25079419
has answer: http://stackoverflow.com/a/25077828
has body: I have a very strange issue which I just don't understand. I have an asp.net repeater control which is built into a jquery modal. The code for the control is here. &lt;div id="dialog" style="display:none"&gt; &lt;asp:Repeater id="myrepeater" runat="server" &gt; &lt;HeaderTemplate&gt;&lt;/HeaderTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:TextBox ID="txtAnswer" TextMode="MultiLine" Columns="50" Rows="4" runat="server" /&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt;&lt;/FooterTemplate&gt; &lt;/asp:Repeater&gt; &lt;/div&gt; &lt;asp:Button ID="Button1" runat="server" Text="Button" style = "display:none" OnClick="Submit1" OnClientClick="return ValidateInput()" /&gt; I then call jquery/javascript PopupCenter from asp.net vb.net code behind method. function PopupCenter() { $(function () { $("#dialog").dialog({ title: "Questions and answers", width: 1200, height: 750, buttons: { Ok: function () { $("[id*=Button1]").click(); }, Close: function () { $(this).dialog('close'); } } }); }); } Everything works well. the modal appears with the textboxes. I have bound my asp.net button to a postback event called Submit1. Inside the code behind which successfully fires I then do this... Protected Sub Submit1(ByVal sender As Object, ByVal e As System.EventArgs) For i = 0 To myrepeater.Items.Count - 1 Dim dynTxtAnswer As TextBox = DirectCast(qtaRepeater.Items(i).FindControl("txtAnswer"), TextBox) Next End Sub So in above for loop what I am expecting is the Text values for the textboxes in the repeater. I can get access to the textboxes. Just it states an empty string and not the string values. So overall completely stumped. I wondered if anyone had an idea of why this is happening. Thank you.
type: Question

http://stackoverflow.com/a/25208536
answers question: http://stackoverflow.com/q/25208377
score: 3
has comment: http://stackoverflow.com/comment/39267738
upvote count: 3
has body: Modernizr Modernizr doesn't add any features to your browser (well except for the html5shiv which adds support for unrecognized tags in old IE, that is a huge feature in itself). Modernizr is for feature-detection. It can tell you that your browser does or does not support something like email type attribute. Polyfills What you need is a polyfill like Webshim. It has the ability to substitute some missing browser features, with a javascript driven solution. Like form validation. A common feature of polyfills is that they don't replace the existing features in your browser. They only activate when the browser lacks the feature. There are exceptions to this though. There is a HUGE number of polyfills available for most features. For forms alone there are plenty. Most of them do what you want. Webshim I have picked Webshim because I have heard of the author. It has quite a few configuration options but these 2 steps should be enough: Include the javascript anywhere on your page. You also need to include jQuery before, as Webshim depends on it: &lt;script src="js/jquery.js"&gt;&lt;/script&gt; &lt;script src="js-webshim/minified/polyfiller.js"&gt;&lt;/script&gt; Initiate the polyfill. &lt;script&gt; webshim.polyfill('forms'); &lt;/script&gt; Don't hesitate to ask if you have any more questions on getting this working.
type: Answer
has comment: http://stackoverflow.com/comment/39279341
downvote count: 0

http://stackoverflow.com/comment/39022327
comment on: http://stackoverflow.com/q/25080824
has text: You will need to have one bool variable & while returning from inner function set that variable & in outer function check it's value,if it;s set as true then return from outer as well.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39056750
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25098887
type: AnswerComment
has text: @maček - Just for fun. (Because I thought this question is going to be closed for duplicate)

http://stackoverflow.com/q/25227975
tagged with: zooming
score: 3
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/29672512
type: UnansweredQuestion
has body: I'm having trouble fixing panning in this example - it works fine unless you move the zoomed image and then zoom again(offset is set to default value and the view jumps to initial position - http://jsfiddle.net/p2Qzg/). Any ideas on how to fix that? I've been trying to solve that for three days now, without any good results. var canvas= document.getElementById("myCanvas"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var stage = new createjs.Stage("myCanvas"); function addCircle(r,x,y){ var g=new createjs.Graphics().beginFill("#ff0000").drawCircle(0,0,r); var s=new createjs.Shape(g) s.x=x; s.y=y; stage.addChild(s); stage.update(); } addCircle(10,200,100); addCircle(5,canvas.width/2,canvas.height/2); addCircle(3,400,400); canvas.addEventListener("mousewheel", MouseWheelHandler, false); canvas.addEventListener("DOMMouseScroll", MouseWheelHandler, false); var zoom; function MouseWheelHandler(e) { if(Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail)))&gt;0) zoom=1.1; else zoom=1/1.1; stage.regX += stage.mouseX - stage.regX; stage.regY += stage.mouseY - stage.regY; stage.x=stage.mouseX; stage.y=stage.mouseY; stage.scaleX=stage.scaleY*=zoom; stage.update(); } stage.addEventListener("stagemousedown", function(e) { var offset={x:stage.x-e.stageX,y:stage.y-e.stageY}; stage.addEventListener("stagemousemove",function(ev) { stage.x = ev.stageX+offset.x; stage.y = ev.stageY+offset.y; stage.update(); }); stage.addEventListener("stagemouseup", function(){ stage.removeAllEventListeners("stagemousemove"); }); });
tagged with: panning
upvote count: 3
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
has title: EaselJS - broken panning on zoomed image
tagged with: easeljs

http://stackoverflow.com/comment/39289606
type: QuestionComment
type: Comment
has text: I fear that this might be impossible. If you are doing AJAX then maybe there is an async flag you can set to true but in general there is no way to wait until the async function completes.
comment on: http://stackoverflow.com/q/25224265
score: 0

http://stackoverflow.com/comment/39254710
comment on: http://stackoverflow.com/q/25205563
score: 0
has text: have you tried: ``$("#id_cleanse")[0].checked``
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39253909
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25205123
has text: Then remove jQuery, remove jQuery UI, remove angularjs and remove requirejs as well. Then it would be an idea to serch for `addEventListener javascript` on google
type: Comment

http://stackoverflow.com/comment/39120208
comment on: http://stackoverflow.com/q/25133159
score: 0
type: Comment
type: QuestionComment
has text: i would just not bother about the performance and give importance to readability here, which for me is your first snippet.You are not going to compare loads of string aren't you ?

http://stackoverflow.com/comment/39040031
score: 0
type: Comment
has text: Doh! That was a waste of an hour! In chrome & firefox it saves automatically and in IE a window opens so if a user has not changed their settings by default will they see the where to save dialog regardless of the browser they're using?
type: QuestionComment
comment on: http://stackoverflow.com/q/25089797

http://stackoverflow.com/comment/39252707
type: Comment
comment on: http://stackoverflow.com/a/25203854
has text: @user3875706 You can "draw" shapes on HTML5's canvas. Take a look at [this tutorial](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Canvas_tutorial/Drawing_shapes).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39091566
comment on: http://stackoverflow.com/q/25117625
type: Comment
has text: Don't try your code sample, but wouldn't it be easier using ng-pattern and not ng-patter?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39242382
type: AnswerComment
comment on: http://stackoverflow.com/a/25198794
type: Comment
score: 0
has text: @Dreamonic both demos are working correctly for me on Chrome. The `blur` event handler doesn't have the `:not(:contains(...))` which is needed to re-display the content which does not match the input - but the `input` event does have this.

http://stackoverflow.com/q/25179373
tagged with: ajax
upvote count: 1
answer count: 0
downvote count: 0
type: UnansweredQuestion
has title: How to update users list on display page when new user is added to database
tagged with: php
has comment: http://stackoverflow.com/comment/39205597
has body: I am displaying users list in a div and I want to update a div with new users without refreshing page . I want to call a sever file only when new user added to the database like Gmail inbox/chat list update. If I call a file through ajax by giving setInterval for 5 seconds, page is get strucking after some time. What's better solution for this. Can anyone suggest me.
score: 1
tagged with: database
type: Question
has comment: http://stackoverflow.com/comment/39205501
has comment: http://stackoverflow.com/comment/39205527
has comment: http://stackoverflow.com/comment/39205670
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/25214818
has comment: http://stackoverflow.com/comment/39277796
type: Answer
upvote count: 1
has body: One problem is: input !== td_element.text() You're comparing partial input values to the entire contents of your columns. Instead it should be something like td_element.text().indexOf(input) == -1 But there were actually quite a few issues (including simple syntax errors, e.g., td_element is not a function). I tweaked your example to something that works: http://jsfiddle.net/gh5kjku5/2/ $("#search").on("keyup", function(){ var input = $(this).val(); $("#search_table tbody tr").each(function(){ var row = $(this); var td_elements = row.find('td'); var colText = td_elements.text(); if(colText.indexOf(input) == -1){ row.hide(); }else{ row.show(); td_elements.addClass("highlight"); } })}); You'll need to do a bit more work to do things like reset the td background colors when the search box is cleared. Good luck!
score: 1
has comment: http://stackoverflow.com/comment/39272294
downvote count: 0
answers question: http://stackoverflow.com/q/25214776

http://stackoverflow.com/comment/39536607
score: 0
has text: Yes. This way, it would be easy to export the data to excel with one simple copy-paste.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25113800

http://stackoverflow.com/comment/39131776
score: 0
has text: I have mentioned the problem with Google search
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25139414

http://stackoverflow.com/a/25218507
answers question: http://stackoverflow.com/q/25218347
has comment: http://stackoverflow.com/comment/39280161
has comment: http://stackoverflow.com/comment/39279401
downvote count: 0
has comment: http://stackoverflow.com/comment/39279551
has comment: http://stackoverflow.com/comment/39280032
has comment: http://stackoverflow.com/comment/39279532
has comment: http://stackoverflow.com/comment/39279234
type: Answer
has comment: http://stackoverflow.com/comment/39279577
has comment: http://stackoverflow.com/comment/39280002
has comment: http://stackoverflow.com/comment/39279785
upvote count: 1
has body: Not too sure what the point of this really is to be honest? If you're looking to build something that would be used across a portfolio of sites you manage, then you're probably pushing your luck to force a user to install an extension simply to show they accept your cookies. If it's aimed at a wider audience, i.e. potentially anyone using any website, then the other issue you'll have is getting both users to see the benefit of installing another extension and secondly website operators to write the code necessary to detect your cookie and act accordingly. Most sites seem to be striving to make cookies and the associated obligations under the legislation as unintrusive as possible - requiring installation of an extension &amp; changes to website code seems to be heading in the opposite direction..
score: 1
has comment: http://stackoverflow.com/comment/39279666

http://stackoverflow.com/comment/39045061
type: Comment
has text: try onBeforeLoad() function
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25092761

http://stackoverflow.com/q/25090340
tagged with: css
has comment: http://stackoverflow.com/comment/39040769
answer count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39040757
has body: I am using Canvas.js to create graphs, and I placed one inside of a &lt;div&gt;, and it overlaps on the bottom two sides. I have tried creating another &lt;div&gt; inside the initial one to no avail. Here is the relevant html: &lt;div class="box" id="gdpbox"&gt; &lt;script type = 'text/javascript'&gt; var gdpChart = new CanvasJS.Chart("gdpbox", { title: { text: "Gross Domestic Product" }, data: [{ type: "line", dataPoints: [ //I took out about 500 data points, these are just for reference { x: new Date(2013,07,01), y: 15779.9}, { x: new Date(2013,10,01), y: 15916.2}, { x: new Date(2014,01,01), y: 15831.7}, { x: new Date(2014,04,01), y: 15985.7}, ] }] }); gdpChart.render(); gdpChart = {}; &lt;/script&gt; &lt;/div&gt; Here is the CSS for box: .box{ /* height:40%; width:35%; */ } and for gdpbox: #gdpbox{ border: solid #60C3B1; position:absolute; margin: 5% 13% auto; } Here is what the graph currently looks like: It should be enclosed in the teal box. Hopefully this is detailed enough to show what I'm doing wrong. I can provide more details if needed. I realized that the default graph size is 500px, and that is what is causing it to overlap. But now I cannot figure out how to fit the graph inside of my box, because the box does not have a set size.
tagged with: javascript
score: 0
has title: Graph created inside of a seems to be larger then the itself and overlaps
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25212768
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/25213280
has body: hello im having a small issue of where to exactly place the appID from facebook for the share function to work. I get the error. "The parameter app_id is required" edit: sorry i forgot to mention how i want it to work. i need it to grab to the current url to share on facebook for multiple products. EDIT2: reupdated the code but still am getting an error SHARE THIS! google+ pintrest facebook twitter instagram
has title: where to place app id for javascript share for facebook
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25213280
has comment: http://stackoverflow.com/comment/39268866
has comment: http://stackoverflow.com/comment/39269217
downvote count: 0
answer count: 1
tagged with: share
has comment: http://stackoverflow.com/comment/39268658
favorite count: 0
tagged with: facebook

http://stackoverflow.com/comment/39155393
comment on: http://stackoverflow.com/a/25140771
score: 0
type: Comment
has text: I wanted to detect the browser close because only when browser is closed I wanted to update some data of the signed in user and clear the session of the user.
type: AnswerComment

http://stackoverflow.com/comment/42835134
type: Comment
has text: "Querying by properties of an association is not currently possible with Sails" = ouch. This is a first order operation in any type of a search page, and querying 101 in relational DB land. I guess it's time to check out .native(), or have to do all of the filtering in js (I'm sure that will scale, lol).
type: AnswerComment
comment on: http://stackoverflow.com/a/25098667
score: 0

http://stackoverflow.com/comment/39169274
type: QuestionComment
has text: @Nith At the moment I want to clip the images. These aren't the images I'm going to use in the actual version and they're going to probably be clipped in that one. Unless there is some reason its messing with what I'm trying to do here I'll sort that out when I'm refining design
comment on: http://stackoverflow.com/q/25158132
score: 0
type: Comment

http://stackoverflow.com/a/25604971
score: 0
answers question: http://stackoverflow.com/q/25215243
type: Answer
has body: I Solved it temp. I have used Dojo.xhrPost to send the request to the dummy page. After receiving the response from the dummy page, I have set the form values.

http://stackoverflow.com/comment/39275021
type: AnswerComment
score: 0
type: Comment
has text: as i told u bro , you cannot submit files using jQuery , you have to submit your form inside hidden iframe only or using xhr class
comment on: http://stackoverflow.com/a/25216230

http://stackoverflow.com/comment/39162052
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25155856
score: 0
has text: Thank you for this answer, but the end result is massive gaps in between P tags and the text within them. Unfortunately in my case this is not acceptable.

http://stackoverflow.com/q/25221932
score: 0
answer count: 1
type: AnsweredQuestion
has body: I'm doing an administrative panel where in all delete actions I show a modal asking if the user is sure that he wants to remove. And all my deletes are doing with jQuery Ajax. If user click in "yes" I execute my delete, if user clicks in "no" I will close my modal. The issue Im having is, in this administrative panel I can remove, news, users, categories and images. But I just want to use one div dialog, like I have below: Are you sure you want to delete this news? Yes No But If I use always this div, Im always getting this message "Are you sure you want to delete this news?". Even when I click to delete an user or a categorie, Im showing a message if user wants to remove "this news". Do you know how I can keep only one div, but display a different message depending on if user is removing an image, a news, an user or a category? //This is my code jQuery, in case of a news delete $('.content').on('click','.j_newsdel',function(){ var newsid = $(this).attr('id'); $('.content .news li[id="'+ newsid +'"]').css('background','red'); $('.delete_dialog').fadeIn("slow",function(){ $('.confirm').fadeIn("slow"); }); $("a#no").click(function(event){ event.preventDefault(); $('.confirm').fadeOut("slow",function(){ $('.delete_dialog').fadeOut("slow"); }); $('.content .not li[id="'+ newsid +'"]').css('background','white'); }); $("a#delete").click(function(event){ event.preventDefault(); $.post(url,{action:'news_del',id: newsid},function(){ window.setTimeout(function(){ $('.content .news li[id="'+ newsid +'"]').fadeOut("slow"); },500); $('.confirm').fadeOut("fast",function(){ $('.delete_dialog').fadeOut("fast"); }); }); }); return false; })
has comment: http://stackoverflow.com/comment/39285601
has answer: http://stackoverflow.com/a/25222165
type: Question
accepted answer: http://stackoverflow.com/a/25222165
tagged with: javascript
tagged with: jquery
has title: display a different message depending if the user wants to remove an image, a user, a category or a news

http://stackoverflow.com/comment/39127595
comment on: http://stackoverflow.com/q/25137156
type: Comment
type: QuestionComment
has text: I guess this comment should help you out: http://stackoverflow.com/a/2919363/2328888
score: 1

http://stackoverflow.com/comment/39296407
type: AnswerComment
has text: @RoyiNamir: Right. But there's no reason to create and throw away a temporary builder function on every loop like that in addition to the function we're creating for `setTimeout`. Just use `bind`, that's what it's for.
type: Comment
comment on: http://stackoverflow.com/a/25227855
score: 0

http://stackoverflow.com/q/25175559
type: Question
score: 0
has body: http://liveweave.com/R9jW9x I have 4 textbox's each representing a css padding location (ex. padding-top, padding-left, etc:) I'm experimenting with value detections. What I'm trying to figure out is when padding top and bottom [A] are the same values (as well as left and right [B]) how to set the values to padding: A B; If all are same to set value to padding: A; If all are different set value to nothing/blank and If all are different, or A &amp; B maybe same, but C and D maybe different then to set value to padding: A B C D; The script works fine onload, but when the input values are changed my result is not finalizing. Can anybody explain why this is? $(document).ready(function() { var top = $(".padding-top").val(), bottom = $(".padding-bottom").val(), left = $(".padding-left").val(), right = $(".padding-right").val(), result = $(".padding-final"); // Update padding code var Finalize = function() { if ((top === "") &amp;&amp; (right === "") &amp;&amp; (bottom === "") &amp;&amp; (left === "")) { // Check if all are empty result.val(""); } else if ((top === right) &amp;&amp; (bottom === left)) { // If all are same result.val("padding: " + top + "px;"); } else if ((top === bottom) &amp;&amp; (left === right)) { // Check if first two values are same result.val("padding: " + top + "px " + left + "px;"); } else { result.val("padding: " + top + "px " + right + "px " + bottom + "px " + left + "px;"); } }; // Update padding code when sides change $(window).on('load keyup change', function() { Finalize(); }); });
answer count: 3
tagged with: arrays
tagged with: jquery
has title: If values are the same update code
has answer: http://stackoverflow.com/a/25175759
possible better answer: http://stackoverflow.com/a/25175759
has comment: http://stackoverflow.com/comment/39199746
has answer: http://stackoverflow.com/a/25175878
accepted answer: http://stackoverflow.com/a/25175878
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39227574
tagged with: if-statement
tagged with: javascript
has answer: http://stackoverflow.com/a/25176226

http://stackoverflow.com/a/25135078
has body: The tag that you are mentioning in your HTML should be a 'canvas' tag instead of 'div' Here is a jsFiddle demo for the same. Hope it helps :)
type: Answer
accepted answer of: http://stackoverflow.com/q/25134754
upvote count: 1
answers question: http://stackoverflow.com/q/25134754
has comment: http://stackoverflow.com/comment/39123618
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/q/25139321
has body: .on("mouseover", function(event, item) { // invoke hover properties on cousin one hop forward in scenegraph view.update({ props: "hover", items: item.cousin(1) }); }); this code i got from this link : https://github.com/trifacta/vega/blob/master/examples/interact/index.html I did not understand what is items: item.cousin(1); I'm using it to plot a graph on vega.
tagged with: vega
has comment: http://stackoverflow.com/comment/39131423
has comment: http://stackoverflow.com/comment/77775673
type: Question
has comment: http://stackoverflow.com/comment/39172564
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/39160457
downvote count: 0
has title: vega .on event handler
favorite count: 0
has comment: http://stackoverflow.com/comment/42135560
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39597953
answer count: 0
upvote count: 3

http://stackoverflow.com/a/25173309
upvote count: 3
answers question: http://stackoverflow.com/q/25173280
type: Answer
has body: It seems that the function is global (a property of window) so we don't need to eval it at all: &lt;script&gt; $('.dataRow').click(function(){ var fnName = $('#callback_function').val(); if(fnName &amp;&amp; window[fnName]) { window[fnName](); } }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25173280
downvote count: 0
score: 3
type: AcceptedAnswer

http://stackoverflow.com/q/25147393
has comment: http://stackoverflow.com/comment/39147086
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39181067
upvote count: 0
has answer: http://stackoverflow.com/a/25166525
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39186270
has body: Here's my situation. I have a submit button. When clicked, some backend/database validation takes place and if everything's good, submit the form and disable the button so the form can't be submitted twice. If it does not pass validation, submittal cannot take place and the button stays active, so the user can resubmit the form. It sounds simple but I can't make it work. This is a C# web application. I have tried to add the code to the button on page load. When the submit button is clicked and if validation fails, remove the code that disables the button. But here is my problem. Since the "disable" code is removed and the user fixes any error and resubmit, the button can be clicked more than one as the code is no longer there. I do not want to use Ajax for this because the backend check is very complicated. Is there another way to do it? I've tried to add the "disable" code on "load" but it does not work on post back when the validation fails. if (window.addEventListener) window.addEventListener("load", lockSubmit, false); else if (window.attachEvent) window.attachEvent("onload", lockSubmit); else window.onload = lockSubmit; Any help is appreciated.
answer count: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/39147611
has answer: http://stackoverflow.com/a/58731331
has title: Stop double-clicking of submit button with Javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39147017
tagged with: onload

http://stackoverflow.com/q/25102637
has body: I am using jquery.cookie (https://github.com/carhartl/jquery-cookie/tree/v1.4.1) and Ive been having many problems with this, I am trying to save an array of this structure var obj = { 'row1' : { 'key1' : 'input1', 'key2' : 'inpu2' }, 'row2' : { 'key3' : 'input3', 'key4' : 'input4' } }; But when I want to read it I get this row1%5Bkey1%5D=input1&amp;row1%5Bkey2%5D=inpu2&amp;row2%5Bkey3%5D=input3&amp;row2%5Bkey4%5D=input4 I am sending it at this way: $.cookie('listresult', $.param(obj), { expires: 10 }); The worst is that sometimes works, and sometimes doesnt, so, I have no idea whats wrong... Any idea how to send and transform the data? To read it I use this var cookieValue = $.cookie("listresult"); When I try this... doesnt work $.parseJSON($.cookie("listresult");) Thanks
has comment: http://stackoverflow.com/comment/39063262
has answer: http://stackoverflow.com/a/25102809
has comment: http://stackoverflow.com/comment/39063435
score: 0
has comment: http://stackoverflow.com/comment/39063292
possible better answer: http://stackoverflow.com/a/25102748
has answer: http://stackoverflow.com/a/25102748
type: AnsweredQuestion
tagged with: cookies
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25102809
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has title: how could I can I read an array I save in a cookie with jquery.cookie?

http://stackoverflow.com/comment/39084907
has text: you can add eventhandler for _"somthing happens"_ and in this handler change css parameters your object
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25114302

http://stackoverflow.com/comment/39219111
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25182768
has text: yeah that'll be the issue. is there a way to handle that in a Chrome extension? i've asked a similar question before on here and gotten nothing, and read through this post what seems like 100 times http://stackoverflow.com/questions/6508393/web-scraping-in-a-google-chrome-extension-javascript-chrome-apis

http://stackoverflow.com/a/71034785
answers question: http://stackoverflow.com/q/25176848
downvote count: 0
upvote count: 2
type: Answer
score: 2
has body: For your specific case where you just want two parts, the simplest thing is indexOf and substring: const index = text.indexOf("_"); const p0 = index === -1 ? text : text.substring(0, index); const p1 = index === -1 ? "" : text.substring(index + 1); Live Example: const text = "hello_world_there"; const index = text.indexOf("_"); const p0 = index === -1 ? text : text.substring(0, index); const p1 = index === -1 ? "" : text.substring(index + 1); console.log(`p0 = "${p0}", p1 = "${p1}"`); I've found I want that often enough I have it in a utility module: const twoParts = (str, delim = " ") => { const index = str.indexOf("_"); if (index === -1) { return [str, ""]; } return [ str.substring(0, index), str.substring(index + delim.length), ]; }; But if you wanted to do more than just teh two parts, an approach that doesn't require rejoining the string after the fact would be to use a regular expression with capture groups: const result = text.match(/^([^_]+)_+([^_]+)_+(.*)$/); const [_, p0 = "", p1 = "", p2 = ""] = result ?? []; Live Example: const text = "hello_world_xyz_there"; const result = text.match(/^([^_]+)_+([^_]+)_+(.*)$/); const [_, p0 = "", p1 = "", p2 = ""] = result ?? []; console.log(`p0 = "${p0}", p1 = "${p1}", p2 = "${p2}"`);

http://stackoverflow.com/comment/39134519
comment on: http://stackoverflow.com/q/25140234
score: 0
type: Comment
type: QuestionComment
has text: Are there by chance single quotes in `createdStructure.title`? Can you provide example out of the `console.log(postData);` line? Try adding a breakpoint at line 1072 of anugular.js and examine what is being passed into `fromJson`.

http://stackoverflow.com/q/25140970
has title: angularjs nullable select if null then
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I have in my html angularjs select with null posibility: -- choose campaign type -- and in js controller method to check if user selected something from list or nullable option $scope.selChanged = function() { if ($scope.ViewLevel == null) { $scope.getTypeData(); console.log("nullek"); } else { $scope.getCampaignData(); console.log("nie nullek"); } } But it doesn't work. Always if clause is true, even if in firebug I can see that ViewLevel is not null. Why? EDIT: screen from firebug ViewLevel is an object with property but if clause was true:
accepted answer: http://stackoverflow.com/a/25143701
type: Question
tagged with: null
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39161754
has comment: http://stackoverflow.com/comment/39135762
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25143701
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39135657

web-services
type: Tag
tags question: http://stackoverflow.com/q/25186506
tags question: http://stackoverflow.com/q/25228339
tags question: http://stackoverflow.com/q/25073019
tags question: http://stackoverflow.com/q/25080224
tags question: http://stackoverflow.com/q/25228754
tags question: http://stackoverflow.com/q/25199488
tags question: http://stackoverflow.com/q/25073287
tag name: web-services
tags question: http://stackoverflow.com/q/25188736
tags question: http://stackoverflow.com/q/25202402

http://stackoverflow.com/comment/39228577
comment on: http://stackoverflow.com/a/25174935
type: AnswerComment
has text: Can you give a thorough explanation of the desired user interaction? The two selects at the top represent wild card teams? Teams selected in the two top selects should appear in the remaining selects?
score: 0
type: Comment

http://stackoverflow.com/a/25123006
has comment: http://stackoverflow.com/comment/39110555
score: 1
has body: This is a problem affecting loads of people, and it's caused by a recent Chrome change, which has now been rolled back, however until that filters through to the updates, you'll need to make some changes. Over at the jPlayer group there are at least ten threads and a jplayer bug ticket about this issue. There's also a Chrome bug tracker ticket about this. It turns out that jPlayer and other sites like Soundcloud weren't actually sticking to the RFC 3003 spec, and when Chrome tightened up their code, this broke it. Chrome have now rolled back this change, but until that filters through, you can either download the latest jplayer code from github, or make the following immediate change to the jquery.jplayer.js file around line 696 so that it looks like this: mp3: { //codec: 'audio/mpeg; codecs="mp3"', codec: 'audio/mpeg', flashCanPlay: true, media: 'audio' }, Please let me know if this fixes things.
downvote count: 0
has comment: http://stackoverflow.com/comment/39156719
type: Answer
has comment: http://stackoverflow.com/comment/39156641
has comment: http://stackoverflow.com/comment/39119335
answers question: http://stackoverflow.com/q/25100213
has comment: http://stackoverflow.com/comment/39156692
upvote count: 1

http://stackoverflow.com/q/25195823
tagged with: javascript
has comment: http://stackoverflow.com/comment/39357516
has comment: http://stackoverflow.com/comment/39246839
favorite count: 0
has comment: http://stackoverflow.com/comment/39702646
has comment: http://stackoverflow.com/comment/40210043
has body: I have bubble chart based on this tutorial. I have enabled dragging of bubbles with following code. This makes individual circles draggable, but while dragging a circle other circles don't get auto adjusted. I am using pack circle algorithm, please let me know is that possible with this algorithm. This is my code for dragging: // draggable if(this.dragging){ var drag = d3.behavior.drag() .on("drag", function( d, i) { var selection = d3.selectAll( '.selected'); if( selection[0].indexOf( this)==-1) { selection.classed( "selected", false); selection = d3.select( this); selection.classed( "selected", true); } selection.attr("transform", function( d, i) { d.x += d3.event.dx; d.y += d3.event.dy; return "translate(" + [ d.x,d.y ] + ")" }) // reappend dragged element as last // so that its stays on top this.parentNode.appendChild( this); d3.event.sourceEvent.stopPropagation(); }); node.call( drag); }
tagged with: circle-pack
has title: d3js dragging circle should rearrange other circles in main boundary circle
has comment: http://stackoverflow.com/comment/39357895
has comment: http://stackoverflow.com/comment/39358366
has comment: http://stackoverflow.com/comment/39244332
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39352214
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39242087
tagged with: drag
type: Question
has comment: http://stackoverflow.com/comment/39356097
score: 10
has answer: http://stackoverflow.com/a/29664602
upvote count: 10
has comment: http://stackoverflow.com/comment/39359590
has comment: http://stackoverflow.com/comment/39701461
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/39240200
type: Comment
comment on: http://stackoverflow.com/a/25197699
has text: Try setting the height of the `.modal` div to `$(window).height()` in the ready event.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39221805
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25188040
has text: That's a good solution. @DaveL: if you can't even edit your functions.php file, then check this: http://stackoverflow.com/questions/221294/how-do-you-get-a-timestamp-in-javascript and use javascript, that's the only solution left, as far as I know :). To be more generic, check the javascript **date** object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date and use it **in the way you need it to be used** ;)

http://stackoverflow.com/a/25208164
score: 0
type: Answer
has body: Something like this should work: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;input id="sparky1" value="1"&gt;&lt;br&gt; &lt;input id="sparky2" value="3"&gt;&lt;br&gt; &lt;input id="sparky3" value="5"&gt;&lt;br&gt; &lt;input id="sparky4" value="7"&gt;&lt;br&gt; &lt;input id="sparky5" value="9"&gt;&lt;br&gt; &lt;script&gt; for (var i=1; i &lt; 6; i++) { document.getElementById('sparky' + i).value = parseInt(document.getElementById('sparky' + i).value) + 1; } &lt;/script&gt; &lt;/body&gt;
answers question: http://stackoverflow.com/q/25208030

http://stackoverflow.com/q/25191336
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39229903
upvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25191443
answer count: 1
accepted answer: http://stackoverflow.com/a/25191443
has comment: http://stackoverflow.com/comment/39229904
has comment: http://stackoverflow.com/comment/39446947
favorite count: 0
score: -1
tagged with: python
type: AnsweredQuestion
has body: Actually I was trying to get some response from my .py script but instead of response I m getting the whole file . This is the ajax call in the javascript file $.ajax({ url: "py/simple.py", type: "POST", data: {foo: 'bar', bar: 'foo'}, success: function(response){ log(response); $("#div").html(response); } }); And this is the py script import cgi, cgitb cgitb.enable() # for troubleshooting #the cgi library gets vars from html data = cgi.FieldStorage() #this is the actual output print "Content-Type: text/plain\n" print "The foo data is: " + data["foo"].value print "&lt;br /&gt;" print "The bar data is: " + data["bar"].value print "&lt;br /&gt;" print data And the response I m getting is the whole import cgi, cgitb cgitb.enable() # for troubleshooting #the cgi library gets vars from html data = cgi.FieldStorage() #this is the actual output print "Content-Type: text/plain\n" print "The foo data is: " + data["foo"].value print "&lt;br /&gt;" print "The bar data is: " + data["bar"].value print "&lt;br /&gt;" print data Any help ??
tagged with: cgi
has title: getting whole file in response instead of actual response

http://stackoverflow.com/comment/39103290
score: 0
type: AnswerComment
type: Comment
has text: Thanks Renjith. Unfortunately propertyStatusControl.control.refresh(); here does not work.. I think it has something to do with the if statement if (propertyStatusControl != null) because now all of my commands that supposed to follow the condition doesn't seem to work at all.
comment on: http://stackoverflow.com/a/25111772

http://stackoverflow.com/comment/39027508
type: AnswerComment
type: Comment
has text: @ian: Did you change `ngClick` to `ngChange` ? It is kind of frustratin trying to debug an issue when it might or might not be a copy/paste issue. It would be best if you could reproduce the problem in plunkr, so we have something to work on. Getting the value of a checkbox isn't difficult indeed (as my answer demonstrates :)).
comment on: http://stackoverflow.com/a/25081105
score: 0

http://stackoverflow.com/comment/39042251
type: Comment
has text: what do you want to store? your username and password?
score: 0
comment on: http://stackoverflow.com/q/25091132
type: QuestionComment

http://stackoverflow.com/a/25095016
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39049216
has body: Insted of post.Tags.ToString() use string.Join(",",post.Tags.Select(t =&gt; t.Name)) Or pass array of tags to your view and use custom formatter Formatter may looks like this: function tagFormatter(cellvalue, options, rowObject) { var text = "" if (cellvalue.length &gt; 0) { for (var i = 0; i &lt; cellvalue.length; i++) { text += cellvalue[i].Name; if (i &lt; cellvalue.length - 1) { text += ", "; } } } return text; } It will display comma-separated tags names; And tag row: { name: 'Tags', index: 'Tags', width: 100, sortable: false, formatter: tagFormatter }, Is it helpful?
has comment: http://stackoverflow.com/comment/39049830
accepted answer of: http://stackoverflow.com/q/25094492
has comment: http://stackoverflow.com/comment/39049621
answers question: http://stackoverflow.com/q/25094492
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39049670

http://stackoverflow.com/comment/39134164
type: Comment
comment on: http://stackoverflow.com/a/25140833
score: 1
type: AnswerComment
has text: What about doing something like `Object.prototype.constructor.name = "Object"`? Would it solve the problem?

http://stackoverflow.com/q/25112298
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25133064
has title: Image Preview (thumbnail) doesn't show after preload an image in dropzonejs
type: AnsweredQuestion
has body: I have a form that gets a name and an image (logo). I'm using angularjs as client side language and dropzonejs as image upload library. when the user clicks on Edit, I want him to see the image preview that he has uploaded previously. I used this for doing so. The problem is if I upload a new image after I preload the initial image, I couldn't see new image's preview. here is my preload image code. (There is an angular directive for it) if(scope.initialFileAddress != null &amp;&amp; scope.initialFileAddress != "") mockFile = {name: scope.initialFileName, size: 1000, type: "image/jpeg"} this.addFile.call(this, mockFile) this.options.thumbnail.call(this, mockFile, scope.initialFileAddress)
has comment: http://stackoverflow.com/comment/39081444
tagged with: image
linked to: http://stackoverflow.com/q/22666872
type: Question
tagged with: upload
tagged with: javascript
tagged with: dropzone.js
has comment: http://stackoverflow.com/comment/39081456
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25133064

http://stackoverflow.com/q/25072525
has answer: http://stackoverflow.com/a/25072579
type: Question
tagged with: javascript
upvote count: 3
answer count: 2
has title: Understanding Javascript generated by Typescript compiler
favorite count: 0
has comment: http://stackoverflow.com/comment/39007519
has answer: http://stackoverflow.com/a/25073072
accepted answer: http://stackoverflow.com/a/25072579
has body: if i type this simple typescript code: class Point2D { constructor(public x: number, public y: number) { } } and look at the generated js: var Point2D = (function () { function Point2D(x, y) { this.x = x; this.y = y; } return Point2D; })(); my question: how does above differ from: function Point2D(x, y) { this.x = x; this.y = y; } if no difference, then above is much simpler
type: AnsweredQuestion
tagged with: typescript
score: 3
possible better answer: http://stackoverflow.com/a/25073072
downvote count: 0
linked to: http://stackoverflow.com/q/24999452

http://stackoverflow.com/comment/39860685
type: Comment
has text: Yes, every 100 milliseconds in this example.
type: AnswerComment
comment on: http://stackoverflow.com/a/25191003
score: 0

http://stackoverflow.com/a/25225230
has comment: http://stackoverflow.com/comment/39291492
type: Answer
answers question: http://stackoverflow.com/q/25225182
has body: The keys in your object should be the name of the state. Then you can do this: var states = { "Minnesota": { consent: 18, openBottle: true, deathPen: false, conceal: "Conceal &amp; Carry", txtDriveBan: true, talkDriveBan: false } } $(document).ready(function() { $("#submit").on('click', function(e){ e.preventDefault(); // Don't submit the form. var State = document.getElementById("#search"); var answerString = ''; for (var key in states[State]){ answerString += '&lt;p&gt;' + key + ': ' + states[State][key] + '&lt;/p&gt;'; } $('#answer').html(answerString); }); }); Note that you should change the div that will contain the answer to have id "answer", not class "answer".
score: 0
has comment: http://stackoverflow.com/comment/39291463

http://stackoverflow.com/q/25216533
has answer: http://stackoverflow.com/a/25216580
has answer: http://stackoverflow.com/a/25216574
has answer: http://stackoverflow.com/a/25216576
has comment: http://stackoverflow.com/comment/39275721
possible better answer: http://stackoverflow.com/a/25216574
has body: this program will pop-up a alert message when user click on the text showed, then make the text to uppercase. Testing jQuery
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25216576
tagged with: http://stackoverflow.com/tag/html
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25216621
type: Question
has title: I try jquery tutorial, but it does not give the expected output

http://stackoverflow.com/comment/39027300
type: Comment
type: QuestionComment
has text: @adeneo thanks for pointing that out, this is why I changed it.
comment on: http://stackoverflow.com/q/25082911
score: 0

http://stackoverflow.com/q/25090040
score: 8
has answer: http://stackoverflow.com/a/25103861
has answer: http://stackoverflow.com/a/25090115
tagged with: javascript
linked to: http://stackoverflow.com/q/14016149
answer count: 3
has title: how to update a Mongo.db collection in meteor.js?
possible better answer: http://stackoverflow.com/a/25090115
accepted answer: http://stackoverflow.com/a/25632458
downvote count: 0
has comment: http://stackoverflow.com/comment/39040348
tagged with: meteor
favorite count: 0
upvote count: 8
type: AnsweredQuestion
has body: I have a collection that I need to update when the user presses a button. I just need to change one variable to another. In the console, this line of code works: db.users.update({username : "Jack"},{age : 13, username : "Jack"}); But when I put in this code: Template.body.events({ 'click #updateAge' = function() { { alert(); db.users.update({username : "Jack"},{age : 13, username : "Jack"}); } } }) into my JavaScript file for Meteor.js, it doesn't do anything at all (I don't get an error message, and I see the alert, but the update just doesn't work). I've read through the Meteor Documentation on updating, but I just can't seem to get it to work. Does anybody know what I'm doing wrong here?
has answer: http://stackoverflow.com/a/25632458
type: Question
has comment: http://stackoverflow.com/comment/39040219
linked to: http://stackoverflow.com/q/19027893
tagged with: mongodb

header
type: Tag
tags question: http://stackoverflow.com/q/25166047
tag name: header
tags question: http://stackoverflow.com/q/25113456

http://stackoverflow.com/comment/39244435
type: QuestionComment
type: Comment
has text: What does the developer tool tell you? does the request fire and return the required content? are there any errors? is the hashchanged event even triggered? maybe the content is loaded but the `fadeIn()` failed?
score: 1
comment on: http://stackoverflow.com/q/25200074

http://stackoverflow.com/a/25133187
accepted answer of: http://stackoverflow.com/q/25133010
has body: Yes, you can. All layouts are custom in D3, as D3 exposes a low level interface for manipulating SVG/DOM elements in mappings to a dataset. This includes a fairly straightforward transition interface. I would suggest looking at Mike Bostock's D3 tutorials if you want a 1,000 foot sense of how D3 works and how you might employ it.
has comment: http://stackoverflow.com/comment/39123952
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39127306
type: Answer
has comment: http://stackoverflow.com/comment/39121926
answers question: http://stackoverflow.com/q/25133010
score: 0

http://stackoverflow.com/q/25165573
has body: I have an array, and one of the elements in the array has a string with HTML tags. When I iterate through the array and echo the field, I can see the string. $positions = $jobs_dbc-&gt;getData($sql); foreach($positions as $position) { echo $position['PositionDescription']; } In the example below, there are a total of 3 elements in the $positions array. The first two do not have HTML tags in PositionDescription. The 3rd record does, and I've highlighted the results of the code above: BUT - when I json_encode the array, that 3rd record's PositionDescription shows up as NULL. echo json_encode($positions, JSON_HEX_TAG|JSON_HEX_QUOT); The code above returns: How do I get the string with HTML encoded? UPDATES: var_export($positions) array ( 0 =&gt; array ( 'PositionName' =&gt; 'Front End Sales', 'PositionManagement' =&gt; '0', 'PositionDescription' =&gt; 'Works in scratch bakery department to provide guest care, package, stock &amp; merchandise fresh bakery products. Responsible for accurate rotation of products &amp; recording sales &amp; loss. Will take in-person &amp; phone orders for special occasion cakes &amp; other bakery products.', 'DepartmentName' =&gt; 'Bakery', ), 1 =&gt; array ( 'PositionName' =&gt; 'Baker', 'PositionManagement' =&gt; '0', 'PositionDescription' =&gt; 'Works in scratch bakery department to provide guest service &amp; produce donuts, pastries &amp; bread. Will use variety of machines to assist with meeting production goals including deep fryer, sheeter, mixer, scale and oven.', 'DepartmentName' =&gt; 'Bakery', ), 2 =&gt; array ( 'PositionName' =&gt; 'Part-time Accounting Clerk I', 'PositionManagement' =&gt; '0', 'PositionDescription' =&gt; 'APPLY BY FRIDAY 10/9/09! PART-TIME = 25 hours/wk, flex shifts M-F between 8am-4pm. Position: Accounting Clerk I Department: Accounting Reports To: Accounting Manager Position Summary: The Accounting Clerk I assists other Accounting Clerks with communication between accounts payable and the vendor community e…
has title: String with HTML is nulled with json_encode in PHP
answer count: 1
has comment: http://stackoverflow.com/comment/39182076
has answer: http://stackoverflow.com/a/25167948
has comment: http://stackoverflow.com/comment/39180590
tagged with: php
has comment: http://stackoverflow.com/comment/39184157
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39184734
type: Question
accepted answer: http://stackoverflow.com/a/25167948
tagged with: javascript
has comment: http://stackoverflow.com/comment/39181658
has comment: http://stackoverflow.com/comment/39182104
score: 0

http://stackoverflow.com/q/25227060
type: Question
has comment: http://stackoverflow.com/comment/39295543
has comment: http://stackoverflow.com/comment/39295338
tagged with: javascript
has comment: http://stackoverflow.com/comment/39296066
score: 0
has answer: http://stackoverflow.com/a/25231784
answer count: 1
has comment: http://stackoverflow.com/comment/39294943
has comment: http://stackoverflow.com/comment/39295641
type: UnansweredQuestion
has body: I'm doing a project with arduino in which I send different requests to the server (the arduino board) with the method XMLHttprequest and Get from a webpage. Except one of the request the others are used only for sending orders to the server, so I don't expect for an XML response. The other one is a request sent in intervals of 5 seconds for getting different values from the server. The problem arrives with this last one. Actually the webpage sends the request (because I see it on the browser console and the arduino serial monitor) every 5 seconds, but it doesn't get anything, just the headers of the answer confirming the response but nothing about the XML file. Surprisingly, when I write a normal request using the get method in the browser I get instantly the XML file with the values, and It happens all the time I do that. I'm going to write the javascript code I'm using on the webpage setInterval(function tiempo() { var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (this.readyState == 4) { if (this.status == 200) { if (this.responseXML != null) { // extract XML data from XML file (containing switch states and analog value) document.getElementById("input1").innerHTML = this.responseXML.getElementsByTagName('dato')[0].childNodes[0].nodeValue; document.getElementById("input2").innerHTML = this.responseXML.getElementsByTagName('dato')[1].childNodes[0].nodeValue; document.getElementById("input3").innerHTML = this.responseXML.getElementsByTagName('dato')[2].childNodes[0].nodeValue; document.getElementById("input4").innerHTML = this.responseXML.getElementsByTagName('dato')[3].childNodes[0].nodeValue; document.getElementById("input5").innerHTML = this.responseXML.getElementsByTagName('dato')[4].childNodes[0].nodeValue; document.getElementById("input6").innerHTML = this.responseXML.getElementsByTagName('dato')[5].childNodes[0].nodeValue; document.getElementById("input7").innerHTML = this.responseXML.getElementsByTagName('dato')[6].childNodes[0…
has comment: http://stackoverflow.com/comment/39296035
has title: Server doesn't respond to an xmlHTTP request using the get method
has comment: http://stackoverflow.com/comment/39295057

http://stackoverflow.com/q/25178707
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39204880
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has body: I am trying to create a selected state using jQuery. I have all pages exept for home page as there is no unique page identifier (i.e) www.abcd.co.nz JS Fiddle here: http://jsfiddle.net/zangief007/1ta4gxwn/ if (window.location.href.indexOf("/") &gt; -1) { $("header ul li a.home").addClass("tn-selected"); } if (window.location.href.indexOf("about") &gt; -1) { $("header ul li a.about").addClass("tn-selected"); } if (window.location.href.indexOf("links") &gt; -1) { $("header ul li a.links").addClass("tn-selected"); } if (window.location.href.indexOf("contact") &gt; -1) { $("header ul li a.contact").addClass("tn-selected"); }
tagged with: css
favorite count: 0
has comment: http://stackoverflow.com/comment/39204359
accepted answer: http://stackoverflow.com/a/25179007
has comment: http://stackoverflow.com/comment/39205184
possible better answer: http://stackoverflow.com/a/25179009
has comment: http://stackoverflow.com/comment/39205092
has answer: http://stackoverflow.com/a/25179009
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25179007
upvote count: 0
has comment: http://stackoverflow.com/comment/39204422
score: -1
has comment: http://stackoverflow.com/comment/39204643
has title: Selected state for home page
type: Question
answer count: 2

http://stackoverflow.com/q/25182889
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39211786
has comment: http://stackoverflow.com/comment/39211694
has answer: http://stackoverflow.com/a/25183183
has comment: http://stackoverflow.com/comment/39211947
has title: How do I get the HTML content between two IDs?
tagged with: outerhtml
tagged with: nextuntil
has body: This is my js code: $("tr[id^=list2ghead_]").each(function(){ j = i+1; id_name = $(this).attr("id"); id_name_lenght = id_name.length; if (i &gt;= 10){ id_name = id_name.substr(0, id_name_lenght-2); }else{ id_name = id_name.substr(0, id_name_lenght-1); } html = $("#"+id_name+i).nextUntil("#"+id_name+j).outerHTML; $("#"+id_name+i).nextUntil("#"+id_name+j).remove(); html = "&lt;div class='content'&gt;"+html+"&lt;/div&gt;"; $(html).insertAfter("#"+id_name+i); i++; }); I want to get the HTML content between two IDs. After that I want to add to this HTML to a div with a class "content", remove the exiting HTML, and insert after an ID the HTML the new div. Now outerHtml returns undefined. What should I do ? This is htnml code generated by jQgrid plugin:
type: Question
has answer: http://stackoverflow.com/a/25183121
has comment: http://stackoverflow.com/comment/39211824
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25183143
has comment: http://stackoverflow.com/comment/39211961
has comment: http://stackoverflow.com/comment/39211977

http://stackoverflow.com/comment/39061975
comment on: http://stackoverflow.com/q/25096114
score: 0
type: Comment
type: QuestionComment
has text: @drkunibar I didnt try that because I want a time delay. Can you update that code as per my requirement and share here or the below one is working properly...

http://stackoverflow.com/comment/39331409
type: Comment
type: QuestionComment
has text: Are they randomly scattered or? How are they placed? Text? Variables? Please explain more.
comment on: http://stackoverflow.com/q/25212481
score: 0

http://stackoverflow.com/q/25201087
type: Question
has title: How to create auto-show popup which can be interacted with
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25201618
type: UnansweredQuestion
tagged with: css
has body: In our app, we have a persistent search box for which we want to show a help popup whenever the user is focused in the search box. When the user submits the search or focuses off the search box, the popup should auto-hide. That part is pretty easy, I'm just using focusin and focusout events to show and hide the popup, as you would expect. You can see how we have it working below: The Problem Where things get tricky is, the content of the popup is interactive and clicking anywhere in the popup will fire the focusout event which closes the popup. I've managed to hack my way around that by detecting when they have clicked in the popup and suppressing the close statement. This allows the user to have mouse interactions with the popup but itself creates a new problem. Because the focus is no longer on the search box, if the user clicks anywhere outside the popup, this doesn't fire the focusout event and close the popup as it normally does before they interact with it. So I'm looking to brainstorm workarounds for this, so that the popup will show whenever the user selects the search box, but still be able to interact with it, but also still have it close when they click anywhere other than the popup or the search box.

http://stackoverflow.com/q/25142449
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: i have a javascript code that shows an input onClick. the problem is, it is controlling my entire header : if you click the logo, the ad, anything around; the input shows below. is there an option to set the width or do something to prevent my code from controlling the entire header? HTML : search Powered by custom search Js : function changeText(idElement) { var element = document.getElementById('element' + idElement); if (idElement === 2) { if (element.innerHTML === 'search') element.innerHTML = 'cancel'; else { element.innerHTML = 'search'; } } } function ftinPut() { document.getElementById("ftinPut").select(); } var state = 'none'; function showhide(layer_ref) { if (state == 'block') { state = 'none'; } else { state = 'block'; } if (document.all) { //IS IE 4 or 5 (or 6 beta) eval( "document.all." + layer_ref + ".style.display = state"); } if (document.layers) { //IS NETSCAPE 4 or below document.layers[layer_ref].display = state; } if (document.getElementById &&!document.all) { hza = document.getElementById(layer_ref); hza.style.display = state; } } & CSS : .element2 { padding-left:22px; font-size:20px; color:orange; text-transform:uppercase; text-shadow: 0 3px 6px rgba(230, 227, 202, 1); font-family:segoe UI light,candara,georgia; background:url(/wp-content/uploads/2014/06/search.png) left no-repeat; background-position:0 96px; background-size:21px; } .element2:hover { opacity:.7; } .ftinPut { height:28px; padding-left:28px!important; color:orange!important; border:none!important; font-family:segoe UI Light,candara; background:url(/wp-content/uploads/2014/08/Pencil.png)left no-repeat; background-size:20px 20px; background-position:4px 7px; }
tagged with: css
tagged with: onclick
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25142621
tagged with: hide
type: Question
tagged with: javascript
tagged with: show
has title: Javascript onClick ShowHide controlling my entire header
upvote count: 1

http://stackoverflow.com/q/25221282
upvote count: 4
tagged with: css
type: AnsweredQuestion
downvote count: 0
type: Question
has comment: http://stackoverflow.com/comment/39285190
tagged with: javascript
score: 4
has answer: http://stackoverflow.com/a/25240262
has body: I have been trying to figure out how to make BC's photogallery lightbox responsive. I don't know why they wouldn't make it responsive in the first place, but whatever. Here is the webpage I am working on: http://ladyilgphotography.businesscatalyst.com/family-photography Here is what I have so far. &lt;script&gt; $('body').click(function() {document.getElementById('outerImageContainer').onclick=function(){ var elem = document.getElementById('outerImageContainer'); var newWidth = 0; var newHeight = 0; var w = parseInt(elem.style.width); var h = parseInt(elem.style.height); var ratio = parseInt(w / h); newWidth = window.innerWidth - 80; alert(newWidth); newHeight = parseInt(newWidth * ratio); elem.style.width = newWidth + 'px'; elem.style.height = newHeight + 'px'; };}); &lt;/script&gt; I'm sure this is not the cleanest solution or the most effective, but it's working! The problem is that the script runs as soon as the picture is loaded, and then Business Catalyst's script runs after which resets the values my function had set. Another solution that I thought about was just to add a 95% max-width to the "#outerImageContainer", but when I do that, it starts breaking down after a few clicks through the gallery and the image starts shifting farther and farther down on the page while the lightbox wrapper stays the same. Lastly, I tried using another photo gallery plugin, but the only problem with that is that plugins like pretty photo or photoswipe only target the images that are loaded on the page, but in my case, there are more images in the gallery than the ones showing on the page. To summarize my rant, again, how can I make BC's lightbox responsive so that both the width and the height match those of the image being loaded on it?
accepted answer: http://stackoverflow.com/a/25240262
has comment: http://stackoverflow.com/comment/39285271
answer count: 1
tagged with: business-catalyst
tagged with: jquery
favorite count: 0
has title: Making Business Catalyst Lightbox Responsive
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39191545
type: QuestionComment
comment on: http://stackoverflow.com/q/25170018
has text: yeah, Thanks for the Suugestion. I Think textfield with Mask would be the best option.
score: 0
type: Comment

http://stackoverflow.com/q/25150807
type: Question
has comment: http://stackoverflow.com/comment/39155146
has comment: http://stackoverflow.com/comment/39154237
tagged with: javascript
has body: I'm building a web application for deployment on an iPad and we're looking for an approach that will disable scrolling on the entire view, except for certain divs. Ideally it would be great to be able to apply a scroll class or something to the div and only permit the scroll classes to scroll. What should the Angular approach be here? I've seen a variety of JQuery and pure Javascript approaches across the web but all of them seem pretty messy and not necessarily bullet proof.
score: 0
answer count: 1
tagged with: jquery
tagged with: angularjs
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: Angular JS disable touch scroll except on certain elements
tagged with: css
has answer: http://stackoverflow.com/a/25169858

http://stackoverflow.com/q/25162929
has comment: http://stackoverflow.com/comment/39184588
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39184686
accepted answer: http://stackoverflow.com/a/25528580
type: Question
has comment: http://stackoverflow.com/comment/39176537
has title: Using Angular.JS to bind a JSON value to a Syncfusion Circular gauge
tagged with: javascript
tagged with: sharepoint
has answer: http://stackoverflow.com/a/25528580
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39175820
tagged with: angularjs
has body: I am working on a project using Syncfusion Javascript gauge control to display a weekly pay bonus. The data is stored on a SharePoint list. I wrote a javascript to convert the sharepoint list from XML to JSON. &lt;script type="text/javascript"&gt; $ajax({ url: "/_api/web/lists/GetByTitle('bonusEntry')/items?$orderby=Date desc&amp;$filter=Department eq 'Meltshop'&amp;$top=1", type: "GET", headers: { "accept":"application/json;odata=verbose", }, success: function (data) { var newMsBonus = ""; for(i=0; i &lt; data.d.results.length; i++){ newMsBonus = newMsBonus + "&lt;div&gt;" + data.d.results[i].ACrew + "&lt;/div&gt;"; } $('#oDataanalysisScoreBoard').html(newMsBonus); }, error: function (error) { alert("error: " + JSON.stringify(error)); } }) Then the value is placed in this Div. &lt;div id="oDataanalysisScoreBoard"&gt;&lt;/div&gt; Basically what I would like to do is bind the data to the Syncfusion control which is set up like this: $("#CircularGauge1").ejCircularGauge({ width: 500, height: 500, backgroundColor: "#3D3F3D", readOnly: false, scales: [{ ticks: [{ type: "major", distanceFromScale: 70, height: 20, width: 3, color: "#ffffff" }, { type: "minor", height: 12, width: 1, distanceFromScale: 70, color: "#ffffff" }], }] }); Then the gauge is created inside this: &lt;div id="CircularGauge1"&gt;&lt;/div&gt; The gauge will build but I cannot get the gauge to recieve the value. If anyone has any ideas on how I can make this work or things I'm doing I would greatly appreciate any input! Thanks everyone! EDIT: The synfusion software creates a gauge and changes the needle based on a number value thats given to it. My ajax call pulls a number entered into a Sharepoint list and then displays that in a div.
has comment: http://stackoverflow.com/comment/39175923
type: AnsweredQuestion
tagged with: syncfusion

http://stackoverflow.com/comment/39235835
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25195439
has text: Use of document.createAttribute() is deprecated. Use element.setAttribute() instead. test.html:13 Use of setAttributeNode() is deprecated. Use setAttribute() instead.
score: 0

http://stackoverflow.com/a/25204403
upvote count: 3
has body: I generally do something along the lines of: var request = require('supertest'); describe('My tests', function(){ var agent = request.agent(app); //before all the tests run, log in before(function(done){ request(app) .post('/login') .send({ username: 'a@b.com', password: 'password123' }) .end(function (err, res) { if (err) { return done(err); } agent.saveCookies(res); done(); }); }); it('Does something when logged in', function (done){ var req = request(app).get('/account/something') .expect(200); //attach the logged in cookies to the agent agent.attachCookies(req); req.end(done); //assertions here }); }) Fire off a login request first, save the cookies to the agent Then, in requests I want to use the authenticated request. attach the cookies to it. app is the instance of the Express app
answers question: http://stackoverflow.com/q/25198256
score: 2
type: Answer
downvote count: 1

http://stackoverflow.com/comment/39060985
type: AnswerComment
comment on: http://stackoverflow.com/a/25101368
type: Comment
has text: That shouldn't be needed either - JS hoists function declarations.
score: 0

http://stackoverflow.com/q/25214384
has comment: http://stackoverflow.com/comment/39272425
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25214914
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39271626
has comment: http://stackoverflow.com/comment/39271850
has comment: http://stackoverflow.com/comment/39271815
tagged with: angularjs-ng-repeat
has comment: http://stackoverflow.com/comment/39271642
tagged with: angularjs
has body: I am trying to create a directive that load data from some place else. Here is my directive: (function() { var module = angular.module('HomeModule', ['StorageService']); module.directive("home", ['storage', function(storage) { return { restrict: 'A', templateUrl: "modules/home/directives/home-directive.html", controllerAs: "mediaCtrl", controller: function() { var ctrl = this; ctrl.medias = []; storage.get_all(function(items) { var tmp = []; for (id in items) { tmp.push(items[id]); } ctrl.medias = tmp; }); // setTimeout(function() { // ctrl.medias = [{name: "test"}]; // }, 3000); } }; } ]); })(); And my template: &lt;input type="search" ng-model="search.name" placeholder="filter medias..." /&gt; &lt;ul&gt; &lt;li ng-repeat="media in mediaCtrl.medias | filter:search" &gt; {{media.name}} &lt;/li&gt; &lt;/ul&gt; What I do not understand is that as soon as I enter something in the filter it updates and then show the data. I even tried to do it with a setTimeout just to see if the problem was my custom service but no.
score: 1
has title: Angular.js directive two way binding with loaded data
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39272489
accepted answer: http://stackoverflow.com/a/25214914
upvote count: 1

http://stackoverflow.com/a/25169631
upvote count: 2
answers question: http://stackoverflow.com/q/25169513
has comment: http://stackoverflow.com/comment/39188261
accepted answer of: http://stackoverflow.com/q/25169513
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: In Angular you use the $parse service (ref): var str = 'greeting.hello'; var obj = { "greeting": { "hello": ["world", "josue", "everybody"] } }; var getter = $parse(str); var theValue = getter(obj);
score: 2

http://stackoverflow.com/q/25157861
has title: change the class of div after fadeOut has been executed on the same div
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25157932
score: 0
answer count: 1
type: UnansweredQuestion
has body: I have a div which is set to display none using a class. Now when a button is clicked i want to make the div visible for 5 seconds and make it disappear. I did like this $("#errorMessage").removeClass("hide").delay(5000).fadeOut("slow", function () { $("#errorMessage").addClass("hide"); }); The div is visible for 5 seconds and it hides it. When i inspect the div using browser inspector the div has class "hide" itself No page load is happening. So when i click the button again nothing is happening. Can anyone please tell me why? Thanks
type: Question

http://stackoverflow.com/q/25152047
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39155866
has comment: http://stackoverflow.com/comment/39155479
type: Question
score: 3
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25152247
has title: Remove button for each image thumbnail preview
has comment: http://stackoverflow.com/comment/39155631
has answer: http://stackoverflow.com/a/25152247
accepted answer: http://stackoverflow.com/a/25152793
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/39158036
has comment: http://stackoverflow.com/comment/39156580
tagged with: jquery
has comment: http://stackoverflow.com/comment/39155790
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25152793
has body: hello, i need your help for my codes. I want to preview multiple images before upload and there are remove button in each images. But my code doesn't work when i'm using div targetting in each remove button. the first, my codes is like THIS FIDDLE 1. and when i'm add some changes become THIS FIDDLE 2 my HTML : File API - FileReader Select multiple files: and CSS : body{ font-family: 'Segoe UI'; font-size: 12pt; } header h1{ font-size:12pt; color: #fff; background-color: #1BA1E2; padding: 20px; } article { width: 80%; margin:auto; margin-top:10px; } .thumbnail{ height: 100px; margin: 10px; } it's my javascripts : window.onload = function(){ //Check File API support if(window.File && window.FileList && window.FileReader) { var filesInput = document.getElementById("files"); filesInput.addEventListener("change", function(event){ var files = event.target.files; //FileList object var output = document.getElementById("result"); for(var i = 0; i< files.length; i++) { var file = files[i]; //Only pics if(!file.type.match('image')) continue; var picReader = new FileReader(); picReader.addEventListener("load",function(event){ var picFile = event.target; var div = document.createElement("div"); div.innerHTML = " X"; output.insertBefore(div,null); }); //Read the image picReader.readAsDataURL(file); } }); } else { console.log("Your browser does not support File API"); } } thanks for advance. any suggestions much be appreciated ^^
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39155536

http://stackoverflow.com/comment/39262518
type: QuestionComment
type: Comment
has text: @Michael_B Thanks again for your thoughts on this..would be really great to have a solution
score: 0
comment on: http://stackoverflow.com/q/25208482

http://stackoverflow.com/comment/39097610
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25120946
has text: What's better? File or database?

http://stackoverflow.com/a/25278505
has body: i have build a android app with your code. Because I use cordova so I change your phonegap.js into cordova.js and it works well.
type: Answer
has comment: http://stackoverflow.com/comment/39431110
upvote count: 3
score: 3
has comment: http://stackoverflow.com/comment/39393579
has comment: http://stackoverflow.com/comment/39431075
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25228599
answers question: http://stackoverflow.com/q/25228599
has comment: http://stackoverflow.com/comment/39392524

http://stackoverflow.com/comment/39166242
has text: Can you show your code?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25158017
score: 1

http://stackoverflow.com/comment/39152959
type: AnswerComment
has text: I thought my code didn't work properly at first, but now I know it's correct, so I don't need to change anything, just format the Date and display. Thanks very much!
type: Comment
comment on: http://stackoverflow.com/a/25139627
score: 0

http://stackoverflow.com/a/25082119
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/39024789
accepted answer of: http://stackoverflow.com/q/25081997
answers question: http://stackoverflow.com/q/25081997
has body: The .container should have display: table; and .menu-bottom display: table-cell; to apply table like behavior with CSS. HTML Div1 CSS .container { height:200px; display:table; width: 100%; } .menu_button { text-align: center; display: table-cell; vertical-align: middle; font-size: 48px; } demo: http://jsfiddle.net/ALB6D/1/
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25096145
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25096115
has comment: http://stackoverflow.com/comment/39072078
type: Answer
has comment: http://stackoverflow.com/comment/39051909
has body: in the page header you should define this &lt;script src="car-sale.json"&gt;&lt;/script&gt; i check this with a firefox and its working fine check this with firefox $.getJSON('car-sale.json', function (data) { $.each( data, function( key, val ) { console.log(val.Manufacturer ); }); });
has comment: http://stackoverflow.com/comment/39051098
has comment: http://stackoverflow.com/comment/39063228
has comment: http://stackoverflow.com/comment/39072709
answers question: http://stackoverflow.com/q/25096115
has comment: http://stackoverflow.com/comment/39062906

http://stackoverflow.com/comment/39166357
comment on: http://stackoverflow.com/q/25158265
has text: ya in we application we can't click anything else. But I am using phonegap/cordova to convert web application to mobile application. So when I click back button of mobile then it is causing problems.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39044307
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25092351
type: QuestionComment
has text: So you want to prevent the navigation on `click` event but allow in case of `ajax`. is that it??

http://stackoverflow.com/q/25080275
accepted answer: http://stackoverflow.com/a/25080469
tagged with: django
tagged with: request
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39021575
has comment: http://stackoverflow.com/comment/39021470
tagged with: post
type: Question
has body: Last night I was sending some data to my server via AJAX (specifically, $.post), when I ran into the issue that JavaScript Arrays needed to be "stringified" and applied as a field to an object before being sent. That is: $.post("/myUrl/", {"myKey": json.stringify(myArray)}, ... ); If I didn't perform the stringify, the format of the POST would get screwed up by the time it reached Django. Why do arrays need to be stringified for requests when objects can just be sent as is? Or, does this vary wildly on the back-end being used?
has comment: http://stackoverflow.com/comment/39021390
score: 2
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25080469
linked to: http://stackoverflow.com/q/5048371
favorite count: 0
has comment: http://stackoverflow.com/comment/39021303
upvote count: 2
has title: Why must we stringify arrays but not objects over requests?

http://stackoverflow.com/q/25128574
has answer: http://stackoverflow.com/a/25128694
tagged with: javascript
has title: JQuery issues with fadeOut()
score: 0
has body: I created a script to fade in a scroll to top button when $(document).scrollTop() &gt; 100, and fade it out when this is not true. This is done by: $.fn.scrollToTop = function() { $(window).scroll(function() { if( $(this).scrollTop() &gt; 100) { $('.scroll-back').fadeIn(); } else { $('.scroll-back').fadeOut(); } }); } and to use it I do: $(document).ready(function() { $(document).scrollToTop(); } The button works fine when just scrolling, but if I resize my window / open inspect element when scrolled to the top of the page, the button fades out then fades back in rapidly, any ideas how can I fix this?
answer count: 2
has comment: http://stackoverflow.com/comment/39112074
linked to: http://stackoverflow.com/q/7392058
tagged with: jquery
has comment: http://stackoverflow.com/comment/39112228
tagged with: fadein
type: UnansweredQuestion
tagged with: fadeout
has answer: http://stackoverflow.com/a/25128615
type: Question

http://stackoverflow.com/a/25210781
score: 2
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/25210731
has body: You do not have to quote keys, unless they aren't valid identifiers (e.g. they contain spaces or they are reserved words). The object literal syntax isin't the same as JSON. It's probably a simple matter of preference, but I only quote keys when required to do so.
type: Answer

http://stackoverflow.com/q/25110166
has answer: http://stackoverflow.com/a/25110604
has comment: http://stackoverflow.com/comment/39077738
linked to: http://stackoverflow.com/q/23913111
has comment: http://stackoverflow.com/comment/39078516
has comment: http://stackoverflow.com/comment/39077494
has comment: http://stackoverflow.com/comment/39078564
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/132273265
has comment: http://stackoverflow.com/comment/39077751
has comment: http://stackoverflow.com/comment/39077919
downvote count: 1
has title: How can we programmatically enter and exit the fullscreen mode in javascript?
accepted answer: http://stackoverflow.com/a/25110604
type: Question
tagged with: fullscreen
has comment: http://stackoverflow.com/comment/39077603
upvote count: 9
has body: Here's documentation on exiting fullscreen mode. I used this code that I learnd to make the browser go fullscreen (it works), but my attempts to modify a version of it to exit fullscreen failed. Dealing with these non-standard APIs is a little tricky, with each browser implementing it a bit differently. Here's the code: // Bring the page into full-screen mode - Works! function requestFullScreen(element) { // Supports most browsers and their versions. var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen; if (requestMethod) { requestMethod.call(element); } else if ( typeof window.ActiveXObject !== "undefined") { var wscript = new ActiveXObject("WScript.Shell"); if (wscript !== null) { wscript.SendKeys("{F11}"); } } } // Exit fullscreen - Doesn't work! function exitFullScreen(element){ var requestMethod = element.exitFullscreen || element.mozCancelFullScreen || element.webkitExitFullscreen || element.msExitFullscreen; if (requestMethod) { requestMethod(); } else { console.log("Oops. Request method false."); } } And the calls: var $fullscreenButton = $("#fullscreen-button"); var $smallscreenButton = $("#smallscreen-button"); $fullscreenButton.on("click", function() { var elem = document.body; // Make the body go full screen. requestFullScreen(elem); }); $smallscreenButton.on("click", function() { var elem = document.body; // Exit full screen. exitFullScreen(elem); }); What's wrong with the exitFullScreen function? How can I fix it? Edit: I'm working on a JSFiddle for this! By "Doesn't work", I meant that it outputs "Oops. Request method false." I'm calling the function exitFullScreen() with the parameter document.body JSFiddle: While the full screen request function works for me in the browser normally, I could not get it to work in JSFiddle, and I'm unsure whether this is because of my own mistake, or something to do with JSFiddle.
has comment: http://stackoverflow.com/comment/39077858
tagged with: javascript
has comment: http://stackoverflow.com/comment/39077856
has comment: http://stackoverflow.com/comment/39077710
has comment: http://stackoverflow.com/comment/39077769
tagged with: browser
has comment: http://stackoverflow.com/comment/39077780
has comment: http://stackoverflow.com/comment/39078208
has comment: http://stackoverflow.com/comment/39077799
answer count: 1
has comment: http://stackoverflow.com/comment/39078155
score: 8
favorite count: 0
has comment: http://stackoverflow.com/comment/39078484
has comment: http://stackoverflow.com/comment/39077677

http://stackoverflow.com/q/25154135
answer count: 2
downvote count: 0
tagged with: javascript
score: 1
has comment: http://stackoverflow.com/comment/39159420
has title: NodeJS and synchrone call to mysql
has comment: http://stackoverflow.com/comment/39159265
has comment: http://stackoverflow.com/comment/39159300
favorite count: 0
has comment: http://stackoverflow.com/comment/39160314
has body: I m actually developping a little application, in which I use a service to access my data in MYSQL. Actually, it works great using callback fonction : service.request('SELECT * FROM table', function(data){ mydata = data }) I need to use it without callback, without blocking the node eventloop like this : mydata = service.request('SELECT * FROM table') Is it possible to do this ? How could I do ? EDIT : How to do this with Fiber and Future libraries ? :D Thanks for advance
tagged with: node.js
has answer: http://stackoverflow.com/a/25497154
has comment: http://stackoverflow.com/comment/39172878
tagged with: mysql
upvote count: 1
accepted answer: http://stackoverflow.com/a/25497154
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25166345
has answer: http://stackoverflow.com/a/25166345
type: Question

http://stackoverflow.com/q/25128136
has comment: http://stackoverflow.com/comment/39111450
has comment: http://stackoverflow.com/comment/39112130
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39111994
has comment: http://stackoverflow.com/comment/39111912
possible better answer: http://stackoverflow.com/a/25128464
score: 0
has body: I have a in an html page that I'd like to show a spinner on while a JQuery function is running. Since its asynchronous I am trying to use deferred to determine when the function completed the code in the html page var req = jslongfunc(value); req.done(function( response){ spinner.stop(); }); The code in the JS page that contains jslongfunc function jslongfunc() { rdef = $.Deferred(); $.getJSON('mycode, function(data){ ... do lots of stuff here ... }); setTimeout(function () { r.resolve(); }, 4500); return r.promise(); The spinner seems to run for 4500 regardless of when the jslongfunc finished all its code. I know when it finishes because it draws something. I thought r would return and .done would execute if the function finished before the time out. What am I doing wrong?
answer count: 2
has answer: http://stackoverflow.com/a/25128464
has comment: http://stackoverflow.com/comment/39111143
has title: JQuery Deferred how to use resolve and promise to determine function end
has answer: http://stackoverflow.com/a/25128480
has comment: http://stackoverflow.com/comment/39112015
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39112169
accepted answer: http://stackoverflow.com/a/25128480
type: Question
has comment: http://stackoverflow.com/comment/39111795

http://stackoverflow.com/q/25156499
type: Question
has title: JQuery enabling a textbox with a button event query
accepted answer: http://stackoverflow.com/a/25156530
tagged with: javascript
has answer: http://stackoverflow.com/a/25156800
answer count: 3
downvote count: 0
tagged with: jsp
tagged with: jquery
tagged with: textbox
favorite count: 0
possible better answer: http://stackoverflow.com/a/25156533
has answer: http://stackoverflow.com/a/25156533
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25156530
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I have a tiny issue if anybody can help... I am trying to implement a form, so when the page loads the textbox is disabled. If the user wishes to amend information they first have to press a button which will enable the text box. &lt;input id="text" type="text" disabled="disabled"&gt; &lt;br /&gt; &lt;button&gt;Enable&lt;/button So I have a basic textbox which is disabled. Then an event that should enable the textbox... &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $("button").click(function(){ $("#text").attr("disabled","false"); }); }); &lt;/script&gt; I can get this working when the textbox is not initially disabled and I want to disable it, though I can not get it working the other way round - when it is disabled and I want to enable it. Can anyone point me in the right direction?

http://stackoverflow.com/q/25188319
downvote count: 2
upvote count: 1
has body: Here is my assignment: Write a program that creates a string that represents an 8×8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a # character. The characters should form a chess board. Passing this string to console.log should show something like this: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # My attempt is below along with the comments to explain my logic. I get close but I can never get the pattern above. Whats wrong with my logic? //declar empty board var board = ""; //use outter loop to control rows for (var y = 1; y &lt; 5; y++) { //use innerloop to generate the #'s horizonatlly for (var x = 1; x &lt; 5; x++) { //if the row is even then put a space in front //of the board string and then generate the board // with the #'s if (y % 2 === 0) { board = " " + board; board += "#"; } //else generate the board without a space in front //of the #'s else { board += "#"; } } //generate a new line board += "\n"; } console.log(board);
has answer: http://stackoverflow.com/a/43632901
type: Question
has answer: http://stackoverflow.com/a/68931880
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/34555195
has answer: http://stackoverflow.com/a/39811754
has answer: http://stackoverflow.com/a/45207648
has answer: http://stackoverflow.com/a/49512708
has comment: http://stackoverflow.com/comment/39222735
has comment: http://stackoverflow.com/comment/39222387
has answer: http://stackoverflow.com/a/55083368
has comment: http://stackoverflow.com/comment/39222568
favorite count: 0
has title: JavaScript Chessboard program
answer count: 12
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39222581
has comment: http://stackoverflow.com/comment/39222430
has answer: http://stackoverflow.com/a/67438901
has comment: http://stackoverflow.com/comment/39222529
has answer: http://stackoverflow.com/a/31214964
has comment: http://stackoverflow.com/comment/39222605
has comment: http://stackoverflow.com/comment/39222512
has answer: http://stackoverflow.com/a/29922398
has comment: http://stackoverflow.com/comment/125029118
has answer: http://stackoverflow.com/a/25188492
has answer: http://stackoverflow.com/a/70724419

http://stackoverflow.com/comment/39016395
score: 0
type: Comment
has text: what hinders you from using jstl. but the doGet() method should work in your case
comment on: http://stackoverflow.com/a/25077266
type: AnswerComment

http://stackoverflow.com/q/25139479
type: AnsweredQuestion
has body: How do I register multiple callbacks for a jQuery event? An example of what I am trying to achieve: $(document).on("click", ".someclass", CallbackFunction1, CallbackFunction2); function CallbackFunction1(event) { //Do stuff } function CallbackFunction2(event) { //Do some other stuff } How can I set up the event handler to execute both callback functions when the element is clicked?
type: Question
tagged with: javascript
tagged with: jquery
tagged with: callback
favorite count: 0
accepted answer: http://stackoverflow.com/a/25139577
has answer: http://stackoverflow.com/a/25139758
has title: jQuery onClick multiple callbacks
has answer: http://stackoverflow.com/a/25139554
answer count: 4
has answer: http://stackoverflow.com/a/25139577
score: 8
downvote count: 0
possible better answer: http://stackoverflow.com/a/25139519
upvote count: 8
has answer: http://stackoverflow.com/a/25139519

http://stackoverflow.com/a/25331143
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25171052
type: AcceptedAnswer
has body: So after taking a break from this project, I finally figured out how to bind the objects loaded via AJAX. The problem was that Knockout was binding the document before the AJAX calls were finished so, for whatever reason, the binding wasn't reflecting these changes. What I decided to do was time out the document from applying the binding and load everything from the server first. I then passed in all the objects into the View Model and apply the binding on a half second delay. Everything works great now. Here is the code: function TeamModel(data, isPreData) { if (isPreData) { this.Tri = data.Tri; this.Name = data.Name; this.Rank = ko.observable(data.Rank); } else { if (data) { this.Tri = data.Tricode; this.Name = data.DisplayName; } else { this.Tri = ""; this.Name = ""; } this.Rank = ko.observable(0); } } var afcteams; $.getJSON('/Brackets/GetBrackets', { id: someId}, function (bracketsObject) { if (bracketsObject) { afcteams = $.map(bracketsObject.AfcTeams, function (team) { return new TeamModel(team, true); }); } }).fail(function () { alert("There was an error getting data from the server."); }); var teams; $.getJSON('/Brackets/GetAFCTeams', function (data) { teams = $.map(data, function (team) { return new TeamModel(team, false); }); }); function SetBindings(afcteams, teams) { ko.applyBindings(new BracketsViewModel(afcteams, teams)); } setTimeout(function() { SetBindings(afcteams, teams); }, 500);
answers question: http://stackoverflow.com/q/25171052

http://stackoverflow.com/comment/39150173
has text: I have no idea what's going on in your code but understand that there's just no way that setting some local storage property to a value will affect other global variables. I think your interpretation of your observations is probably incorrect.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25149130
type: Comment

http://stackoverflow.com/a/25100916
answers question: http://stackoverflow.com/q/25100808
score: 0
type: Answer
has body: jQuery is for me a must. Other people think different. But the most are using it! I like e.G. the ultra fast ajax implemetation (most time in just one line). Another benefit is, that you can find many many plugins. Just google for "top10 jQuery slider" or "top10 alert jQuery plugin" etc... Bootstrap is for me a "nogo"!. When i see a bootstrap pages (not twitter!), than im thinking: "The company dont want to spend money for a webdesigner". If you are interested in responsive gridsystems than google for "lightweight gridsystems". There a re about 10 well documented ones.

http://stackoverflow.com/comment/39018379
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25077105
has text: @user3592182 Are you getting valid JSON? Are you using [the proper stringify/parse](http://api.jquery.com/jquery.parsejson/) functions within jQuery? Try and use a [JSON format checker](http://jsonformatter.curiousconcept.com/) to make sure the JSON is valid.

http://stackoverflow.com/comment/39067218
type: QuestionComment
has text: Make the tag `text/template`, give it an `id` and use `document.getElementById('id').textContent` to get the string. http://jsfiddle.net/WfF57/1
comment on: http://stackoverflow.com/q/25104859
score: 0
type: Comment

http://stackoverflow.com/comment/39164438
comment on: http://stackoverflow.com/a/25155769
score: 0
type: Comment
has text: When I changed to "text:", I get the following error "Uncaught NoModificationAllowedError: Failed to set the 'innerText' property on 'HTMLElement': The 'input' element does not support text insertion."
type: AnswerComment

http://stackoverflow.com/comment/39254377
comment on: http://stackoverflow.com/a/25205455
score: 1
type: AnswerComment
has text: This solution provides the best options for parsing XML in multiple browser environments, as well as the best DOM navigation practices.
type: Comment

http://stackoverflow.com/comment/39146360
comment on: http://stackoverflow.com/q/25146925
type: Comment
type: QuestionComment
score: 0
has text: Show the query that fill the dropdown will help us to understand what you need.

http://stackoverflow.com/comment/39109454
type: AnswerComment
comment on: http://stackoverflow.com/a/25127098
score: 0
type: Comment
has text: @brno792 - I'm sorry to break it to you, but you can't round a string, no matter how hard you try.

http://stackoverflow.com/a/25134841
upvote count: 2
answers question: http://stackoverflow.com/q/25134748
score: 2
has comment: http://stackoverflow.com/comment/39122999
has body: You most likely have double quotes in the content generated by PHP. You need to escape them properly, or, providing you don't have single quotes in the PHP content, you could do: tbl_row +='&lt;?php foreach($data as $row) { /* ... */} ?&gt;'; As noted in the comments, having newlines in your PHP content might also cause this issue. Remove or replace them.
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39228186
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25191251
type: QuestionComment
has text: Ajax to the rescue. Submit this form via Ajax, have your register.php code hit the DB and do a check, if email address already exists, echo a response, in your Ajax call process that response accordingly. Here's another answer with details http://stackoverflow.com/questions/16323360/submitting-html-form-using-jquery-ajax

http://stackoverflow.com/comment/39226988
type: Comment
has text: I'm simply changing `.animate({"margin-left": '-=255px'});` with `.hide()`
comment on: http://stackoverflow.com/a/25190574
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39268847
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25212900
type: Comment
has text: You might try a custom filter as in [this question](http://stackoverflow.com/questions/16842630/angularjs-incorrect-order-in-ng-repeat)

http://stackoverflow.com/comment/39029163
has text: What is the third part of version? I'm not sure but I think this issue has been fixed already in angular version around 1.2.16
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25083177

http://stackoverflow.com/q/25205748
score: 0
has answer: http://stackoverflow.com/a/25205827
has body: I have a javascript class Data in which I tried to get the string representation of my object: function Data(t, s, m) { this.time = t; this.sender = s; this.message = m; var stringRep = function() { return ("time:" + this.time + " sender:" + this.sender + " message:" + this.message) }; console.log(this.stringRep); //returns undefined var typeRep = (jQuery.type(1234)); console.log(this.typeRep); //returns undefined Data.prototype.toString = function DataToString() { var ret = "time:" + this.time + " sender:" + this.sender + " message:" + this.message; return ret; } console.log(this.toString()); //returns correct toString representation } First I tried using stringRep which gave undefined. Then I even tried to get the type of simple no. 1234 using typeRep which also returned undefined. Then finally I got help from MDN to correctly override toString method. What was wrong in previous approaches?
has comment: http://stackoverflow.com/comment/39255095
has answer: http://stackoverflow.com/a/25205901
has answer: http://stackoverflow.com/a/25205807
has title: Different ways of obtaining string representation of object
answer count: 4
possible better answer: http://stackoverflow.com/a/25205858
type: AnsweredQuestion
type: Question
accepted answer: http://stackoverflow.com/a/25205827
tagged with: javascript
has comment: http://stackoverflow.com/comment/39255056
has answer: http://stackoverflow.com/a/25205858

http://stackoverflow.com/a/25121396
answers question: http://stackoverflow.com/q/25121240
has comment: http://stackoverflow.com/comment/39098338
has body: Ok so my first train of thought was to look up the css property vertical-align here. Applies to: inline-level and table-cell elements So looking at your example, inline-level objects seem to be out of the question -- so why not table cell? Try this out: .box { display: table-cell; height: 200px; width: 400px; background: #d4d4d4; text-align: center; vertical-align: middle; } &lt;div class="box"&gt; Text Text Text &lt;/div&gt; Just a side note, there are ways to do this with a span within a div or a div withing a div, this is just how I chose to interpret the question. EDIT Ignore my answer because it doesn't do anything about textareas. See this pen on CodePen for an example of a good fix.
score: 0
has comment: http://stackoverflow.com/comment/39098307
type: Answer

http://stackoverflow.com/comment/39204543
type: Comment
has text: It is a cross browser solution in that it handles browsers that don't support the FileReader component.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25163128

http://stackoverflow.com/comment/39220103
score: 0
type: AnswerComment
type: Comment
has text: Arguments you are bringing are very good and they help me a lot to understand. In my situation, my application serves only as a visualisation client (reports/charts). So there is no real advantage of reloading the entire page because the web service returns all the data. One thing I would like to understand: when you do a POST of the form, is it possible to catch the parameters when the page reloads (client-side) and to call a web service? I currently do an AJAX call with JQuery without reloading the page.
comment on: http://stackoverflow.com/a/25186946

http://stackoverflow.com/q/25218457
has title: method preventExtensions javascript and defineProperty
tagged with: jquery
type: UnansweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25218555
score: 0
has body: First of all Hello to everyone, and sorry for my English. I would still take advantage of the expertise and availability of this community. My question is realted to try to add properties to an object after preventExtensions method. I know how this method works, this method makes an object not extensible, i can not add any property to this object My question is: why if i try to add a property in this way (obj.prop), i'll find no errors in console and this property will be undefinded, but if i try to add a new property with Object.defineproperty method i'll find an error in console? &lt;script&gt; var obj={} Object.preventExtensions(obj) // i can not add other properies to this object console.log(Object.isExtensible(obj))//false // why if i try to add a property in this way i'll find undefined obj.b='bbb' console.log(obj.b) // and in this way i'll find an error Object.defineProperty(obj, 'w', { enumerable: true,configurable:true,writable:true,value:'www' }); &lt;/script&gt; Basically my question is about the different behavior between obj.prop and Object.defineProperty Any suggestions will be read with pleasure, thank you all.
answer count: 1

http://stackoverflow.com/comment/39148750
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25148354
has text: you must instantiate your `Client`
type: Comment

http://stackoverflow.com/a/25178159
answers question: http://stackoverflow.com/q/25178024
score: 4
type: AcceptedAnswer
type: Answer
upvote count: 4
has body: You can access the xhr from the malsup form and abort the request like so: var form = $('#myForm').ajaxSubmit({ ... }); var xhr = form.data('jqxhr'); xhr.abort();
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25178024

http://stackoverflow.com/comment/39198711
type: Comment
score: 0
has text: Can you show `console.log(thread)`?
comment on: http://stackoverflow.com/q/25175413
type: QuestionComment

http://stackoverflow.com/q/25222267
has answer: http://stackoverflow.com/a/25222521
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39286892
favorite count: 0
tagged with: scope
tagged with: angularjs
has title: How to get angular variable to javascript when using scope() method
has body: This is how I get my input. sql table -> php slim -> angularjs -> website. I need to GET a variable in javascript that php slim is returning to angular. Right now I'm using this in $( document ).ready(function() {. var $element = $('div[ng-show="game"]'); var scope = angular.element($element).scope(); console.log(scope); It returns this in console. Any ideas how to achieve this?
has comment: http://stackoverflow.com/comment/39296880
has answer: http://stackoverflow.com/a/46019754
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39286042
type: Question
has comment: http://stackoverflow.com/comment/39286032
has comment: http://stackoverflow.com/comment/39286211
has comment: http://stackoverflow.com/comment/39286227

http://stackoverflow.com/comment/39336942
comment on: http://stackoverflow.com/a/25184578
has text: @Ethan It worked..I was recalculating the average and also adding while removing the records which was causing the issue.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39111052
type: QuestionComment
type: Comment
has text: You could do this with a spreadsheet and few functions.
comment on: http://stackoverflow.com/q/25127442
score: 0

http://stackoverflow.com/comment/39224697
comment on: http://stackoverflow.com/q/25189044
has text: @zebediah49 Good point, that is true! But I do think if we're already including a script to change the interface as an indication to the user, it isn't much more trouble to also give them a reassuring message.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25082666
accepted answer: http://stackoverflow.com/a/25082765
possible better answer: http://stackoverflow.com/a/25117299
has answer: http://stackoverflow.com/a/25117299
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25082765
tagged with: javascript
has title: Highcharts center on x and y axis offset
score: 0
answer count: 2
tagged with: highcharts
has body: First, for reference I'm trying to mimic this chart: Currently my chart looks like this: http://jsfiddle.net/eA4Df/ What's the option to center the (1, 1) coordinates of the chart but still display all of the bubble data? Current highcharts options are: chart: { type: 'bubble', zoomType: 'xy' }, legend: { enabled: false }, credits: { enabled: false }, title: { text: 'Highcharts Bubbles' }, xAxis: { plotLines: [{ color: '#000000', width: 2, value: 1 }] }, yAxis: { plotLines: [{ color: '#000000', width: 2, value: 1 }] }

http://stackoverflow.com/q/25079250
has comment: http://stackoverflow.com/comment/39019159
tagged with: button
has answer: http://stackoverflow.com/a/25079476
has body: Here the situation: In my html page I have a link, which onclick runs a PHP script. Load new tasks I use an invisible iframe to execute the script but I stay on the same page. This link executes script.php which updates mysql database, but in order to see new content the page must be reloaded. Of course I can always create a separate button/link that reloads current page. But I wonder if there is a way to execute the PHP script and reload current page with one html button.
has comment: http://stackoverflow.com/comment/39019106
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39019234
has comment: http://stackoverflow.com/comment/39019138
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/39019494
has answer: http://stackoverflow.com/a/25079660
type: Question
has comment: http://stackoverflow.com/comment/39019681
has title: HTML button to load data and refresh UI
tagged with: javascript
has answer: http://stackoverflow.com/a/25079398
score: 0
answer count: 3

http://stackoverflow.com/comment/39268702
has text: Yes it's the a.value and b.value that I'm missing since my data file has more than one column. It works now. Thanks!
type: Comment
comment on: http://stackoverflow.com/a/25191342
score: 0
type: AnswerComment

http://stackoverflow.com/q/25143133
has comment: http://stackoverflow.com/comment/39549406
has comment: http://stackoverflow.com/comment/39141109
has comment: http://stackoverflow.com/comment/39144310
tagged with: css
has answer: http://stackoverflow.com/a/25388350
type: AnsweredQuestion
downvote count: 0
has title: Jquery Mobile ui-grid
score: 1
has comment: http://stackoverflow.com/comment/39150878
type: Question
has comment: http://stackoverflow.com/comment/39144775
has comment: http://stackoverflow.com/comment/39139074
linked to: http://stackoverflow.com/q/23764153
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39554204
has body: Just a quick jQuery Mobile question. I am working with ui-grid-a (for the basic case of 50/50 split) and I can populate and render the grid without issue. However in some cases there are fewer items than the content size and I was curious if it was possible to have the grid not wrap the content, but instead fill the available space in the div. I have tried a few different methods. 1) Basic configuration no modification- the ui-grid seems to wrap the content inspection shows the height on the data-role=content is much smaller than the page. Thus the grid is "filling" the content. 2) As a result I then worked to expand the content. Using some JS fiddle code (below) I was able to set a height to the content (and inspection confirmed this) however the grid remains only a fraction of the content area jQuery code in .ready() to adjust the content size to fill page var screen = $.mobile.getScreenHeight(); var header = $(".ui-header").hasClass("ui-header-fixed") ? $(".ui-header").outerHeight() - 1 : $(".ui-header").outerHeight(); var footer = $(".ui-footer").hasClass("ui-footer-fixed") ? $(".ui-footer").outerHeight() - 1 : $(".ui-footer").outerHeight(); var contentCurrent = $(".ui-content").outerHeight() - $(".ui-content").height(); var content = screen - header - footer - contentCurrent; $(".ui-content").height(content); 3) I tried binding this to the page load thinking that maybe the grid was calculated before the Javascript on ready fired. But no luck. Any suggestions would be very welcome. I am not restricted to jQuery, I've tried many CSS options however those styles don't seem to help when using the custom jQuery Mobile UI (Content/Page) Thank you in advance, As requested a sample markup mirroring my own (I have some addition divs within this that are popups, but this represents the main content) Home Test Test Test Test Test Test
upvote count: 1
has comment: http://stackoverflow.com/comment/39140194
answer count: 1
has comment: http://stackoverflow.com/comment/39140382
accepted answer: http://stackoverflow.com/a/25388350
favorite count: 0

http://stackoverflow.com/a/25131730
upvote count: 6
has body: You can convert the lang code to language by var isoLangs = { "ab": { "name": "Abkhaz", "nativeName": "аҧсуа" }, "aa": { "name": "Afar", "nativeName": "Afaraf" }, "af": { "name": "Afrikaans", "nativeName": "Afrikaans" }, "ak": { "name": "Akan", "nativeName": "Akan" }, "sq": { "name": "Albanian", "nativeName": "Shqip" }, "am": { "name": "Amharic", "nativeName": "አማርኛ" }, "ar": { "name": "Arabic", "nativeName": "العربية" }, "an": { "name": "Aragonese", "nativeName": "Aragonés" }, "hy": { "name": "Armenian", "nativeName": "Հայերեն" }, "as": { "name": "Assamese", "nativeName": "অসমীয়া" }, "av": { "name": "Avaric", "nativeName": "авар мацӀ, магӀарул мацӀ" }, "ae": { "name": "Avestan", "nativeName": "avesta" }, "ay": { "name": "Aymara", "nativeName": "aymar aru" }, "az": { "name": "Azerbaijani", "nativeName": "azərbaycan dili" }, "bm": { "name": "Bambara", "nativeName": "bamanankan" }, "ba": { "name": "Bashkir", "nativeName": "башҡорт теле" }, "eu": { "name": "Basque", "nativeName": "euskara, euskera" }, "be": { "name": "Belarusian", "nativeName": "Беларуская" }, "bn": { "name": "Bengali", "nativeName": "বাংলা" }, "bh": { "name": "Bihari", "nativeName": "भोजपुरी" }, "bi": { "name": "Bislama", "nativeName": "Bislama" }, "bs": { "name": "Bosnian", "nativeName": "bosanski jezik" }, "br": { "name": "Breton", "nativeName": "brezhoneg" }, "bg": { "name": "Bulgarian", "nativeName": "български език" }, "my": { "name": "Burmese", "nativeName": "ဗမာစာ" }, "ca": { "name": "Catalan; Valencian", "nativeName": "Català" }, "ch": { "name": "Chamorro", "nativeName": "Chamoru" }, "ce": { "name": "Chechen", "nativeName": "нохчийн мотт" }, "ny": { "name": "Chichewa; Chewa; Nyanja", "nativeName": "chiCheŵa, chinyanja" }, "zh": { "name": "Chinese", "nativeName": "中文 (Zhōngwén), 汉语, 漢語" }, "cv": { "name": "Chuvash", "nativeName": "чӑваш чӗлхи" }, "kw": { "name": "Cornish", "nativeName": "Kernewek" }, "co": { "name": "Corsican", "nativeName": "corsu, lingua corsa" }, "cr": { "name": "Cree", "na…
downvote count: 1
answers question: http://stackoverflow.com/q/25131388
score: 5
type: Answer

http://stackoverflow.com/comment/39305366
type: QuestionComment
has text: angular is just too hard
score: 0
comment on: http://stackoverflow.com/q/25217942
type: Comment

http://stackoverflow.com/comment/39130777
score: 0
type: AnswerComment
has text: I like this approach! My answer, which I took from that other question, works OK in a view-model, outside of a custom binding. But if you are in a custom binding, Ilya's approach feels nicer.
type: Comment
comment on: http://stackoverflow.com/a/25137890

http://stackoverflow.com/q/25176473
has title: How to prevent javascript execution when appended to an url?
has body: something like this https://example.com/my_account/login?"> when I enter this url in a browser it shows an alert. how to prevent that? Edit: This is a java web application using Struts framework...
has comment: http://stackoverflow.com/comment/39200473
downvote count: 1
has comment: http://stackoverflow.com/comment/39200556
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39200446
score: 0
answer count: 2
upvote count: 1
tagged with: web
has answer: http://stackoverflow.com/a/25176655
favorite count: 0
tagged with: xss
has answer: http://stackoverflow.com/a/25176607
has comment: http://stackoverflow.com/comment/39200449
type: UnansweredQuestion

http://stackoverflow.com/comment/39178987
score: 0
type: QuestionComment
type: Comment
has text: I've had similar issues with jQuery and Turbolinks and found that the [`jquery-turbolinks`](https://github.com/kossnocorp/jquery.turbolinks) gem helps resolve issues with `bind` events.
comment on: http://stackoverflow.com/q/25163551

http://stackoverflow.com/q/25121218
tagged with: c#
tagged with: hyperlink
tagged with: javascript
score: 0
answer count: 1
has title: return a value from a JS, through a getHyperlink method
tagged with: asp.net
type: UnansweredQuestion
has body: I've made a table in a website (ASP.net/C#) and in that table, there is a Delete button in each row. If the user clicks on the delete button, I'd like there to be a little pop-up, which asks whether he's sure he wants to delete it. Of course, depending on the answer, the system deletes the object, or not. I currently use this piece of code, which works, but I can't get the return value of the code. getHyperLink(item, "ibDelete").Attributes.Add("onClick", "return confirm('You sure you wanna delete all this shizzle?')"); Does anybody know how I can get a return value from that statement? Thank you in advance :) EDIT: below there is a method declared which is probably relevant. I'm not to sure of things myself as I haven't written this part. public HyperLink getHyperLink(RepeaterItem item, string name) { return (HyperLink)item.FindControl(name); }
has answer: http://stackoverflow.com/a/25121556
type: Question

http://stackoverflow.com/a/25140350
score: -1
has comment: http://stackoverflow.com/comment/39133666
answers question: http://stackoverflow.com/q/25139888
type: Answer
has body: You can use javascript frameworks for single page apps. they can handle by easy way that you do not need to request to other url or external file. all of your application will run in just single page without refresh. here i offer list of this frameworks: backbonejs ( that is easy to use ) emberjs angularjs witch is google project and personally i offer this. knockoutjs list of javascript single page framework is mush bigger, but know about these more. UPDATE to handle custom url schema i know some plugins, but personally i did not test theme - Custom URL scheme -
downvote count: 2
upvote count: 1

http://stackoverflow.com/q/25165140
linked to: http://stackoverflow.com/q/673153
has comment: http://stackoverflow.com/comment/39213296
tagged with: javascript
linked to: http://stackoverflow.com/q/1312236
has comment: http://stackoverflow.com/comment/39179836
has body: This is again one of these old issues: I would like to make the four first columns of my HTML-Table sticky (only horizontally). There are several solutions out there which work properly if it's a smaller table. Unfortunately mine has a big size and I would like it to spread it over the whole screen. Therefore most solutions which pack the table in a scrollable div are no use because they put the scrollbar at the very end of the div - which is quite a distance to go down. Also there is some small content over the table so it's yet not 100% of the screen... There were some ideas around the Internet to give the frozen tds the position: absolute; attribute which didn't work for me. http://www.fixedheadertable.com/ seems kinda fine - unfortunately till now it just messes up my table... EDIT 1: It's a pretty huge table which displays a database and does some calculation with its values. That's one of my problems: It always has the same amount of columns (about 50) but the number of rows vary. But in general the table is kinda straight-forward with no surprises: Number Pos. Nr. Info 1 More infos Here are some more infos ... and it goes on ... vals... more vals and some more ... ... and it goes on ... Also I use this for the first header line: HTML table with fixed headers? EDIT 2: http://www.fixedheadertable.com/ - there is not really an explanation and for some reason it just messes everything up http://tympanus.net/codrops/2014/01/09/sticky-table-headers-columns/ Has the mentioned problem: It requires a limiting div around it how do I create an HTML table with fixed/frozen left column and scrollable body? Answer #1: Same problem with the div position: fixed - doesn't work at all for me How can I make the first and second column of a table sticky Answer #1 - dosen't work either http://massless.org/_tests/grid1/ - seems to be quite old and requires a div http://learndevelopingmyway.blogspot.co.at/2012/03/sticky-columnsheaders-freeze-pane-in.html is this even a table?
has comment: http://stackoverflow.com/comment/39179534
answer count: 1
tagged with: jquery
favorite count: 0
downvote count: 3
type: UnansweredQuestion
score: -3
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39181272
has answer: http://stackoverflow.com/a/25165398
has title: Sticky td-column without external div
upvote count: 0
has comment: http://stackoverflow.com/comment/39180203
linked to: http://stackoverflow.com/q/1100835
linked to: http://stackoverflow.com/q/7684111
has comment: http://stackoverflow.com/comment/39186444
type: Question

http://stackoverflow.com/q/25197301
tagged with: jquery
favorite count: 0
has title: tooltip value always get the same values
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39239938
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25197908
has comment: http://stackoverflow.com/comment/39239989
downvote count: 2
has body: I have problem to get different values of tooltip from 3 boxes. when I click the first box and second box, the value on tooltip won't change.. it always get value from the third box, so how to get the different value from the box? ToolTip <?php for($i=1;$i<=3;$i++){ ?> <div id="activator<?php echo $i; ?>" class="activator tip-specific-class" onclick="showValue(<?php echo $i; ?>);"> <p id="total<?php echo $i; ?>">0 <input type="hidden" name="totalall<?php echo $i; ?>" value=0> <?php } ?>
type: Question
score: -2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25197908
has comment: http://stackoverflow.com/comment/39239718
upvote count: 0
answer count: 1

http://stackoverflow.com/comment/39007352
score: 0
has text: Ahh, http://stackoverflow.com/questions/4616202/self-references-in-object-literal-declarations , http://stackoverflow.com/questions/7433395/object-referencing-its-own-property-on-initilization?lq=1
comment on: http://stackoverflow.com/q/25072701
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25144161
has body: function1 = function(){ something.on('transitionend', function(){ // now function2 should run }); } function2 = function(){ alert('ok'); } function1(); function2(); So I heard about jQuery promises. I would return a "deferred" object, and inside the event handler I would call deferred.resolve(); But what happens if i have multiple event handlers there and I only want the next function to run when all have been fired? + I don't like the idea of introducing something foreign like "deferred" into other parts of the code. Is there any other way to detect if function1 has finished all its work?
downvote count: 0
has answer: http://stackoverflow.com/a/25145467
type: Question
tagged with: jquery-deferred
upvote count: 6
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39140472
tagged with: jquery-plugins
tagged with: jquery-events
answer count: 3
has answer: http://stackoverflow.com/a/25144244
favorite count: 0
has answer: http://stackoverflow.com/a/28435163
has comment: http://stackoverflow.com/comment/39141522
type: UnansweredQuestion
has title: Run function after another one completes
score: 6

http://stackoverflow.com/comment/39061069
type: Comment
type: QuestionComment
has text: possible duplicate of [How to disable/enable an input with jQuery?](http://stackoverflow.com/questions/1414365/how-to-disable-enable-an-input-with-jquery)
comment on: http://stackoverflow.com/q/25101413
score: 0

http://stackoverflow.com/comment/39228796
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25191520
has text: Yes!... I prefer to know

http://stackoverflow.com/comment/39257078
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25205993
score: 0
has text: In my case these files are already excluded in sonar.exclusions from other analysis (Cobertura in this case). The Technical Debt analysis does not honor those exclusions in sonar.exclusions.

http://stackoverflow.com/q/25101512
tagged with: liferay-aui
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: internet-explorer-8
has title: Dialog Iframe in liferay is not getting closed after resizing dialog in IE8
tagged with: javascript
tagged with: liferay
has comment: http://stackoverflow.com/comment/39163349
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/48560041
tagged with: liferay-6
has body: Below is code used for opening dialog iframe Liferay.Util.openWindow({ dialog:{ width:'70%', modal:true, constrain:true, destroyOnClose:true, cache:false }, uri:'http://localhost:8080', id:'id123', title:'LocalHost' }); Once dialog iframe gets open, resize the dialog window and perform any action(click on any links, submit the form) that refresh the dialog window. After that if you click on close button(cross icon) on dialog's top-right section, dialog is not getting closed instead dialog iframe shows blank screen. In javascript console it gives Permission denied. Has anyone faced such issue or know how to resolve this, please share?

http://stackoverflow.com/q/25077355
tagged with: object
has answer: http://stackoverflow.com/a/25077501
type: Question
has title: Javascript, turn string into object attribute
has body: I am wondering if it is possible to have an object with some attributes for example: object name: Human this.age = 8 this.name = "Steve" Then have an array of strings which contain each attribute to that object such as: manAttributes = ["age","name"] So therefore if i wrote console.log(Human.manAttributes[0]) The console should log '8' But this doesn't work, I get unexpected string. Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/39015943
has answer: http://stackoverflow.com/a/25077503
has answer: http://stackoverflow.com/a/25077720
score: 0
has answer: http://stackoverflow.com/a/25077510
tagged with: attributes
answer count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25077513

http://stackoverflow.com/comment/39148808
has text: Thanks but I want to avoid that. I want a static function.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25148395
type: AnswerComment

http://stackoverflow.com/comment/39089565
type: QuestionComment
comment on: http://stackoverflow.com/q/25116691
has text: @Navin This functionality is working fine mate, what is not working fine is when u select a option from 2nd select box anything apart from option 1.. than it'll still show you the value of first option. Please wait, I'm adding it to fiddle and than you'll better understand it!!
score: 0
type: Comment

http://stackoverflow.com/comment/39094255
type: QuestionComment
has text: The images are loaded from the filesystem using either Node.js (Node Webkit), TideSDK, PHP Desktop MSIE/Chrome. I have not tried this in regular chrome because it does not allow viewing images from the local filesystem. I would have a little trouble finding 10k images remotely, so can you show me your result? I am very interested.
comment on: http://stackoverflow.com/q/25118398
score: 0
type: Comment

http://stackoverflow.com/comment/39264148
type: Comment
comment on: http://stackoverflow.com/a/25210518
has text: Thanks, but how can I trigger the event with a button click?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39009060
has text: Learn how to use the console, log each value, and one of them will surely not be a number
score: 4
type: Comment
comment on: http://stackoverflow.com/q/25073761
type: QuestionComment

http://stackoverflow.com/comment/39252420
score: 0
type: Comment
type: QuestionComment
has text: @m4rtin I am using Hibernate framework and i am implementing the Servlet interface for servlet.
comment on: http://stackoverflow.com/q/25204160

http://stackoverflow.com/comment/39098250
score: 0
type: Comment
type: QuestionComment
has text: But if you absolutely want this in-browser: https://github.com/ChenWenBrian/FileSaver.js#examples
comment on: http://stackoverflow.com/q/25121384

http://stackoverflow.com/q/25072069
has answer: http://stackoverflow.com/a/25090990
upvote count: 7
accepted answer: http://stackoverflow.com/a/25090990
tagged with: javascript
linked to: http://stackoverflow.com/q/31487043
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/39006940
answer count: 3
has answer: http://stackoverflow.com/a/32149219
downvote count: 1
favorite count: 0
possible better answer: http://stackoverflow.com/a/32149219
has comment: http://stackoverflow.com/comment/39030277
score: 6
tagged with: geojson
type: Question
has answer: http://stackoverflow.com/a/50554705
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39006504
has body: Is there built-in support or any library to export geoJSON data from the google.maps.Data layer or google.maps.Data.Feature or google.maps.Data.Geometry or even using Marker,Polyline and Polygon.I have code like this,for example: var point=new google.maps.Data.Point(m.getPosition()); activeFeature.setGeometry(point); console.log(activeFeature.getGeometry()); equiLayer.add(activeFeature); I would like to export this data to the server as geojson.Something like the toGeoJson method in leaflet?
tagged with: export
has title: Export geoJSON data from Google Maps

http://stackoverflow.com/a/25145089
score: 1
accepted answer of: http://stackoverflow.com/q/25144784
upvote count: 1
has body: Modify the code according to your needs. What this code would do is that if the user refreshes the page within 5 second, the timer will reset and start the count again. If user does not refresh/reload the page within 5 seconds, ajax call will be made to your controller action to log the user off. Return a new url to the ajax call to automatically redirect user to a new page. [FYI, I do not like automatic logoffs, specially such short ones. Of course, most Web servers have session timeouts. I would rather go with those timeouts.] // add these functions at the bottom of the output html page within &lt;script&gt; tags // YOU SHOULD CALL setLogoutTimer FUNCTION ON MOUSEMOVE OR SOME USER ACTIVITY EVENT. // otherwise user will be logged out even when the user is doing something on the page setLogoutTimer(); function setLogoutTimer() { var myTimeout; if (window.sessionStorage) { myTimeout = sessionStorage.timeoutVar; if (myTimeout) { clearTimeout(myTimeout); } } myTimeout = setTimeout(function () { logoutNow(); }, 5000); //adjust the time. if (window.sessionStorage) { sessionStorage.timeoutVar = myTimeout; } } function logoutNow() { if (window.sessionStorage) { sessionStorage.timeoutVar = null; } //MAKE AN AJAX CALL HERE THAT WILL CALL YOUR FUNCTION IN // CONTROLLER AND RETURN A URL TO ANOTHER PAGE $.ajax({ url: 'YOUR CONTROLLER ACTION URL', cache: false, async:false, type: 'POST', success: function (msg) { window.location.href=msg; //msg is the url of another page returned by the controller } }); }
downvote count: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25144784
type: Answer

http://stackoverflow.com/comment/39162574
type: Comment
score: 0
has text: That should work! but btw, you did not mention that "divs can be deleted" in your question :-)
comment on: http://stackoverflow.com/a/25155453
type: AnswerComment

http://stackoverflow.com/q/25164302
has body: I used some jQuery for lazy loading and must add the text (data-scroll-reveal) to effects and I am using adobe edge animate and the adobe edge by automatically render div with id but I need to put the (data-scroll-reveal) to effect to div its self I am used for lazy loading the scrollreveal http://scrollrevealjs.org/ Its render in source code like is there any way to add the (data-scroll-reveal) to div of i mean like below or any way to delaying an Edge Animate until visible ?
answer count: 1
linked to: http://stackoverflow.com/q/487073
tagged with: dom
tagged with: adobe-edge
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
favorite count: 0
type: Question
score: 1
tagged with: adobe
has answer: http://stackoverflow.com/a/26387369
has title: Any way to delaying an Edge Animate until visible
upvote count: 1

http://stackoverflow.com/comment/40567218
has text: Did you find the way to do that? I'm experiencing the same problem at the moment! Also, why are you asking for the difference between the two URLs?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25104448

http://stackoverflow.com/q/25107229
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has body: So far I have got an extension that lists out the webpage the user is on and a button. The button should, when clicked, fill in the textfield with "testing123". On the webpage where I am testing the form has a id and name "form" and the textfield has an id and name "body". If I could get some help filling in this textfield or a general textfield it would be greatly appreciated. Here are the files I have so far: manifest.json { "name": "Extension Menu", "version": "1.0", "manifest_version": 2, "description": "My extension", "browser_action": { "default_icon": "icon.png", "default_menu": "Menu", "default_popup": "popup.html" }, "icons": { "128": "icon.png" }, "permissions": [ "tabs", "http://*/*", "activeTab" ] } popup.html Loading ... Go! popup.js chrome.tabs.getSelected(null, function(tab) { // $("#body").val("testing123"); // document.getElementById('body').value = 'testing123'; document.getElementById('currentLink').innerHTML = tab.url; }); I have tried using: $("#body").val("testing123"); document.getElementById('body').value = 'testing123'; but they do not seem to be working.
favorite count: 0
accepted answer: http://stackoverflow.com/a/25107623
tagged with: css
type: AnsweredQuestion
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/39072265
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/25107623
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/26519959
has comment: http://stackoverflow.com/comment/39071995
has title: How to fill out a textfield within a form on a webpage from a chrome extension?

http://stackoverflow.com/comment/39066483
score: 0
type: Comment
type: AnswerComment
has text: almost, scrlbar have the initial position, but approach is cool!
comment on: http://stackoverflow.com/a/25104421

http://stackoverflow.com/q/25217743
downvote count: 0
tagged with: javascript
duplicate of: http://stackoverflow.com/q/3755606
has comment: http://stackoverflow.com/comment/39277929
linked to: http://stackoverflow.com/q/5422585
has title: Javascript !function () {} notation
favorite count: 0
has comment: http://stackoverflow.com/comment/39277900
answer count: 0
linked to: http://stackoverflow.com/q/3755606
type: UnansweredQuestion
has body: I've seen several times function like this !function(self) { // code }(this) what means !function ?
upvote count: 1
score: 1
type: Question

http://stackoverflow.com/comment/39039140
type: Comment
score: 0
type: AnswerComment
has text: That was the first thing I tried but for some reason the viewModel is empty when it gets to the server. It is defined but all the values are null.
comment on: http://stackoverflow.com/a/25089253

http://stackoverflow.com/q/25214187
type: UnansweredQuestion
tagged with: django
has comment: http://stackoverflow.com/comment/39272177
has body: I am very confused as to how to write the code in javascript/jquery to allow for the proper submission of my form. I currently have a function to handle an on-click event, which loads the proper form. However, the form fails to submit successfully. I am using the .submit() function, but I think I am missing something here. I believe the URL I would have to place in that function would be the one being dynamically loaded in the onclick function. Is there a reasonable way to transfer this information? Or am I mistaken? I have already confirmed that the correct URL is loaded and that the form behaves as intended if the URL is accessed manually. This issue seems to be unique to loading the URL from select_my_book.html (the url to be loaded) &lt;form action="" method="POST" id="submitForm"&gt; {% csrf_token %} &lt;!-- Code to render form elements --&gt; &lt;input type="submit" value = "Buy" id="submit"&gt; &lt;/form&gt; from get_my_book.html (the current url with the tabs/jumbotron) {% for course in userprofile.courses.all%} &lt;div class="minicoursenav"&gt; &lt;a class='course_link' data='{{ course.pk }}' href='#' type="submit"&gt; {{ course.name }} &lt;/a&gt; &lt;/div&gt; {% endfor %} from activate.js function selectConditionURL(criterion, condition){ var url = "/books/select_my_book/" return(url+ condition + "/" + criterion + "/") } function selectCourseURL(criterion){ var url = "/books/select_my_book/best_price/"; return (url + criterion + "/"); } $('.course_link').click(function(e) { e.preventDefault(); var course_pk = $(this).attr('data'); /*alert( course_pk );*/ var url = selectCourseURL(course_pk); /*alert( url );*/ $("#best_price").load(url); $("#very_good").load(selectConditionURL(course_pk, "very_good_condition")); $("#good").load(selectConditionURL(course_pk, "good_condition")); $("#fine").load(selectConditionURL(course_pk, "fine_condition")); return false; }) $(document).ready(function() { $("#submitForm").submit(function(e) { e.preventDefault(); $.ajax({ ty…
answer count: 0
tagged with: django-forms
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39271306
tagged with: ajax
score: 0
has title: Form not submitting, jquery load, submit
has comment: http://stackoverflow.com/comment/39272211
has comment: http://stackoverflow.com/comment/39271217

http://stackoverflow.com/q/25113385
tagged with: ajax
has comment: http://stackoverflow.com/comment/39083365
has comment: http://stackoverflow.com/comment/39083963
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25113615
tagged with: http://stackoverflow.com/tag/json
tagged with: wordpress
has body: I have the following Ajax request which I make. Currently if the json response is true then the success callback runs. But if the json response is false then the success callback isn't run, even if the Ajax request itself is successfully made. $.ajax({ url: "http://testdomain.com/wp-admin/admin-ajax.php", type: "POST", dataType: "json", cache: false, data: { action: 'check_username', user: user_email }, success: function(json) { if (json.user_exists == true) { $.ajax({ url: "http://testdomain.com/wp-admin/admin-ajax.php", type: "POST", dataType: "json", cache: false, data: { action: 'auto_login', user: user_email }, success: function(json) { $('#aux_lightbox_overlay').fadeOut(); } }); } if (json.user_exists == false) { $.ajax({ url: "http://testdomain.com/wp-admin/admin-ajax.php", type: "POST", dataType: "json", cache: false, data: { action: 'auto_register', user: user_email }, success: function(json) { $('#aux_lightbox_overlay').fadeOut(); } }); } } }); So my question is, how do I get the callback to run even if the response is false? Thanks
has comment: http://stackoverflow.com/comment/39083748
type: Question
accepted answer: http://stackoverflow.com/a/25113892
tagged with: javascript
has title: Ajax success function not running
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25113892
possible better answer: http://stackoverflow.com/a/25113615
tagged with: jquery

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/25205534
tags question: http://stackoverflow.com/q/25112669
type: Tag
tags question: http://stackoverflow.com/q/25091287
tags question: http://stackoverflow.com/q/25197581

http://stackoverflow.com/comment/39288501
has text: Check your log file to see if Chat.php is throwing any errors. Or enable php error reporting. `data` is probably blank on return, try adding the fail part to see if it is actually failing and update your question
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25223631

http://stackoverflow.com/comment/39202363
has text: why you dont want to add `return;` in click method if it still doesn't exist?
comment on: http://stackoverflow.com/q/25177622
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39153125
comment on: http://stackoverflow.com/q/25149978
score: 0
has text: Yes I will look into it. Just busy!
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39132553
comment on: http://stackoverflow.com/a/25138195
type: AnswerComment
has text: Thanks for reply.But my motive is to use javascript & get the list of all input installed languages & populate my dropdown control.I don't want to add any new class/interface as i have said i am developing a C++ custom wizard which uses only default.htm & default.js file to interact with UI.
score: 0
type: Comment

http://stackoverflow.com/comment/39141454
type: QuestionComment
comment on: http://stackoverflow.com/q/25144607
has text: Create a label on your page, set visibility on it to false by default. Set the error to that label and change the visibility.
type: Comment
score: 1

http://stackoverflow.com/comment/39161758
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25155651
has text: Can you please elaborate?
score: 0

http://stackoverflow.com/a/25121040
has comment: http://stackoverflow.com/comment/39158606
has comment: http://stackoverflow.com/comment/39159204
upvote count: 1
type: AcceptedAnswer
has body: Either politely inform the user of the "right click &raquo; save as..." functionality - or serve the PDF with the following HTTP headers: Content-disposition: attachment; filename=&lt;FILENAME&gt;.pdf Content-type: application/octet-stream Which implies that, (source: rfc2616) ... the user agent should not display the response, but directly enter a `save response as...' dialog. Beyond this you have no say in where a file should be saved for security reasons.
has comment: http://stackoverflow.com/comment/39210521
type: Answer
accepted answer of: http://stackoverflow.com/q/25116824
answers question: http://stackoverflow.com/q/25116824
downvote count: 0
score: 1

http://stackoverflow.com/a/25192748
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25192511
has body: Becuase you are declaring your variables without var, they are being created as global object properties, and there is already a property on the global object called name, and you cannot overwrite it (it won't error, it just won't do it) something like the following should solve your issue vName = document.getElementById('iName'); email = document.getElementById('iEmail'); myConsole.innerHTML += " name: " + vName.value + " " + " email: " + email.value + " "; You potentially wouldn't have had this error if you had defined your variable scope better. I can't see all of your code, but I would have assumed that your javascript was inside a function, then you should use var to declare your variables, otherwise it declares them as properties of the global object (the window object in web browser). So something like the following would have been better variable scope, as variables in javascript have function scoping, and would have preventing the clash with a global object property function checkForm() { var name = document.getElementById('iName'); var email = document.getElementById('iEmail'); myConsole.innerHTML += " name: " + name.value + " " + " email: " + email.value + " "; }

http://stackoverflow.com/comment/46358045
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25196101
has text: Just a tiny update: $('a.dropdown-toggle:not([data-toggle])').on('click', function (e) { var a = $(e.delegateTarget); var li = a.parent(); li.parent().find('.open').removeClass('open'); li.addClass('open'); });

http://stackoverflow.com/comment/103721036
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/46072799
type: Comment
has text: I don't think that X-Frame-Options applies here - X-Frame-Options defined by the guest (embedded) page can cause the parent to refuse to load the page, but as far as I know it doesn't affect javascript access - even with X-Frame-Options: *, I don't think you'll be able to access the DOM of a different origin guest page with javascript

http://stackoverflow.com/comment/52247380
type: QuestionComment
comment on: http://stackoverflow.com/q/25080215
has text: Don't see anything that could produce this issue, don't see anything done with the `convertedImage` either btw.
score: 0
type: Comment

http://stackoverflow.com/a/25574093
upvote count: 2
downvote count: 0
has body: Debug it using chrome's web inspector. For me, when i had the same error, the addEvent function was the culprit. Checking the definition made me realise that I had forgotten to include jquery. I suspect it's the same case for you.
answers question: http://stackoverflow.com/q/25145610
type: Answer
score: 2

http://stackoverflow.com/a/25079962
score: 1
answers question: http://stackoverflow.com/q/25079851
has body: step 1: minify the html. i use this site: http://www.willpeavy.com/minifier/ step 2: make the minified html a javascript string, example: var $divdata = ' some child content '; step 3: append the div to the container $('#aTextDV').append($divdata); EDIT Always store backups of the normal (unminified)html. editing the minified html will be a pain in the butt later on. better to keep the unminified html for quick edits and repeat the process each time you need to edit.
upvote count: 1
has comment: http://stackoverflow.com/comment/39021099
downvote count: 0
has comment: http://stackoverflow.com/comment/39020554
has comment: http://stackoverflow.com/comment/39021517
has comment: http://stackoverflow.com/comment/39020513
type: Answer

http://stackoverflow.com/q/25218334
upvote count: 1
has title: Create Option elements from values in array
has answer: http://stackoverflow.com/a/25218663
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25218530
has body: How can I print time slots in jQuery without writing big code like below? function myFunction() { var x = document.getElementById("seltime"); var timeslots=["00:00","00:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30","24:00"]; for (var i=0; i&lt;timeslots.length; i++) { var option = document.createElement("option"); option.text += timeslots[i]; option.value += timeslots[i]; x.add(option); } } myFunction();
type: Question
has answer: http://stackoverflow.com/a/25218530
has answer: http://stackoverflow.com/a/25218524
has answer: http://stackoverflow.com/a/25218415
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/25218541
favorite count: 0
answer count: 5
downvote count: 2
possible better answer: http://stackoverflow.com/a/25218415

http://stackoverflow.com/a/25138174
upvote count: 3
has comment: http://stackoverflow.com/comment/39129605
score: 3
has body: window.onload = loadText; tells the browser to execute loadText when the document was loaded. That means that document.getElementById will be available (and work correctly) in loadText. window.onload = loadText(); executes loadText immediately and assigns the return value (undefined) to window.onload. The assignment is therefore useless and the function won't work. You want window.onload = loadText here, I have no idea why you even tried window.onload = loadText();.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39129561
accepted answer of: http://stackoverflow.com/q/25138092
type: Answer
answers question: http://stackoverflow.com/q/25138092

http://stackoverflow.com/a/25111339
has body: There are two approaches I know of. Option A: 2 layouts and extends Make two layouts: layout.jade and layout-homepage.jade, changing the include line accordingly. Most of your pages will extends layout, but index.jade will extends layout-homepage. Option B: variables block in layout.jade: - var HOMEPAGE = false; block variables doctype html html body if HOMEPAGE include ./includes/HOMEPAGE-head.jade else include ./includes/NORMAL-head.jade h1 My Site p Welcome to my super lame site. include ./includes/foot.jade Then in index.jade: block variables - HOMEPAGE = true; h1 This is your home page template... All the rest of your pages will default to HOMEPAGE = false so they don't need any changes to make this approach work.
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/39080947
accepted answer of: http://stackoverflow.com/q/25111231
has comment: http://stackoverflow.com/comment/39081161
answers question: http://stackoverflow.com/q/25111231

ecmascript-harmony
tag name: ecmascript-harmony
type: Tag
tags question: http://stackoverflow.com/q/25226727

http://stackoverflow.com/comment/39040540
score: 0
has text: Yes it does fade out because the mouse left the .image bacause the .hover-box overlaps it. #back is your .image , #front is your .hover-box, .image loses the focus, and .hover-box gets the new focus because it is over it. Good luck.
type: Comment
comment on: http://stackoverflow.com/a/25090128
type: AnswerComment

http://stackoverflow.com/a/25139063
accepted answer of: http://stackoverflow.com/q/25137256
upvote count: 13
has body: As pointed in comment, this works when you include input tag in cancel option $('#jqParetoEditList').sortable({ cancel: ".fixed,input", delay: 100, //connectWith: "", stop: function (event, ui) { //p.HandleSortPareto(ui, ui.item) // note this just handles the change in order }, start: function (event, ui) {} }); Check the Working Fiddle
answers question: http://stackoverflow.com/q/25137256
score: 13
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39139465
type: QuestionComment
comment on: http://stackoverflow.com/q/25143059
score: 0
type: Comment
has text: Yes. I would build this web app on a VPS on the internet, and then have a Raspberry Pi request updates periodically on an authenticated pull basis (e.g. every 10 minutes). That means that you don't need to worry about the uptime of the Pi, which may not be ideal, and you don't need to poke incoming holes into your home firewall. I don't think you need radio signals for this.

http://stackoverflow.com/comment/39006796
has text: No need to create an individual cronjob for each user. The general idea is to write a script that loops through every user, does whatever you want it to do and marks each set of changes complete so the next time it runs it only has to do new items. If you had more specifics, I would give you more direction.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25070667

http://stackoverflow.com/q/25210468
has comment: http://stackoverflow.com/comment/39273195
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
score: 0
has title: jqGrid what event gets triggered on search
answer count: 1
has body: I want to be able to capture the words that people are searching on in the column search box for jqGrid. What event gets triggered when the column is searched? You can see a jqGrid example search here Searching > Toolbar with operations http://www.trirand.com/blog/jqgrid/jqgrid.html
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25227642
type: Question

http://stackoverflow.com/comment/39278747
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25218130
has text: You can check the `Joby Mavelikara's` answer from this question http://stackoverflow.com/questions/946189/how-can-i-set-default-homepage-in-ff-and-chrome-via-javascript. That too it can work for `IE`, `Firefox` and not for `Opera` and `Chrome`.

http://stackoverflow.com/q/25116261
tagged with: http://stackoverflow.com/tag/html
has body: Populating a JavaScript array with variables Old JsFiddle I'm attempting to create an array that looks like this //mapping array var mapping = [ [ "[POSITION]" , $( ".position" ).val() ], [ "[NAME]" , $( ".name" ).val() ], [ "[TOWN/DISTRICT]" , $( ".town" ).val() ], [ "[REGION]" , $( ".region" ).val() ], [ "[COUNTRY]" , $( ".country" ).val() ], [ "[HOG/HOS]" , $( ".hoghos" ).val() ], [ "[TOURIST ATTRACTION]" , $( ".tourist" ).val() ], [ "[SECTOR1]" , $( ".sector1" ).val() ], [ "[SECTOR2]" , $( ".sector2" ).val() ], [ "[SECTOR3]" , $( ".sector3" ).val() ], [ "[PITCHER]" , $( ".pitcher" ).val() ] ]; out of a variable list here //vars var ie1 = "[POSITION]"; var ie2 = "[NAME]"; var ie3 = "[TOWN/DISTRICT]"; var ie4 = "[REGION]"; var ie5 = "[COUNTRY]"; var ie6 = "[HOG/HOS]"; var ie7 = "[TOURIST ATTRACTION]"; var ie8 = "[SECTOR1]"; var ie9 = "[SECTOR2]"; var ie10 = "[SECTOR3]"; var ie11 = "[PITCHER]"; I've been trying to push them in using this code var mapping = []; mapping.push({ ie1 : $( ".position" ).val() , ie2 : $( ".name" ).val() , ie3 : $( ".town" ).val() , ie4 : $( ".region" ).val() , ie5 : $( ".country" ).val() , ie6 : $( ".hoghos" ).val() , ie7 : $( ".tourist" ).val() , ie8 : $( ".sector1" ).val() , ie9 : $( ".sector2" ).val() , ie10 : $( ".sector3" ).val() , ie11 : $( ".pitcher" ).val() }); which will then update the text on a page using this $(".CYB").html(function(index,text){ for (var i = 0; i &lt; mapping.length; i++) { text = text.split(mapping[i][0]).join(mapping[i][1]); } return text; }); after this, the variables are updated with new values so that a page refresh isn't necessary //new vars var ie1 = $( ".position" ).val(); var ie2 = $( ".name" ).val(); var ie3 = $( ".town" ).val(); var ie4 = $( ".region" ).val(); var ie5 = $( ".country" ).val(); var ie6 = $( ".hoghos" ).val(); var ie7 = $( ".tourist" ).val(); var ie8 = $( ".sector1" ).val(); var ie9 = $( ".sector2" ).val(); var ie10 = $( ".sector3" ).val(); var ie11 = $( ".pitcher" ).val(); when I thro…
has comment: http://stackoverflow.com/comment/39093994
score: 2
type: AnsweredQuestion
downvote count: 0
possible better answer: http://stackoverflow.com/a/25116364
type: Question
has comment: http://stackoverflow.com/comment/39094577
upvote count: 2
has title: Populating a javascript array with variables before return
answer count: 2
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25121881
accepted answer: http://stackoverflow.com/a/25121881
has answer: http://stackoverflow.com/a/25116364

http://stackoverflow.com/q/25207333
has answer: http://stackoverflow.com/a/60259386
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/77455348
tagged with: sockets
score: 13
has answer: http://stackoverflow.com/a/27126800
has answer: http://stackoverflow.com/a/77448607
tagged with: node.js
upvote count: 13
has answer: http://stackoverflow.com/a/40192355
has body: I want to set up proxy for some XYZ server whose i am not the admin. Then i want to do some analysis over the request and response headers then also over request and response bodies. So i am using http-proxy https://github.com/nodejitsu/node-http-proxy this is what i am doing : var proxy = httpProxy.createProxyServer(); connect.createServer( connect.bodyParser(), require('connect-restreamer')(), function (req, res) { proxy.web(req, res, { target : 'XYZserver' }); } ).listen(config.listenPort); Upto GET request everything is fine but whenever a request with some body like POST, PATCH, PUT etc request are made i get the error : Error: socket hang up at createHangUpError (http.js:1472:15) at Socket.socketCloseListener (http.js:1522:23) at Socket.EventEmitter.emit (events.js:95:17) at TCP.close (net.js:466:12) I google a lot but found no clue whats wrong going on. I enable socket proxy with 'ws:true' option of 'proxy.web' but still the same error.
has title: socket hang up error with nodejs
linked to: http://stackoverflow.com/q/26632854
type: Question
has answer: http://stackoverflow.com/a/29481390
has answer: http://stackoverflow.com/a/25651651
tagged with: javascript
has answer: http://stackoverflow.com/a/39850524
tagged with: proxy
has answer: http://stackoverflow.com/a/77718325
downvote count: 0
favorite count: 0
answer count: 9

http://stackoverflow.com/comment/140127158
type: Comment
comment on: http://stackoverflow.com/a/25107623
type: AnswerComment
has text: See also https://stackoverflow.com/a/27773144/22062869
score: 0

http://stackoverflow.com/comment/39261413
has text: Its my understanding that $(document).ready is saying that everything has been loaded and the document is ready to be viewed. Wouldent that mean the image is loaded and the dimensions set, also seeing how the width is set why wouldent the height be set.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25209024

http://stackoverflow.com/a/25223932
upvote count: 2
has body: As you've discovered, the "update" selection includes all existing elements, ready to update, regardless of whether or not the data has actually changed. If you want to test to see if the new data is the same or different from the old data, you need a way to preserve the old data to compare with the new. Then you can use a selection filter to discard elements where the data is the same. I've discussed this issue previously on the d3 mailing list. This is the approach I came up with: selection = selection.property(" __oldData__", function(d){ return d; } ); //store the old data as a property of the node .data(newData); //over-write the default data property with new data selection.enter() /*etc*/; //handle new elements selection.filter( function(d) { //test whether the relevant properties of d match the equivalent in the oldData //also test whether the old data exists, to catch the entering elements! return ( (this.__oldData__ ) &amp;&amp; (d.value != this.__oldData__.value) ); }) .style("fill", "blue"); selection.property("__oldData__", null); //delete the old data once it's no longer needed You can of course use any name for the old data property, it's just convention to throw a lot of "_" characters around it to avoid messing up any of the browser's native DOM properties. You don't need to delete the oldData afterwards (it will just be over-written next time you update), but if you update infrequently it can save memory to explicitly release it. Be aware that selection.filter() does not preserve index values. If you need to keep track of i, you can either add an extra step to save the index before filtering as a separate property (of the element or of the data object), or you can skip the filter and just do the test directly in a function within the style/attr call. Edit: I've changed the filter function, relative to the linked discussion, so that it only includes updated elements, not new or updated elements. Either way, the filter selects the elements for which …
score: 2
has comment: http://stackoverflow.com/comment/82198086
has comment: http://stackoverflow.com/comment/39289626
has comment: http://stackoverflow.com/comment/39289334
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/82197945
has comment: http://stackoverflow.com/comment/39289645
answers question: http://stackoverflow.com/q/25222823
type: Answer
accepted answer of: http://stackoverflow.com/q/25222823

http://stackoverflow.com/a/25214721
has comment: http://stackoverflow.com/comment/39272411
answers question: http://stackoverflow.com/q/25214647
has comment: http://stackoverflow.com/comment/39279657
downvote count: 0
has comment: http://stackoverflow.com/comment/39272388
type: Answer
upvote count: 1
has body: You can do this with jQuery $( "#targetId" ).click(function() { alert( "Handler for .click() called." ); });
score: 1

http://stackoverflow.com/comment/39059153
has text: it shows number of paragraph elements .i have added a fiddle to the post
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25100353
score: 0

http://stackoverflow.com/comment/39184864
comment on: http://stackoverflow.com/q/25165767
score: 2
has text: What does the combined code that doesn't work look like?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25158753
answers question: http://stackoverflow.com/q/25158724
score: 0
type: Answer
has body: Change event would be fired only when that textbox value changes as wel as focus is getting blurred out from the particular text box,so in this context you have to use input $(function () { $('.color-iris').iris(); $('#color').on('input', function () { console.log($(this).val()); }) ; }); DEMO

http://stackoverflow.com/q/25126621
type: AnsweredQuestion
has body: I want to plot a graph with the following as the xaxis: var xaxis = [31.1,31.2,31.3,31.4,31.5, 32.1,32.2,32.3,32.4,32.5]; notice how there is a skip between 31.5 and 32.1. However, when I plot my line graph, there is a large space between these two points. Here's my code: $(document).ready(function(){ var cust1 = [[31.1,10],[31.2,15],[31.3,25],[31.4, 60],[31.5,95]]; var cust2 = [[31.1,0],[31.2,15],[31.3,30],[31.4, 50],[31.5,85]]; var data = []; data.push(cust1); data.push(cust2); var xaxis = [31.1,31.2,31.3,31.4,31.5, 32.1,32.2,32.3,32.4,32.5]; var plot3 = $.jqplot('line-chart', data, { title:'Design Progress', axes: { xaxis: { //renderer: $.jqplot.LineRenderer, label: 'Work Weeks', ticks: xaxis }, yaxis: { label: "Percent Complete", max: 100, min: 0 } } } ); }); I think it's because I'm not specifying a renderer option in my xaxis options. However, I've tried to use $.jqplot.LineRenderer and $.jqplot.CategoryAxisRenderer without any luck (I even set my xaxis values as strings but that didn't work). Anybody know what's going on? Here's a pic to further clarify:
tagged with: linegraph
tagged with: jqplot
has comment: http://stackoverflow.com/comment/39111548
has comment: http://stackoverflow.com/comment/39111383
has comment: http://stackoverflow.com/comment/39109645
has title: I can't get my line graph to plot correctly using jqplot
type: Question
has comment: http://stackoverflow.com/comment/39110084
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25127278
answer count: 1
has answer: http://stackoverflow.com/a/25127278
has comment: http://stackoverflow.com/comment/39110060

http://stackoverflow.com/comment/39014699
score: 0
type: AnswerComment
has text: I will use a jquery library for placeholder to get it work...thanks
type: Comment
comment on: http://stackoverflow.com/a/25076560

http://stackoverflow.com/comment/39071534
score: 0
comment on: http://stackoverflow.com/a/25104841
type: Comment
type: AnswerComment
has text: @Barmar Can you clarify: is this known as monkey patching? Hence, after these lines are run, does it mean that every line of code after these has $.fn.off redefined? In other words, no turning back?

http://stackoverflow.com/comment/39223766
type: AnswerComment
has text: But what happens when my sentence ends in "?!", "!!", "...", etc.?
type: Comment
comment on: http://stackoverflow.com/a/25188771
score: 1

http://stackoverflow.com/comment/39185252
comment on: http://stackoverflow.com/q/25168161
score: 0
type: Comment
type: QuestionComment
has text: I believe that the _jQuery selector_ `.mini img` is evaluated at run-time meaning that you're not really listening for all _load_ events that hit `document`

http://stackoverflow.com/a/25219154
has body: You can dynamically create script tags to fetch the extra JS as you need it: var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= 'somefile.js'; head.appendChild(script);
score: 1
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25219129

http://stackoverflow.com/comment/39221168
comment on: http://stackoverflow.com/a/25186946
score: 0
type: AnswerComment
type: Comment
has text: Ok I understand. The case I have is very special, I have no server code. Only a Web Service. I do this on purpose, but I will retain your advices for the future. So in my situation, AJAX is probably the best (no POSTING). Thanks for mentioning XSS, this is effectively someting difficult to understand when you are not aware of it!

owl-carousel
tags question: http://stackoverflow.com/q/25079495
tags question: http://stackoverflow.com/q/25154151
tags question: http://stackoverflow.com/q/25170714
tag name: owl-carousel
type: Tag

http://stackoverflow.com/q/25210083
has comment: http://stackoverflow.com/comment/39263251
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39263237
has comment: http://stackoverflow.com/comment/39263702
has answer: http://stackoverflow.com/a/25210157
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/39263234
has comment: http://stackoverflow.com/comment/39263280
has comment: http://stackoverflow.com/comment/39263474
tagged with: image
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/39263313
tagged with: jquery
tagged with: ajax
score: 0
has body: I am using this plugin: http://thomasjbradley.ca/lab/signature-to-image/ I've followed it properly and submit the JSON image code via AJAX and have it return echo imagepng(sigJsonToImage($_POST['image'])); I then console.log the result and it returns the below: �PNG IHDRSs3�\IDATx���y\T�����,���̰o�l"�"��⒙v��*mf��n��~�w�Y�歴4��5۬�7˭n���� ��#̰ �003s��1�ȫ��0�̜��/&lt;���h�5��9�˱X,�Rm����7t��s_}��es�\΍��d;�CNo~�S$���p&gt;��%��ڲ���]�MfjL�d����~��;: � 0���Z�f�����Uy����&lt;�����=��70�,Y���.�1�G�����h?�'��A���Cgxz��c� B���ѯ=��*A�P0`(_��5k�;P�t���e��i3��=�w{�G6�خ5���~uv�̓��`�P����z�������/W��qI�DpGP�[�pњ/r-2;%t��#]�����wseye{Ύ�B�S��^|�M�R����D����n��W8��Ҵ'f��=��zJ�nkZ��O^���8�����z�@c���}��ճ�|�������Ŋ�w~�v�F�&lt;���{e�ntOC����G����q��J��}�r�X�L�D0,P&gt;BQ������.��hr���L����g4�Wl=��T%!dՃ)/�!���`x��|eyj��gk�&lt;����=�I�D0�X]�W��8[�������Ԙ�a:����So��� &lt;#��|�}_�#�D����/scC���D�z#!���e�N�ǥ{z|w�b�7g�&lt;�g+gk�:tB�h$v�` 6��䥆[�X,d��)����z�.���*�����u�+�o��_�e2S�Lypr�p�Ng0Bܰ{;c��|J�n����ݽ��c�ڵzB�������`Q�4]=��Pute� ڐ�f����FB�W;�-�3��K����+�����_�a���tz !Bli��(EYVl=�s�!�G���sl���U]!�� �40+ʷ��s�OU�����{}�G��Ԛ�B��j`�/ߎ������;W��w��٭�v��j'c8x����V���C&gt;x.#%���tv�B��s8��� *TOnʶX����{Ǉ�2���@qw����i�mZ}�Vߦѷk�m�|Ѯї7tX�-9J:&amp;X�� �� `:�-_u��G6���1={o�3����`$�]������[���6�+��ZC?��r��rՎ�B���+�%����c�O��?��@��p߄�5�'�8 ��^��5�\l�ί=TpE���w�]��%HD�H`��K�"�D�H x�_/�+Z������M�ʚ~ȭ����I/�O���L��B�C��`������G��^3��?'��uyC��ME�=i�FJ��P����ڜ� ��z�[,����+s��z�捻�&gt;�[h�,c�%�/���0�����`|l�O'.6D�&lt;��1��������������d�n�Nbe��y0��������`I�ؠ�q����\���#XXռb����&gt;���0�C��h2/y����:/����2!6�|@)۾��[?nz=s�;q�lƸ��I�C� �?`2�)EY�ܔ��L����w���p_�'"��� �������A�GQ�&gt;&lt;�ͱ�g�7��I� �{�_ٸ|�^ӹ2��bE�%ťڶ��C{=���]�����d�QҔ(?ۿR����o������y���1+%��q~c��Q����%�bCΥ��eM�&amp;�z|X�gHaU��o���������-M��K��Zl�ʷ��s�|��ᐿ�0}^j�����+_�J�sQq���ԥƫ]=}�Gy����ce�1�|7�����/W��ʕg˔�˕M��=&gt;1��M��Z+�-���$pxv_��{/����C6/����Qt�s��-�Z�ϹԐs��x�B���w��K�+�/O�����܃�����T�շ����#�w���{K�!Rq��X&amp;q��Zpx�]�����׶���5��?w�X�ǹ�!)_}�vߙ�����kZ��u� �&a…
has comment: http://stackoverflow.com/comment/39263359
has comment: http://stackoverflow.com/comment/39263311
has title: jQuery/JS signature PNG image encoded?

http://stackoverflow.com/a/25136268
has body: The problem is with removing series - right now you remove only one or two series. Should remove all series: function setChart(name, categories, data, color, level, type) { chart.xAxis[0].setCategories(categories); var dataLen = data.length; while(chart.series.length &gt; 0) { chart.series[0].remove(); } for (var i = 0; i &lt; dataLen; i++) { chart.addSeries({ type: type, name: name, data: data[i], level: level, color: color || 'white' }); } } And demo: http://jsfiddle.net/NULTY/874/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39126120
answers question: http://stackoverflow.com/q/25134435
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25134435
upvote count: 1
downvote count: 0

http://stackoverflow.com/a/25224542
type: Answer
score: 0
has body: Sure, there are quite a few ways to do this. Really the best way would depend on a few things, such as your current set up, how you have defined your objects (in Kml or via the API), etc. In general possibly your best bet would be to use something like the GEarthExtensions utility library. The Util class contains the flyToObject method which... Flies to an object; if the object is a feature and has an explicitly defined abstract view, that view is used. Otherwise, attempts to calculate a bounds view of the object and flies to that (assuming options.boundsFallback is true). The main feature here being that the bounds calculations for the various types of geometry in the API are there for you. If you wanted to roll your own then you should definitely take a look at the code in the extension library as well as at the accessors in the API.
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25181877
answers question: http://stackoverflow.com/q/25181877

http://stackoverflow.com/comment/39020540
has text: tried it, still the same result.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25077991
type: Comment

http://stackoverflow.com/comment/39050294
type: QuestionComment
has text: @SmokeyPHP from a stylesheet
comment on: http://stackoverflow.com/q/25095703
score: 0
type: Comment

http://stackoverflow.com/a/25114766
type: Answer
has comment: http://stackoverflow.com/comment/39085866
has comment: http://stackoverflow.com/comment/39085930
score: 2
answers question: http://stackoverflow.com/q/25114654
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25114654
has comment: http://stackoverflow.com/comment/40193465
has comment: http://stackoverflow.com/comment/39204663
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39086027
has comment: http://stackoverflow.com/comment/39088278
has comment: http://stackoverflow.com/comment/39085762
has body: Consider a function that can be used to create a "reverse" a comparison function: function reverseCompare (fn) { return function (a, b) { // call original, reverse result return fn(a, b) * -1; // alternative as suggested by Alnitak, reverse arguments // return fn(b, a) } } In the basic form it can be used like so: userData.sort(compareUser); // ascending/normal userData.sort(reverseCompare(compareUser)); // descending/reversed Applied to the code, it might go something like this: var $t = $('.theadUser'); var sortedAsc = $t.hasClass('headerAsc'); if (!sortedAsc) { // not current sorted ascending, sort ascending userData.sort(compareUser); $t.removeClass('headerUnSorted headerDesc') .addClass('headerAsc'); } else { userData.sort(reverseCompare(compareUser)); $t.removeClass('headerUnSorted headerAsc') .addClass('headerDesc'); }

http://stackoverflow.com/a/25158679
type: Answer
has comment: http://stackoverflow.com/comment/39167385
score: 0
has body: see this. It says that - (dash) is a css selector so your .t-m means that it is sliding m element which is preceeds by .t class. Change the class name with only alphabets in it like this : .tm
answers question: http://stackoverflow.com/q/25157925

http://stackoverflow.com/q/25222300
tagged with: livereload
has body: I'm configuring my gulp.js gulpfile to watch my directory for file changes, and 1) reload my express server and 2) issue a livereload "change" event so that my browser (with the LiveReload chrome extension) will reload the page that I'm developing. Here's my gulpfile: var gulp = require('gulp') , nodemon = require('gulp-nodemon') , livereload = require('gulp-livereload'); gulp.task('startReloadServer', function() { livereload.listen(); }); gulp.task('demon', function () { nodemon({ script: 'server.js', ext: 'js html', env: { 'NODE_ENV': 'development' } }) .on('start', ['startReloadServer']) .on('restart', function () { console.log('restarted!'); livereload.changed(); }); }); gulp.task('default', ['demon']); Yet when I make a change to one of my view (.html) files, my browser reloads the page before the node server process has had an opportunity to come back online: How do I alter my gulpfile to have the livereload.changed() event be issued after nodemon is ready to receive requests?
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/29531687
downvote count: 0
has title: gulp-livereload reloading before server process finishes restarting
tagged with: javascript
score: 4
tagged with: nodemon
possible better answer: http://stackoverflow.com/a/27465362
tagged with: gulp
has answer: http://stackoverflow.com/a/27465362
favorite count: 0
accepted answer: http://stackoverflow.com/a/29531687
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/29217978

http://stackoverflow.com/comment/39260472
comment on: http://stackoverflow.com/q/25208481
score: 0
type: Comment
type: QuestionComment
has text: not entiery sure , that how the code was when i got it

http://stackoverflow.com/comment/39072142
has text: The goal is to update a running server app on demand. I think I'll go with getting a reference to the global `npm` via mscdex's answer, and then proceed with installing like you did. Also +1 for that global flag, I was wondering on how to set it as `npm.commands` didn't accept it.
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25107322

http://stackoverflow.com/comment/39091549
type: AnswerComment
has text: This makes it appear where it should be if the page was not scrolled down. It seems like it does not take into account the scrool.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25117824

http://stackoverflow.com/a/25095166
score: 0
answers question: http://stackoverflow.com/q/25095105
has body: Your first method was correct. It seems that you've just forgotten to quote the text:
type: Answer

http://stackoverflow.com/comment/118332572
type: Comment
score: 1
has text: moment is deprecated. even moment.js recommend to use another time libs as alternative.https://momentjs.com/docs/#/-project-status/
comment on: http://stackoverflow.com/a/38546692
type: AnswerComment

http://stackoverflow.com/a/25075291
answers question: http://stackoverflow.com/q/25074816
accepted answer of: http://stackoverflow.com/q/25074816
has comment: http://stackoverflow.com/comment/39013363
has comment: http://stackoverflow.com/comment/39013387
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39013764
has comment: http://stackoverflow.com/comment/39012021
type: Answer
has body: Showing the prototype object it's a normal practice. And with jQuery this is also reproduced. Just call console.dir($('div')) and you will see __proto__ object below. You can't hide prototype functions from console showing. That's how I implement classes with prototype extending in my library: Pinch.$ = function(selector, parent) { if (!(this instanceof arguments.callee)) { var callee = arguments.callee, newObject = Object.create(callee.prototype); callee.apply(newObject, callee.arguments); return newObject; } // --- logic --- return this; } Pinch.prototype = Object.create({ is: function() {}, // --- methods --- empty: function() {} }); And then if you want extend your prototype with new methods: Pinch.$.prototype = Pinch.Util.extend(Pinch.$.prototype, { newMethods: function() {} }, { oneMoreMethod: function() {} }); extend() realization you can find in many libraries and just googling "extend javascript" The second way it's using Object.create as extend: Pinch.$.prototype = Object.create(Pinch.$.prototype, { newMethods: function() {} }); But really, you can't hide prototype object from console. Only if you will start using hacks and tricks based on local scope and more. UPD: You can use Object.defineProperties() for hiding elements - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperties For example: var MF = function () {}; MF.prototype = Object.create({}); Object.defineProperties(MF.prototype, { thisWillShow: { value: function () {}, enumerable: true }, thisWillNotShow: { value: function () {}, enumerable: false } }); console.log(new MF()); And working example here - http://jsfiddle.net/uRVFW/
upvote count: 2

http://stackoverflow.com/comment/39357516
has text: @LarsKotthoff Yes, I have achieved dragging previously, but what I am looking for is that if I drag a bubble which is deep inside the cloud, the other bubbles should occupy the empty space created after dragging.
comment on: http://stackoverflow.com/q/25195823
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25140501
possible better answer: http://stackoverflow.com/a/25141021
has answer: http://stackoverflow.com/a/25141021
tagged with: node.js
has body: I got node.js working with jQuery and this plugin: http://simpleweatherjs.com/. Now I want to use the weather data for another service instead of putting it into the HTML, but I can't access/print the data. The error function works, the success function doesn't. var jsdom = require("jsdom"); jsdom.env({ html: '&lt;html&gt;&lt;body&gt;&lt;div id="weather"&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;', scripts: [ 'http://code.jquery.com/jquery-2.1.1.min.js', 'http://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.0.2/jquery.simpleWeather.min.js' ], done: function(errors, window) { var $ = window.jQuery; $.simpleWeather({ location: 'Paris', woeid: '615702', unit: 'c', success: function(weather) { console.log(weather.temp+'°'+weather.units.temp); }, error: function(error) { console.log(error.message); } }); } }); This is how it would look normally http://codepen.io/fleeting/pen/xwpar There's a node module for the plugin, too, but I don't know how to get it to work and there's no documentation.
upvote count: 1
tagged with: weather
has answer: http://stackoverflow.com/a/25141763
type: AnsweredQuestion
score: 1
tagged with: javascript
type: Question
answer count: 2
downvote count: 0
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25141763
favorite count: 0
tagged with: yahoo
has title: node.js: jQuery plugin for Yahoo weather doesn't print data

http://stackoverflow.com/a/25148867
answers question: http://stackoverflow.com/q/25148791
has comment: http://stackoverflow.com/comment/39197858
has comment: http://stackoverflow.com/comment/39227935
accepted answer of: http://stackoverflow.com/q/25148791
has comment: http://stackoverflow.com/comment/39149996
has comment: http://stackoverflow.com/comment/39151083
has body: You mean select by text? This should work: $("#DropDownList option:contains(" + 'Test2' + ")").attr('selected', true); Update: to deselect previously selected value, you can do: $("#DropDownList :selected").attr('selected', false);
score: 0
has comment: http://stackoverflow.com/comment/39261965
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/39226133
has comment: http://stackoverflow.com/comment/39262085
has comment: http://stackoverflow.com/comment/39150029

http://stackoverflow.com/comment/39149681
has text: For me it works perfectly too. The user said he works with the latest version of chrome on mac.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25148738
type: AnswerComment

http://stackoverflow.com/a/25214289
has comment: http://stackoverflow.com/comment/83336336
score: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25212439
upvote count: 2
has body: Ok, I found a partial solution, hope it helps someone in the future. It is not an elegant solution, so, if anyone has a better option, it will be welcomed. I included the text that has a "quoted" word inside a html hidden tag. python-django: text_with_quotes = 'this is a text and a word between "quotes"' html: &lt;p id = "new_text" class = "hidden"&gt; &lt;/p&gt; js: new_text = $("#new_text").text(); $("#text_p").text(new_text); it works. But there may be a better option using javascript and/or python.
type: Answer

http://stackoverflow.com/a/25081578
has body: check out these, and give a try. you may find them easy and compatible. http://christopheryee.ca/pushy/ http://www.aidanzealley.com/offcanvas/ http://www.berriart.com/sidr/ pure css solution http://css-tricks.com/off-canvas-menu-with-css-target/
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25078442
downvote count: 0
upvote count: 2

http://stackoverflow.com/comment/39276653
type: QuestionComment
has text: I disagree this is a duplicate, in mobile jQuery 1.5 when released 'activePage' will be removed. So using your solution is only temporary ? Please change your view.
comment on: http://stackoverflow.com/q/25216978
score: 0
type: Comment

plugins
tags question: http://stackoverflow.com/q/25190104
tags question: http://stackoverflow.com/q/25219472
tags question: http://stackoverflow.com/q/25077238
tags question: http://stackoverflow.com/q/25191791
tags question: http://stackoverflow.com/q/25141381
tags question: http://stackoverflow.com/q/25085188
tags question: http://stackoverflow.com/q/25098580
tags question: http://stackoverflow.com/q/25161088
tag name: plugins
tags question: http://stackoverflow.com/q/25201663
type: Tag
tags question: http://stackoverflow.com/q/25149760

http://stackoverflow.com/q/25118433
has comment: http://stackoverflow.com/comment/39094519
answer count: 0
type: Question
linked to: http://stackoverflow.com/q/5310609
tagged with: validation
tagged with: autocomplete
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/7633505
has comment: http://stackoverflow.com/comment/59113048
score: 0
has body: I am using a required field validator to validate an autocomplete dropdownlist. I am using jquery-ui. But the problem is it is not validating. The autocomplete code is copied from the jquery-ui website. My code is: jQuery: $(document).ready(function () { $("#&lt;%=ddlSelectClient.ClientID%&gt;").combobox(); }); Html: &lt;asp:DropDownList runat="server" ID="ddlSelectClient" AutoPostBack="false" CssClass="form-control"&gt;&lt;/asp:DropDownList&gt; &lt;asp:RequiredFieldValidator runat="server" InitialValue="-1" EnableViewState="false" ID="RequiredFieldValidator3" ControlToValidate="ddlParentProject" ErrorMessage="*" data-toggle="tooltip" data-placement="top" Title="Description Required" CssClass="text-danger" ClientIDMode="Static"&gt;&lt;/asp:RequiredFieldValidator&gt; How do I check If item initial value is -1
has title: How to make Validate Jquery Autocomplete combobox with asp requiredfieldvalidator?
tagged with: asp.net
has comment: http://stackoverflow.com/comment/39092697
type: UnansweredQuestion

http://stackoverflow.com/comment/39260220
type: QuestionComment
type: Comment
score: 2
comment on: http://stackoverflow.com/q/25208377
has text: You understanding of what Modernizer does is wrong – it is used for _feature detection_, but it does not add missing features. What you want, is called a “polyfill”.

http://stackoverflow.com/q/25124194
tagged with: kendo-ui
score: 0
has answer: http://stackoverflow.com/a/25124501
has body: I'm trying to use a href onclick event in kendo grid template. When I click on the link I need the alert to diplay path text but it gives "PDF undefined error". I think it could be an issue with escape quotes. ${PDF} returns a string value. template: "View"
type: UnansweredQuestion
type: Question
answer count: 2
tagged with: kendo-grid
has answer: http://stackoverflow.com/a/25124346
tagged with: javascript
tagged with: jquery
has title: Escape quotes in Javascript function

http://stackoverflow.com/comment/39293629
type: QuestionComment
has text: I didnt get the question
score: 0
comment on: http://stackoverflow.com/q/25226400
type: Comment

http://stackoverflow.com/q/25170688
has answer: http://stackoverflow.com/a/25170882
score: -4
has title: Make response based on "message"
has comment: http://stackoverflow.com/comment/39190321
has comment: http://stackoverflow.com/comment/39190551
has comment: http://stackoverflow.com/comment/39190423
type: Question
has comment: http://stackoverflow.com/comment/39190295
tagged with: javascript
has comment: http://stackoverflow.com/comment/39190451
has comment: http://stackoverflow.com/comment/39190405
has comment: http://stackoverflow.com/comment/39190634
downvote count: 4
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has body: i want to make a autoresponse for a chat, I do not know where to start. The form data is; {"channel":"#channel","message":"Hello","attributes":[{"type":"italic","start":0,"end":1},{"type":"color","start":0,"end":1,"color":128}],"token":"oausia9saUSiau98SsUASyuaysI","action":false,"request":"send"} So whenever someone writes Hello, i want to response as message Hello how are you ? i do not exactly know what language it must be written, and how should i code it to make the response ?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39190387
tagged with: php

http://stackoverflow.com/a/25174058
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25173559
type: Answer
answers question: http://stackoverflow.com/q/25173559
has body: You can use getAttribute clickedElement.getAttribute('fill')
score: 0

http://stackoverflow.com/comment/39207559
type: Comment
comment on: http://stackoverflow.com/a/25180478
has text: Don't feel stupid just because you got down voted. And for whoever down voted you, I'd tried my best to share my ideas anyways.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25112013
has answer: http://stackoverflow.com/a/25112070
has comment: http://stackoverflow.com/comment/39080774
upvote count: 0
linked to: http://stackoverflow.com/q/3536609
answer count: 1
tagged with: variables
favorite count: 0
linked to: http://stackoverflow.com/q/8191124
has comment: http://stackoverflow.com/comment/39080797
type: UnansweredQuestion
tagged with: php
tagged with: transfer
score: -5
has title: How to transfer JavaScript variables to PHP
has body: I've got a problem. I don't know how to transfer JS variables to PHP. In JS I've got my main script and I'm using PHP only to file management but I need some variables from JS.
type: Question
downvote count: 5
tagged with: javascript

http://stackoverflow.com/a/25209195
has body: Corrected Version var inputEl = document.getElementById("inputID"); unction myFunction() { if (inputEl.value === 'Hi') { alert("Hello"); } else { alert("Goodbye"); } } Which is pretty much what you had, except for few fixes and best practices: the variable name change (inputEl instead of 1 - see Valid Identifiers below) the strings in the alert statements (maybe they were variables, but we couldn't assert it from your snippet); the strict equality comparison; the missing semi-colons; Why It Didn't Work It doesn't work because of the 1 variable name being invalid. Then if it still doesn't work after that, then your HTML is wrong and the ID of your element isn't really inputID, Valid Identifiers if you try this in Chrome's console (or another JS environment) to replicate your variable declaration: var 1 = 'test'; You'll get a nice output similar to: SyntaxError: Unexpected number So, just changing your variable name should be enough, if there aren't any other issues. FYI, According to the Mozilla Developer Network, valid identifiers in JavaScript are: A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase). Starting with JavaScript 1.5, you can use ISO 8859-1 or Unicode letters such as å and ü in identifiers. You can also use the \uXXXX Unicode escape sequences as characters in identifiers. For a less digestable version, the full spec for identifiers is in the 5.1 Edition of the ECMA-262 standard in section 7.6
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39322799
answers question: http://stackoverflow.com/q/25209052
has comment: http://stackoverflow.com/comment/39302283
downvote count: 0

http://stackoverflow.com/q/25228854
tagged with: javascript
type: Question
has title: Node.js / Why async.eachSeries doesn't call the callback?
accepted answer: http://stackoverflow.com/a/25229296
tagged with: node.js
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25229296
possible better answer: http://stackoverflow.com/a/25228873
has body: I have the following code using eachSeries: var allLetters = ["1", "2", "3", "4"]; async.eachSeries(allLetters, function(arrObj, callback){ saveAllToS3(arrMain, arrObj); console.log("Reach here"); }, function (err){ console.log("callback is called"); if (err){ console.log(err); } else { console.log("Completed"); } }); I see that saveAllToS3 is execute only one time, and the callback is not called ("callback is called" is not printed, and also no error or "Completed" is printed). Only "Reach here" is printed. I want that saveAllToS3 will call 4 times. First, the function will be called with "0", after it finished, the function will be called with "1" and so on..
has answer: http://stackoverflow.com/a/25228873
has comment: http://stackoverflow.com/comment/39298483
type: AnsweredQuestion

http://stackoverflow.com/q/25085851
type: UnansweredQuestion
downvote count: 1
linked to: http://stackoverflow.com/q/5085567
type: Question
has comment: http://stackoverflow.com/comment/39033525
score: 0
has comment: http://stackoverflow.com/comment/39033321
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39033866
has comment: http://stackoverflow.com/comment/39033022
has comment: http://stackoverflow.com/comment/39033638
has comment: http://stackoverflow.com/comment/39033625
has title: Please help tweak javascript so it works with multiple drop down menus to show/hide table rows
has body: I am using a script to show and hide table rows based on selections from a drop down list. It works fine with only one drop down. When I add additional drop down menus, however, it shows the hidden rows, but it won't hide the previous selection. So you end up with everything being show at once unless you manually reset the list. I am using css display: none to hide the table rows as the default state. The site I'm working on uses quirks mode. JQuery is not an option. I would really appreciate some help. I have to think the script could be tweaked so it will look at all the select lists. Thank you, and sorry for being such a noob. Here's a fiddle: http://jsfiddle.net/matt_f/e58hk/ Here is the script: function Cng(obj){ var opts=obj.options; for (var z0=0;z0&lt;opts.length;z0++){ if (document.getElementById(opts[z0].value)){ document.getElementById(opts[z0].value).style.display=opts[z0].selected?'table-row':'none'; } } } Here is my html: &lt;select class=evidencemenu onchange="Cng(this);" &gt; &lt;option value="" &gt;Please select&lt;/option&gt; &lt;!--USE THIS OPTION FOR TESTING --&gt; &lt;option value="grade3art" &gt;Grades 3-5 Art&lt;/option&gt; &lt;/select&gt; &lt;select class=evidencemenu onchange="Cng(this);" &gt; &lt;option value="" &gt;Please select&lt;/option&gt; &lt;!--USE THIS OPTION FOR TESTING --&gt; &lt;option value="grade6ela" &gt;Grades 6-8 ELA&lt;/option&gt; &lt;/select&gt; &lt;select class=evidencemenu onchange="Cng(this);" &gt; &lt;!--Do not use these for testing --&gt; &lt;option value="" &gt;Please select&lt;/option&gt; &lt;option value="grade9ela" &gt;Grades 9-12 ELA&lt;/option&gt; &lt;option value="grade9math" &gt;Grades 9-12 Math&lt;/option&gt; &lt;option value="grade9art" &gt;Grades 9-12 Art&lt;/option&gt; &lt;/select&gt; &lt;TABLE width="960" border="1" cellspacing="0" cellpadding="5" summary="Domain 1, Indicator 1a"&gt; &lt;CAPTION&gt; This is the table caption. &lt;/CAPTION&gt; &lt;TR&gt; &lt;TH scope="col"&gt;&amp;nbsp;&lt;/TH&gt; &lt;TH s…
has comment: http://stackoverflow.com/comment/39033689
has answer: http://stackoverflow.com/a/25086994

http://stackoverflow.com/comment/39255502
type: QuestionComment
has text: It's due to your HTML not having name properties. Take a look at the sample I made below.
comment on: http://stackoverflow.com/q/25205619
score: 0
type: Comment

http://stackoverflow.com/q/25159432
accepted answer: http://stackoverflow.com/a/25159534
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39168268
type: Question
has title: Render MVC View Section From Jquery
answer count: 1
has body: Here is my MVC View section: @section popups{ Product Test } I want to call it from JavaScript file (only this section).How can i do that?
has answer: http://stackoverflow.com/a/25159534
score: 0
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/135949697
has text: I think this should really be the accepted answer. The main point, as you say, is that 'You can only send one HTTP response for one HTTP request.' I think the questioner is asking for something like streaming, rather than the ability to `write()` repeatedly before calling `send()`.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25209269

http://stackoverflow.com/comment/39228520
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25189005
has text: No, looking through JUMflot's source code I don't see any *easy* way to implement this. JUMflot essentially introduces three new plot events: `plotdown` (mouse down on point), `plotup` (mouse up after down on point) and `datadrop` (after drag on point). What you need is a `datadrag` event. It would be possible to implement this based on JUMflot, but it's non-trivial. If I get a chance over the next day or so, I'll code something up but I'd probably roll-my-one instead of relying on JUMflot.

http://stackoverflow.com/q/25197571
linked to: http://stackoverflow.com/q/14867558
has answer: http://stackoverflow.com/a/25197655
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
tagged with: ajax
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25197671
has title: HTML Tag with both href and onclick and AJAX Request
upvote count: 1
tagged with: perl
has body: I want to have both href and onclick working and I found a solution here: HTML tag want to add both href and onclick working In myFunction, I make an AJAX Request calling a perl component. It works fine when I put the Javascript call in href, but not when in onclick. Unfortunately, I'm not allowed this solution neither jQuery, so can you please help. // AJAX Request doesn't work Item // AJAX Request ok Item perl.m: <%init> warn "perl.m"; ... update ... </%init>
accepted answer: http://stackoverflow.com/a/25197671
possible better answer: http://stackoverflow.com/a/25197655
tagged with: tags
tagged with: javascript

http://stackoverflow.com/q/25082764
has body: I am looking to create events in Javascript using the same methodology as JQuery- Does anyone know how JQuery does it? My reasoning is that using raw Javascript such this: var myEvent = new CustomEvent("userLogin", eventProperties); ...does not actually work on Android native browser, as it does not support DOM Level 3 like Chrome and other browsers do. However, JQuery does work on Android's stock browser, and simply uses: $.event.trigger('MyEvent'); My question is, what is the code behind this? I tried to find it by going through JQuery's source code, but cannot get my head around it!
has title: How does JQuery create it's Custom Events and can I recreate in Javascript?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25082840
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: custom-events
upvote count: 1
answer count: 1
downvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25082840
tagged with: android-browser

http://stackoverflow.com/q/25173564
has answer: http://stackoverflow.com/a/25173605
accepted answer: http://stackoverflow.com/a/25173657
score: 0
has body: so I am looking to get an specific numerical value using Javascript and regular expressions from a string like this: *#13**67*value## So from *#13**67*2## *#13**67*124## *#13**67*1## I need to get 2, 124 and 1. Any help will be really appreciated. Thanks!
favorite count: 0
has title: Javascript - Regular expression for getting a number inside a alphanumerical string?
upvote count: 1
tagged with: regex
answer count: 4
has comment: http://stackoverflow.com/comment/39195861
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25173657
has answer: http://stackoverflow.com/a/25173602
downvote count: 1
has comment: http://stackoverflow.com/comment/39195626
type: Question
possible better answer: http://stackoverflow.com/a/25173605
tagged with: javascript
has answer: http://stackoverflow.com/a/25173831

http://stackoverflow.com/q/25167283
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: sqlite
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/25514284
has title: using javascript, angular.js, and sql.js, how do I get a file object from a url?
has body: I'm getting the URL to a sqlite db file on my server from the browser url using query string. So in the app I have the file url. Then I'm calling an angular $http.get function on that url. This gives me the data in the file, but the library I'm using to read the data requires a file object. Is there a way to create a file object from the paramiters inside $http.get? The parameters are data, status, headers, and config, I also have the file name. I've tried constructing a blob but I keep getting an error saying "the database disk image is malformed." Here is the blob construction Inside the $http.get function: ... var blob = []; var blob2 = {fileName:null}; $http.get(fileName). success(function (data, status, headers, config) { blob[0] = data; var theBlob = new Blob(blob, {name:fileName},{status:status},{headers:headers},{config:config}, {type : ''}); var r = new FileReader(); r.onload = function () { var Uints = new Uint8Array(r.result); db = new SQL.Database(Uints); ... I've also tried building the blob by adding the $http.get data, status, headers, and config parts as more parts of the blob[] array, and passing that to the new Blob constructor... Any help would be really appreciated, thanks!
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39184060
accepted answer: http://stackoverflow.com/a/25514284

http://stackoverflow.com/comment/40944371
type: AnswerComment
comment on: http://stackoverflow.com/a/25179198
score: 0
has text: Hey, I appreciate you putting this information here. I am having an issue with the desktopCapture over RTCPeerConnection. Would you mind taking a look at [my question?](http://stackoverflow.com/q/26111693/1375316)
type: Comment

http://stackoverflow.com/comment/39135429
type: AnswerComment
score: 0
type: Comment
has text: @NathanCooper: yes, that's why I noted that it "ignores functions and breaks on differently ordered fields"
comment on: http://stackoverflow.com/a/25132334

http://stackoverflow.com/a/25153770
downvote count: 0
has comment: http://stackoverflow.com/comment/39172964
has comment: http://stackoverflow.com/comment/39200400
answers question: http://stackoverflow.com/q/25145668
has comment: http://stackoverflow.com/comment/39172648
upvote count: 2
has body: The problem is that you add to $('.button').click event ONLY after a product has been added to the cart (at least from the code above). I would personally create a function that creates that event for that button. Your code will become: function bindButtonClick() { $('.button').off('click').click(function () { adt = $(this); var cart = $('#cart'); var imgtodrag = $(adt).parent().siblings(".image").find("img").eq(0); if (imgtodrag) { i = i + 30; var imgclone = imgtodrag.clone() .offset({ top: imgtodrag.offset().top, left: imgtodrag.offset().left }) .css({ 'opacity': '0.5', 'position': 'absolute', 'height': '150px', 'width': '150px', 'z-index': '100' }) .appendTo($('body')) .animate({ 'top': cart.offset().top + 10, 'left': cart.offset().left + i , 'width': 75, 'height': 75 }, 1000, 'easeInOutExpo'); imgclone.animate({ 'width': 15, 'height': 15 }, function () { $(this).detach() }); } }); } function addToCart(product_id, quantity) { quantity = typeof(quantity) != 'undefined' ? quantity : 1; i = 10; $.ajax({ url: 'index.php?route=checkout/cart/add', type: 'post', data: 'product_id=' + product_id + '&amp;quantity=' + quantity, dataType: 'json', success: function(json) { $('.success, .warning, .attention, .information, .error').remove(); if (json['redirect']) { location = json['redirect']; } if (json['success']) { bindButtonClick(); $('.success').fadeIn('slow'); $('#cart-total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); } Now, the function bindButtonClick has to be called on domready $(function(){ bindButtonClick(); }); Also, note the $('.button').off('click') which unbinds your previous click, so that it doesn't get triggered multiple times. Notes: - instead of alert, try to learn your browser's developer tool, use console.log instead (Firebug in Firefox and Chrome Developer Tools in Google Chrome). You will not have the nagging alert and you can see in console all your javascript errors.
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39195536

http://stackoverflow.com/q/25149450
type: Question
has title: Backbone Undefined is not a function
accepted answer: http://stackoverflow.com/a/25149568
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: jquery
has body: I have a really simple backbone app, that returns: undefined is not a function in the console. Everything seems to be defined appropriately. Any idea what the issue could be? js: $(function () { var myModel = Backbone.Model.extend({}); var myCollection = Backbone.Collection.extend({ doStuff: function () { alert("doing Stuff"); }, doOtherStuff: function () { alert("doing other stuff"); } }); var myCollectionView = Backbone.View.extend({ template: " Trigger ", initialize: function () { this.listenTo(this.collection, 'sync', this.collection.doStuff); this.listenTo(this.collection, 'sync', this.collection.doOtherStuff); this.render(); }, events: { "click #trigger": "trigger" }, render: function () { $("#app").html(this.template); }, trigger: function () { alert("triggering"); $(this).trigger("sync"); } }); var mymodel = new myModel({}); var mycollection = new myCollection({ model: mymodel }); var mycollectionview = new myCollectionView({ collection: mycollection }); }); Reproduced in a fiddle: http://jsfiddle.net/5C238/1/
favorite count: 0
tagged with: backbone.js
score: -2
has answer: http://stackoverflow.com/a/25149568
type: AnsweredQuestion
downvote count: 2
has comment: http://stackoverflow.com/comment/41654819

http://stackoverflow.com/comment/39307863
type: QuestionComment
has text: any update of this Question
score: 0
comment on: http://stackoverflow.com/q/25229368
type: Comment

http://stackoverflow.com/comment/39109026
type: Comment
type: QuestionComment
has text: are you doing batch inserts into the DB or one by one? Which DB and driver are you using - I'm just curious
score: 1
comment on: http://stackoverflow.com/q/25126887

http://stackoverflow.com/q/25093338
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39046085
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am new to javascript and webtechnology. I have a requirement, where I have to change the lang attribute of &lt;html lang="en-US"&gt; in webpage numbers of time, and then reload the page. I have designed an chrome-extension that changes lang attribute of current tab page, it is working well, but it doesn't fetches the correct Resource files as per the locale changed. It only changes lang of page in cache. I want to know, is there any way I can basically load the page with different lang code without actually changing the source code manually ? Can we pass a javascript like document.documentElement.lang="ab-CD" as webRequest and then load the page Please help..
has title: Is there any way we can change an attribute value in DOM and load page again
downvote count: 0
score: 1
tagged with: dom
type: Question
has answer: http://stackoverflow.com/a/25093359
tagged with: javascript
tagged with: jquery
tagged with: google-chrome-extension
upvote count: 1

http://stackoverflow.com/q/25071715
has answer: http://stackoverflow.com/a/25071810
favorite count: 0
has answer: http://stackoverflow.com/a/25071826
possible better answer: http://stackoverflow.com/a/25071810
has comment: http://stackoverflow.com/comment/39005599
has title: jQuery: display web page only after document.ready
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25071826
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39005910
tagged with: javascript
tagged with: jquery
score: -1
tagged with: ajax
has comment: http://stackoverflow.com/comment/39006119
answer count: 2
upvote count: 0
has body: When I load a web page inside document.ready I invoke an Ajax function: $(document).ready(function () { callAjaxFunction(); }); The effect is that the web page is first displayed with empty fields, and after the Ajax functions finishes the fields are populated. How to show the web page only after the Ajax function returns (show fields populated at once)?

http://stackoverflow.com/q/25157011
has comment: http://stackoverflow.com/comment/39169273
score: 0
tagged with: javascript
has title: update scope in directive after async call
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39171206
has comment: http://stackoverflow.com/comment/39165982
has comment: http://stackoverflow.com/comment/39180777
answer count: 0
type: UnansweredQuestion
type: Question
tagged with: angularjs-directive
has body: I have a directive used to simulate a loading pane: var loadingModule = angular.module('loading', []); loadingModule.constant('MODULE_VERSION', '1.0.0'); loadingModule.factory('LoadingAPI', function () { return { loading: null, success: null, error: null, errorMessage: null, working: null, countdown: null, redirecturl: null, displayError: function (errorString) { if (errorString != null && errorString.length > 0) { this.errorMessage = errorString; } else { this.errorMessage = "An error occured, please contact your system administrator"; } this.working = true; this.loading = false; this.error = true; this.success = false; }, hideLoading: function () { this.loading = false; this.success = false; this.error = false; }, displayLoading: function () { this.working = true; this.loading = true; this.error = false; this.success = false; }, displaySuccessAndRedirect: function (successString, redirectUrl, seconds) { this.successMessage = successString; this.working = true; this.loading = false; this.error = false; this.success = true; this.countdown = seconds; //setTimeout(function () { // window.location = redirectUrl; //}, seconds*1000); } } }); loadingModule.directive("loadingpane", function () { return { restrict: 'E', scope: {}, replace: true, controller: function ($scope, LoadingAPI) { $scope.api = LoadingAPI; }, template: ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' Loading' + ' ' + ' ' + ' {{api.errorMessage}}' + ' ' + ' ' + ' ' + ' {{ api.successMessage }}' + ' ' + ' ' + ' You will be redirected in {{ api.countdown }} seconds' + ' ' + ' ' + ' ' + ' ' + ' ' } }); This is working fine. But now I want to use an external js library which is making asynchronous calls. Problem is, if i use the API in the callback, the scope of the directive is not updated: // the following code is executed after a click on a buttion, this Method use a 3rd party library which does async call and then call the callback function // in the callback, my directive is not update. Outside the …
has comment: http://stackoverflow.com/comment/39164539

http://stackoverflow.com/comment/39086787
score: 0
type: AnswerComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58598/discussion-between-benjamin-and-youness).
comment on: http://stackoverflow.com/a/25114819
type: Comment

http://stackoverflow.com/a/25076036
type: AcceptedAnswer
type: Answer
downvote count: 0
has body: Are you setting your marker? Because on click function, it expects "marker" as an argument. You need to set your marker variable above your click event listener. Let me write my solution for these kind of custom maps, maype it helps: /* 1 - SET OPTIONS AND STYLES */ var mapId = "mapId"; var latitude = 40.986809; var longitude = 29.021807; var mapName = "Your Map Name"; var zoomLevel = 16; var iconUrl = 'http://path/to/googleMaps/logo.png'; var scrollable = false; var disableDefaultUI = false; var draggableMarker = false; var marker; var map; var contentString = ' '+ ' '+ ' '+ ' Lorem ipsum '+ ' '+ ' Lorem ipsum, dolor sit amet'+ ' '+ ' '+ ' '; var styles = [ //Custom Styles ]; /* 2 - INITIALIZE THE MAP WITH YOUR OPTIONS ABOVE */ function initialize() { var mapOptions = { zoom: zoomLevel, scrollwheel: scrollable, center: new google.maps.LatLng(latitude,longitude), mapTypeControlOptions: { mapTypeIds: [mapName] }, disableDefaultUI: disableDefaultUI, panControl: false, zoomControl: true, scaleControl: true }; var div = document.getElementById(mapId); var map = new google.maps.Map(div, mapOptions); var styledMapType = new google.maps.StyledMapType(styles, { name: mapName }); map.mapTypes.set(mapName, styledMapType); map.setOptions({styles: styles}); /***************** MARKER *********************************/ marker = new google.maps.Marker({ map:map, draggable:draggableMarker, icon: iconUrl, animation: google.maps.Animation.DROP, position: new google.maps.LatLng(latitude,longitude) }); /***************** INFO WINDOW *********************************/ var infowindow = new google.maps.InfoWindow({ content: contentString }); /*If you initialize infowindow on window load*/ infowindow.open(map,marker); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } google.maps.event.addDomListener(window, 'load', initialize); Hope this helps
accepted answer of: http://stackoverflow.com/q/25074808
score: 1
answers question: http://stackoverflow.com/q/25074808
upvote count: 1

http://stackoverflow.com/q/25199427
tagged with: javascript
score: 0
tagged with: meteor
has answer: http://stackoverflow.com/a/25199710
type: UnansweredQuestion
has title: App has errors. "Unexpected token ." Trying to add a delete button
type: Question
tagged with: mongodb
has body: I've been following a guide by George Mcknight for creating a database app with Meteor JS. I've got everything working, but now I want to add a delete button to delete entries. To do this, I followed a comment in the video on how to add it. But I stumble upon an error "Unexpected token ." Inside "(Meteor.isClient)" I've entered Template.main.events({ 'click .remove': function(){ Todl.remove({this._id}); } }); And the html/template: {{#each todl}} {{make}} {{model}} {{brand}} X {{/each}} I can't see why why the "." in "Todl.remove" would crash it?
answer count: 1

http://stackoverflow.com/a/25219963
answers question: http://stackoverflow.com/q/25219926
type: Answer
has comment: http://stackoverflow.com/comment/39281830
upvote count: 3
score: 3
has body: getValue returns correctly, so I assume your problem is that testFunction returns undefined. It is because you didn't specify it what to return, you only told it to print something on the console. If you also want it to return something, add a return statement to it. function testFunction(){ var newValue = getValue(); console.log(newValue); return newValue; }
downvote count: 0
has comment: http://stackoverflow.com/comment/39281839

http://stackoverflow.com/comment/39077450
type: QuestionComment
has text: Also to note in addition to @epascarello's answer http://stackoverflow.com/questions/3248384/document-createelementscript-synchronously so perhaps you can include the scripts either as tags in the original HTML or set an `onload` to make sure the code is only executed when jQuery has loaded. Also is there a specific reason you are loading 2 separate versions of jQiery? The latest one should be fine unless you have a specific plugin that depends on the earlier version. Also include the other `append` calls in this `onload` callback as otherwise they are liable to fail and cause errors too.
score: 0
comment on: http://stackoverflow.com/q/25110142
type: Comment

http://stackoverflow.com/q/25151098
has comment: http://stackoverflow.com/comment/39153992
score: 0
tagged with: forms
has body: I have been attempting to create a form with 5 text boxes, 1 drop down and a text area. My intention is simple; select an option from the Drop down( except the first i.e "--Select--"), enter the contents into the text box and text area. Once I click submit all the above entered information should get appended to specific links that is hard coded into each drop down option. My challenge here is that when I click submit, the controls are no getting passed to the new form i.e. the desired page opens,but the form fields do not get entered. I have cross verified and confirmed that the ids are correct.. I'm guessing that i have made a mistake in the validation. Kindly point out my mistake.. Javascript Code &lt;script type="text/javascript"&gt; function dpdown(form) { var a="&amp;name="+document.getElementById('name').value; //textbox var b="&amp;job_id="+document.getElementById('job_id').value;//textbox var c="&amp;major"+document.getElementById("major').value;//textbox var d="&amp;native="+document.getElementById('native').value;//textbox var e="&amp;age="+document.getElementById('age').value;//textbox var f="&amp;details="+encodeURIComponent(document.getElementById('details').value);//textarea var i, counter = 0; var ddl = document.getElementById("jobs");//dropdown var selectedValue = ddl.options[ddl.selectedIndex].value; for(var i=0; i &lt; obj.options.length; i++) { if(obj.options[i].selected) // to check if the person has chosen a suitable degree if (selectedValue == "selectdegree") { alert("Please select your correct degree"); } else { ++counter; window.open('https://'+form.elements[i].value+a+b+c+d+e+f,'_blank'); // when the submit button is clicked, all the above fields should get appended to a preset link which has been hardcoded for each degree. } } } function cleartext()// to clear the form (works correctly) { document.form.details.value=''; } HTML Code &lt;form onsubmit="dpdown(this); return false;"&gt; // at the beginning of the form ' ' ' ' &lt;input type="s…
tagged with: javascript
has answer: http://stackoverflow.com/a/25151446
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
has title: Javascript/ HTML Transferring form Controls to submit
tagged with: submit
has comment: http://stackoverflow.com/comment/39154010
type: Question
answer count: 1
accepted answer: http://stackoverflow.com/a/25151446

http://stackoverflow.com/comment/39225070
comment on: http://stackoverflow.com/q/25189394
has text: You don't often see a constructor setting up its own prototype. It's usually done outside the constructor.
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25184936
has answer: http://stackoverflow.com/a/25184987
answer count: 4
has answer: http://stackoverflow.com/a/25185005
type: Question
has answer: http://stackoverflow.com/a/25184983
has body: Why is the following script returning false ? var a = new RegExp("/^[A-Za-z]+[A-Za-z\s]+$/"); var b = "software engineer"; var c = "software.engineer"; var bool = a.test(b); document.write(bool); This is what i understand of the reg exp : string could start with alphabet that could occur one or more than one time and end with space or alphabet that could occur one or more than one time. In that case it should return true !
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25184971
has title: Why am i getting false while testing reg exp?
type: UnansweredQuestion
tagged with: regex

http://stackoverflow.com/comment/39180179
type: Comment
comment on: http://stackoverflow.com/a/25147312
has text: @Trxplz0 Sounds like the problem is elsewhere in your codes. Can you update your post with your complete js codes? I think you omitted some details. If they are a lot, you can email them to me at ihcsim at gmail.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25191494
tagged with: node.js
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/8131344
score: 1
possible better answer: http://stackoverflow.com/a/25191669
type: Question
has answer: http://stackoverflow.com/a/25191669
answer count: 2
has comment: http://stackoverflow.com/comment/39228651
downvote count: 0
has comment: http://stackoverflow.com/comment/39228709
tagged with: javascript
has answer: http://stackoverflow.com/a/25191641
tagged with: require
has comment: http://stackoverflow.com/comment/39231149
has title: Node require path reference issue
favorite count: 0
has body: I am using node to run some JS tasks. I am using node require to include other needed files that I have written. The files I am trying to include exist in the same directory. There is nothing special about these files; just plain old JavaScript. I am not serving the content to a browser or anything. I am just trying to run JS logic. My directory structure: root exercises ex1 FileLoader.js FileOne.js In my FileLoader.js I ran each one of these file path patterns by itself. They are in the order of my attempts. require('./exercises/ex1/FileOne.js'); // Attempt 1 path require('FileOne.js'); // Attempt 2 path require('/exercises/ex1/FileOne.js'); // Attempt 3 path require('../../exercises/ex1/FileOne.js'); // Attempt 4 path Terminal Command: node ./exercises/ex1/ex1.js Outcomes: Attempt 1 - Error: Cannot find module './exercises/ex1/FileOne.js' Attempt 2 - Error: Cannot find module 'FileOne.js' Attempt 3 - Error: Cannot find module '/exercises/ex1/FileOne.js' Attempt 4 - It worked even though I did not expect to.... FML So the last one worked but the path needed is pretty silly. It seems like my app does not have a concept of the root. I assumed that node thought my root was ex1. But then I would expect attempt 2 to work. I feel like I am overlooking something stupid. Question: What is the correct way to use file paths with require? Is there a way to set a root directory with node? Thank you, Jordan
upvote count: 1
accepted answer: http://stackoverflow.com/a/25191641

http://stackoverflow.com/q/25096042
favorite count: 0
has title: View Transitions in Backbone
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25103218
score: -2
has body: I'm building a mobile app with Backbone.js and ratchet. Routers use the method for changing view. Now I want to add an animation when you switch from one view to another. I'm trying this code, you can give me a hand. EDIT: I would like to add the classic animation that ottine to change the page on iPhone. I tried to do it this way: View: var SettingsView = Backbone.View.extend({ tagName: "section", className: "pt", initialize: function(){ }, render: function(){ var template = _.template($('#settingsview-template').html(),{}); this.$el.html(template); return this; }, getAnimEndEventName: function(){ var animEndEventNames = { 'WebkitAnimation' : 'webkitAnimationEnd', 'OAnimation' : 'oAnimationEnd', 'msAnimation' : 'MSAnimationEnd', 'animation' : 'animationend' }; return animEndEventNames[ Modernizr.prefixed( 'animation' ) ]; }, open: function(){ var _this = this; this.$el.addClass("animated bounceInLeft"); }, close: function(){ var _this = this; this.$el.addClass("animated bounceOutLeft").on(this.AnimEndEventName, function(){ _this.removeClass("animated bounceInLeft, animated bounceOutLeft"); }); } }); routes: settingsViewPage: function(){ var view = new SettingsView(); $(".container").html(view.render().el); this.currentView.close(); view.open(); this.currentView = view; }, I get the error from the console: Uncaught TypeError: Cannot read property 'close' of undefined
type: Question
answer count: 2
tagged with: mobile
upvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25096789
tagged with: css

http://stackoverflow.com/a/25134559
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25126388
has comment: http://stackoverflow.com/comment/39172610
has body: you are almost there to be honest! You just missed out your lineFunction. Here is an example on jsfiddle for you: http://jsfiddle.net/wd6r5/ //Create dataset var dataset = []; for(var i = 0; i &lt; 7; i++) { x = 50 * i; // record[i].getElementsByTagName("date")[0].childNodes[0].nodeValue; y = 50 * i + 10; //y + 1; var newArray = [x, y]; dataset.push(newArray); } var lineFunction = d3.svg.line() .x(function(d) { return d[0]; }) .y(function(d) { return d[1]; }) .interpolate("linear"); d3.select("svg") .append("path") .attr("stroke", "#333") .attr("stroke-width", 1.2) .attr("d", lineFunction(dataset));

http://stackoverflow.com/a/25216727
score: 0
has body: You need to render the colorbox in an element on the page: Click here
type: Answer
answers question: http://stackoverflow.com/q/25216672
has comment: http://stackoverflow.com/comment/39284511

http://stackoverflow.com/comment/39088540
score: 0
has text: ``crossdomain:true`` and ``dataType:jsonp``
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25116176

http://stackoverflow.com/a/26612495
answers question: http://stackoverflow.com/q/25215945
has body: I found out the solution. I was using url rewriting so. Just came to me when I was going through my code
score: 0
type: Answer

http://stackoverflow.com/comment/39254180
has text: `clearInterval` accept a parameter, your first call to this function does not provides one. Don't forget to use `var` keyword to declare variable (for `i` and `counting`). Also, you can use JSHint (http://www.jshint.com/) to detect potentials errors in your code
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25205301
score: 1

http://stackoverflow.com/q/25114566
has answer: http://stackoverflow.com/a/25114704
accepted answer: http://stackoverflow.com/a/25114704
has title: How to add-class and focus the children on keydown function
tagged with: css
possible better answer: http://stackoverflow.com/a/25114669
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25114669
score: 0
has answer: http://stackoverflow.com/a/25114694
linked to: http://stackoverflow.com/q/9864634
has answer: http://stackoverflow.com/a/25114819
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has body: MARKUP Text 1 Text 2 Text 3 Text 4 Text 5 Text 6 Text 7 Text 8 Text 9 Text 10 Text 11 Text 12 CSS .focus{ height:60px; list-style-type:none; overflow:auto; } .focus li a { } .focus li.active{ background:#f6f6f6; } JQUERY $( ".focus" ).keydown(function() { if ( KeyCode == 40 ) { $(this).next(li).addClass('active').children(a).focus(); }); For the this markup i need to add a class active to the children li when a down arrow is pressed and the active li needs to get focused. I dont how to break the codes further can anyone explain. Thanks in advance. DEMO

http://stackoverflow.com/a/34337273
score: 1
has body: This simple stylesheet worked for me: i.mce-i-[FONT-AWESOME-CLASSNAME]:before { // FONT-AWESOME-CLASSNAME e.g. "icon-youtube" content: [FONT-AWESOME-CONTENT]; // FONT-AWESOME-CONTENT e.g. "\f166" font-family: FontAwesome; } It can be used for a toolbar button or menu item equally well. ed.addButton('youtube', { title: 'Add Video' , icon: '[FONT-AWESOME-CLASSNAME]', onclick: function () { /* magic */ } } ed.addMenuItem('youtube', { text: 'Add Video' , icon: '[FONT-AWESOME-CLASSNAME]', onclick: function () { /* magic */ }, context: 'view' } Do not use position: absolute because layout in menu will be spoiled.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25191791
downvote count: 0

http://stackoverflow.com/a/40722651
type: Answer
has comment: http://stackoverflow.com/comment/80433759
score: 6
upvote count: 6
answers question: http://stackoverflow.com/q/25070144
downvote count: 0
has body: I was just playing with this 'feature' of Bootstrap modals. Seems the .modal class has overflow-y:auto; So the modal wrapper gets his own scrollbar when the modal itself becomes to high. If you always want a scrollbar (designers often do) First set the body body { overflow-y:scroll; } Then handle .modal-open .modal-open .modal { overflow-y:scroll; /* Force a navbar on .modal */ } .modal-open .topnavbar-wrapper { padding-right:17px; /* Noticed that right aligned navbar content got overlapped by the .modal scrollbar */ } Leave scrollbar disabling on body untouched in this case All other answers on this page kept making my content jump. Heads up! Allthough this solution worked for me all the time, yesterday I had a problem using this fix when the modal is draggable and to large to fit the screen (vertically). It might have something to do with position:sticky elements I added?

http://stackoverflow.com/q/25210786
possible better answer: http://stackoverflow.com/a/25210926
has answer: http://stackoverflow.com/a/25210926
has answer: http://stackoverflow.com/a/25210888
tagged with: arrays
downvote count: 0
has answer: http://stackoverflow.com/a/25211461
has body: Using JavaScript, I have an array of file paths that I'm looping through and checking. If the current item is a folder, I want to bump it to the back of the line and move on to the next item. The end result would be files in front, folders after the last file. I know this should be easy, but I've been fighting with it for 2 days. I've tried various versions of the following code with no success. For the purpose of this project, I'm assuming it's a folder if there's no period present in the filename. function sortArray(array) { console.log('Original array: ' + array); var z = array.length; console.log('Array length is ' + z); for(i = 0; i &lt; z-1; i++) { var n = array.indexOf(array[i]); if (array[i].indexOf('.') === -1) { console.log('Item is folder'); var fldr = array.splice(n, 1); array.push(fldr); } } console.log('Sorted array: ' + array); }
tagged with: javascript
answer count: 6
has title: Javascript Arrays: Move current item to back
tagged with: sorting
has answer: http://stackoverflow.com/a/25210974
favorite count: 0
accepted answer: http://stackoverflow.com/a/25210888
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39266368
score: 1
has comment: http://stackoverflow.com/comment/39264623
has answer: http://stackoverflow.com/a/25210966
type: Question
has answer: http://stackoverflow.com/a/25211016

http://stackoverflow.com/q/25116375
type: Question
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25116406
score: 0
has answer: http://stackoverflow.com/a/25116406
has answer: http://stackoverflow.com/a/25116413
has title: jQuery .data() is not actual after adding new values
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25116617
accepted answer: http://stackoverflow.com/a/25116413
has comment: http://stackoverflow.com/comment/39089152
has body: I've got div like &lt;div data-a="aa"&gt; &lt;/div&gt; Then I'm getting its data with: var data = $("div").data(); And its working fine. Then I'm adding new data like this via data- attribute: $("div").attr("data-b", "bb"); Then I'm getting data again like var updatedData = $("div").data(); However, the new value ( data-b attr with bb value ) is not there. Why is that? (I want to manage data via data- attributes) Fiddle playground Using attributes is suitable in my case, so I dont want to use .data("key", "val"). data- attributes are valid anyway Interesting thing is that when I add data- attribute before first call of .data() - it works ok. Is there a way to ignore or 'rebuild' cache of data then? example here
answer count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25116545

http://stackoverflow.com/q/25099777
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: Wrapping div around sortlist
has comment: http://stackoverflow.com/comment/39058577
accepted answer: http://stackoverflow.com/a/25100584
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/39058608
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39058664
type: Question
answer count: 1
has answer: http://stackoverflow.com/a/25100584
has body: The following image is the effect that I am going to implement. I used jquery ui sortlist so that the items within the box can be dragged and sorted. However, I cannot wrap a div around the sortlist. Actually I have come across the same problems whenever I using bootstrap columns. I cannot easily wrap div around the content, and format the inside elements if columns are used. Here it is my HTML code: Theme1 Item 1 Item 2 Item 3 Item 4 Item 5 CSS: /* SUMMARY BOXES */ .summary-theme{ display:block; margin-top:10px; margin-bottom: 40px; width:100%; background: #fff; box-shadow: 1px 1px 2px #A7A7A7; } .summary-theme .connectedSortable{ border:0px; } .summary-theme p{ display:block; float:left; margin:-20px -15px; background: #0CBD94; border: 4px solid #FFFFFF; } The box can wrap successfully if I set the overflow to be 'hidden'. But in that case, the tag will not show properly because it is negative margins. Things look alright when they are not wrap by Bootstrap Columns. Sorry I don't know how to write an online demo with Bootstrap features. So do you have any ideas how to fix the div wrap problem? Thank you!
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39058276
score: 0

http://stackoverflow.com/comment/39303226
type: Comment
comment on: http://stackoverflow.com/a/25230402
score: 0
type: AnswerComment
has text: with `@$http.get("/categories/edit/" + category)` I got a bit further (see my second edit of my original post). Unfotunatly I'm not quite there yet. thanks for your help so far!

http://stackoverflow.com/q/25151219
has answer: http://stackoverflow.com/a/25151288
has comment: http://stackoverflow.com/comment/39153957
has answer: http://stackoverflow.com/a/25151267
score: 0
has comment: http://stackoverflow.com/comment/39153929
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has title: How to add a permission check to many links before firing their click events
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39154003
has body: I have many different types of links, which have click event handlers. For example: $('a.category-one').click(function() {}); $('a.category-two').click(function() {}); Now I want to add a permission check. When one clicks on a link, this check should decide whether to proceed with the other defined event handler. If the other event handler should not be invoked, then display a modal window to explain why the action on a link is stopped. If it should proceed, then just let it go ahead silently. I have been struggling about what is the best way to do this with Javascript. I think about modifying each handler by adding the permission check, but feel it may be too intrusive and such a check is kind of cross-cutting. I think about adding a class to each of the links and attaching the permission check to such a class, but feel the sequence of events might not be what I expect, and not sure how to stop invoking the second handler from within the first handler. I want to hear how experts out there say about this. Thanks and regards.

http://stackoverflow.com/q/25174858
type: Question
has comment: http://stackoverflow.com/comment/39197721
has comment: http://stackoverflow.com/comment/39199582
has title: Parent div MouseOut trigger function
tagged with: javascript
has body: I have a pop down menu animation. On the final frame of the animation, I hide the animation div and show 3 buttons that are identical to the final frame of the animation, only they are 3 separate buttons with in a div. I want the reverse to happen when you mouseout of the parent div, calls the roll up function. When I roll over a button, it triggers the mouseout on the div. I've tried some of the other answers to parent child handling, but still can't get it to work. I thing the other answers don't work because the have event listeners for divs I'm display:none and then display:block. javascript // JavaScript Document //cost var frame = 0; var frameWidth = 215; var xpos3 = 0; var div3; var direction3 = 1; var ypos = 648; var div4; var drop = 0; var div5; function cost(leftright) { direction3 = leftright; } //end cost var xpos = 131; var direction = "right"; var div; var xpos2 = 0; var direction2 = "left"; var div2; function mail(leftright) { direction = leftright; } function home2(leftright) { direction2 = leftright; } function dropp() { drop = 0; direction3 = 1; } function gogo() { div = document.getElementById('mail'); setInterval(moveMail, 1); div2 = document.getElementById('home'); setInterval(moveHome, 1); setInterval(costDrop, 1); div3 = document.getElementById('cost'); setInterval(function () { moveCost() }, 25); div4 = document.getElementById('drop'); div5 = document.getElementById('dropand'); } function moveMail() { if (direction == "right") { if (xpos != 131) { xpos += 1; div.style.backgroundPosition = (xpos) + "px"; } } if (direction == "left") { if (xpos != 0) { xpos -= 1; div.style.backgroundPosition = (xpos) + "px"; } } } //-------------------move home function moveHome() { if (drop == 0) { if (direction2 == "right") { if (xpos2 != 214) { xpos2 += 1; div2.style.backgroundPosition = (xpos2) + "px"; } } if (direction2 == "left") { if (xpos2 != 0) { xpos2 -= 1; div2.style.backgroundPosition = (xpos2) + "px"; } } } } //----------------move cost function co…
score: 0
has comment: http://stackoverflow.com/comment/51560794
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/39198322
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39197681
has comment: http://stackoverflow.com/comment/39198685

http://stackoverflow.com/comment/39145582
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25146646
has text: Looks at your network tab of dev tools, see if the files are returning correctly. Also, its recommended to include jquery before angularjs.

http://stackoverflow.com/a/57710216
type: Answer
score: 9
answers question: http://stackoverflow.com/q/25162294
upvote count: 9
has body: One shorter version with an arrow function: [" a ", "b", " c", "d "].map(e =&gt; e.trim());
downvote count: 0

http://stackoverflow.com/a/25125588
has comment: http://stackoverflow.com/comment/39106395
score: 0
has body: You could use a build tool like GruntJS to combine and minify your code into one file. http://gruntjs.com/ If you are developing in Linux or MacOS you could use the cat command in the terminal: cat file1.js file2.js ... fileN.js &gt; output.js Remember order is important. Combine them in the order you have them in your HTML file. Now you will have a file called output.js that has all your JavaScript inside. Then just use this file in your HTML. &lt;script src="output.js"&gt;&lt;/script&gt;
has comment: http://stackoverflow.com/comment/39106477
type: Answer
has comment: http://stackoverflow.com/comment/39111806
has comment: http://stackoverflow.com/comment/39113467
answers question: http://stackoverflow.com/q/25125466

http://stackoverflow.com/a/25174371
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25094275
has body: In the line .y(d3.time.scale().domain([(min-adj), (max+adj)])); you are setting your y axis to use a time scale, when I assume you want it to show a decimal. Try switching that to something like.y(d3.scale.linear().domain([(min-adj), (max+adj)])); or similar. I'm pretty sure that would likely be why no values are showing.

http://stackoverflow.com/a/25101094
upvote count: 1
has comment: http://stackoverflow.com/comment/39060393
has body: You will need to create your own iterator function and then use it, you can't actually do this with the iterator function, but you can get close to it: var objs = { 'obj1': {'name': 'Object21'}, 'obj2': {'name': 'Object140'}, 'obj3': {'name': 'Object28'}, 'obj4': {'name': 'AnObject251'} }; _.sortBy(objs, function(obj) { var cc = [], s = obj.name; for(var i = 0, c; c = s.charAt(i); i++) c == +c ? cc.push(+c) : cc.push(c.charCodeAt(0)); return +cc.join(''); }); &gt; Object21 Object28 Object140 AnObject251 "AnObject251" goes on the last place because of its length.
has comment: http://stackoverflow.com/comment/39060686
downvote count: 0
answers question: http://stackoverflow.com/q/25101038
type: Answer
has comment: http://stackoverflow.com/comment/39060689
score: 1

http://stackoverflow.com/a/25166044
answers question: http://stackoverflow.com/q/25165423
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/25165423
score: 2
has body: The problem is that you are injecting multiple modals into the page with the same id (#myModal). This is confusing the Bootstrap modal data API (http://getbootstrap.com/javascript/#js-data-attrs) and causing it to spawn multiple modals. Here is a simplified solution (http://jsbin.com/linopelu/2/edit): Hello there Launch demo modal Filler Close Save changes This solution has only one modal that is bound to a selectedKid observable on the view model. When the button is clicked this observable's value is updated and the modal is shown via the bootstrap data API.

http://stackoverflow.com/q/25198155
tagged with: http://stackoverflow.com/tag/html
has body: I have some code that runs and does an XML request to a web service. This web service then returns a url. I need to take the user to that url. At the moment the url is opening in an iframe, which was fine. However changes are being made to the site and it now needs to open in a new tab. I have seen a few javascript examples of how to open a url in a new tab, but all of them require an onclick event. Also, my javascript skills are very limited. Is there any code I could use to open the url , returned by the webservice. in a new tab without having to use a click event? At the moment this is my code inside of the iframe. I know that the iframe would have to be removed and other changes will be made. I just want to give you an idea of how the webservice is called etc. <cfinclude template="webservices/travelit_request.cfm"> <cfset mynewURL = "#XML_URL#"> <cfset mynewURL &= "&adref=0"> <cflocation url="#mynewURL#" addtoken="false"> Your request was cancelled. Please retry.
has comment: http://stackoverflow.com/comment/39245094
has answer: http://stackoverflow.com/a/25225556
accepted answer: http://stackoverflow.com/a/25225556
has comment: http://stackoverflow.com/comment/39259541
tagged with: coldfusion
has comment: http://stackoverflow.com/comment/39248286
has comment: http://stackoverflow.com/comment/39250748
has answer: http://stackoverflow.com/a/25208014
has comment: http://stackoverflow.com/comment/39249818
has comment: http://stackoverflow.com/comment/39244719
has title: Opening a tab with javascript
type: Question
duplicate of: http://stackoverflow.com/q/14347092
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39249437
has comment: http://stackoverflow.com/comment/39249241
answer count: 2
possible better answer: http://stackoverflow.com/a/25208014
linked to: http://stackoverflow.com/q/14347092
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/39089933
has text: @mscdex nothing actually. `app.get('/build/background/images/:file',function(req,res){ console.dir('req.params.file is ', req.params.file); });` This outputs `'req.params.file is '`
comment on: http://stackoverflow.com/q/25114717
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25156154
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: I have been trying to get this slider working for 2 days now and I can't figure it out. I have tired changing the JS library and check all the CSS and JS roots they seem to be fine to me. but its come up with these errors: Uncaught ReferenceError: jQuery is not defined owl.carousel.min.js:47 Uncaught TypeError: undefined is not a function:99 View my code here: http://pastebin.com/rY7fUVxU Slider Site: http://owlgraphic.com/owlcarousel/demos/lazyLoad.html If anyone can help I would be very grateful.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25156329
downvote count: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25156329
score: 1
has title: Owl Carousel Slider JS Error - Uncaught ReferenceError: jQuery is not defined
type: Question

http://stackoverflow.com/q/25150817
tagged with: ember-data
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: ember.js
favorite count: 0
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25151147
has body: I'm going a bit crazy trying to figure out the best way to implement nested resources in an application I'm writing with Ember/Ember Data as the front end. To start with, here are my Models: App.Gathering = DS.Model.extend({ name: DS.attr('string'), events: DS.hasMany('event', { asynch: true }) }); App.Event = DS.Model.extend({ name: DS.attr('string'), startDate: DS.attr('string'), endDate: DS.attr('string'), gathering: DS.belongsTo('gathering', { asynch: true }) }); Other than very basic routes, that's about all I have so far - my issues come in when I start working with the backend. I'm writing both front and back end, so at this stage, I can really implement the back end however would be best. I feel like I've scoured the Internet trying to find a solid, up-to-date way to get Event objects associated with a Gathering using Ember Data. I've had no issues getting all data for either a Gathering or Event, but have had a heck of a time figuring out how - given a particular Gathering (id) - to query only for Events related to that Gathering without having to load every event ever from the server. In particular, later on down the road, there will be objects nested inside of Events, so I'm aiming for a viable long(ish)-term solution to this problem. I've tried using the "links" attribute on JSON returned from the server, looked up 10 different sites regarding query parameters, and pretty much have spent the past three days trying to figure this out. I could use custom AJAX queries, but since this project is young, I'd like to implement it in a way that's as Ember friendly as possible since I'm not really subject to many constraints. I'm pretty new to Ember/Ember Data (and front-end development in general), but I've been coding in Java for several years and have a pretty solid foundation in OOP/MVC/IOC, etc. Thanks in advance! Update I think what I was mostly lacking was knowledge on how to actually access those nested resources; the example in the posted answered cleare…
score: 1
type: Question
has title: How do I handle nested data with Ember Data with any backend?
has answer: http://stackoverflow.com/a/25151147

http://stackoverflow.com/q/25195693
upvote count: 2
type: UnansweredQuestion
score: 2
tagged with: polymer
type: Question
has body: Just learning polymer. I want to grab the color of fixed-header when it is clicked. When I don't use the inline style on polymer-element, I can't use this.style.backgroundColor, even though it is definitely changing color to be red. Why can't I use this.style.backgroundColor when it is just through the template style tag? Also, I'm trying to set the backgroundColor, but I can't do that either.
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Getting this.style from a polymer element
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25212903
tagged with: css

http://stackoverflow.com/a/25131545
answers question: http://stackoverflow.com/q/25131388
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25131388
upvote count: 4
score: 3
type: AcceptedAnswer
type: Answer
has body: There is a JS library which you can use: language-tags It's a little bit heavy, you can use a pre-defined list like this.

http://stackoverflow.com/comment/39153430
type: QuestionComment
has text: what function are you using to download the file ?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25150956

http://stackoverflow.com/a/25221032
upvote count: 4
answers question: http://stackoverflow.com/q/25220962
downvote count: 0
has comment: http://stackoverflow.com/comment/39430083
has comment: http://stackoverflow.com/comment/39454609
type: Answer
has comment: http://stackoverflow.com/comment/39430114
has body: This line right here is your problem: Player.prototype = Person.prototype; You want the prototype for Player to inherit from Person's prototype, but not make them equal. Currently, your code makes the Player and Person prototypes reference equal, so any changes to Player.prototype also affect the Person.prototype (effectively making them indistinguishable). You're looking for: Player.prototype = Object.create(Person.prototype); Object.create instantiates a new object with a given prototype without actually calling the constructor (unlike a regular new Person() call would do). This allows you to get a new object inheriting the Person prototype, which you can then modify for the specifics of a Player. EDIT: As suggested in the comments by Siddarth, an even better solution would be to set the constructor through a property descriptor: Player.prototype = Object.create(Person.prototype, { constructor: { value: Player } }); This way, the newly created prototype will have its constructor property made non-configurable, non-enumerable and non-writable. This prevents you from accidentally changing it afterwards through an assignment (e.g. Player.prototype.constructor = Foo) and it won't show up in Object.keys or a for..in loop. Normally, this shouldn't matter much but it's a good practice.
score: 4

http://stackoverflow.com/q/25086784
has answer: http://stackoverflow.com/a/25086870
type: Question
has answer: http://stackoverflow.com/a/25087039
has comment: http://stackoverflow.com/comment/39034198
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25087039
has body: Is there a way to observe my html body? I have a css class: .abdala and this script: I need observe the html body changes. If i do that: $(document.body).append(" another abadala element "); After append i need do something. Is there a way to do that?
has title: Observe html body with jquery
score: 0
linked to: http://stackoverflow.com/q/9488653
has answer: http://stackoverflow.com/a/25086898
linked to: http://stackoverflow.com/q/3384398
possible better answer: http://stackoverflow.com/a/25086905
answer count: 4
has answer: http://stackoverflow.com/a/25086905
type: AnsweredQuestion

http://stackoverflow.com/q/25097766
upvote count: 1
answer count: 1
favorite count: 0
has title: How to Do MultiDimensional Autocomplete JQuery/Angular
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has body: Right now I have an autocomplete directive with two types of inputs: a general and a more specific category (e.g. states vs cities, categories of business (retail) vs lines of business (retail banking) etc.) I have a window that presents cartouches/buttons with all the added elements that are only of the latter, more specific kind (which can then be individually removed. In other words, whenever a user enters a general category (e.g. "California"), what shows up would be "San Francisco, Los Angeles, Sacramento" which can each be individually removed. Something like this: OK, so what I would like is to make the autocomplete reflect this in the obvious way: to present a two-level tree, wherein if the cursor is on the higher branch, all the leaves are highlighted (to reflect that they will all be added), and where the leaves can be individually chosen. In other words, something very vaguely like the Bootstrap multilevel select, but for autocomplete. I have read through the Jquery and Bootstrap docs (and obviously many SO posts), and can't find anything that specifically addresses this issue. Is there any plugin out there I am missing? Or how would I go about hacking into the Jquery autocomplete to create this behavior? Thanks!
has answer: http://stackoverflow.com/a/25127234
downvote count: 0
score: 1
type: Question
tagged with: autocomplete
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25143619
tagged with: iife
duplicate of: http://stackoverflow.com/q/750486
has title: Immediately Invoked Function Expression use case:inadvertent sharing via closures
has answer: http://stackoverflow.com/a/25143668
upvote count: 0
tagged with: return
type: UnansweredQuestion
has body: var result=[]; for(var i=0;i&lt;5;i++){ result.push(function () {return i}); } console.log(result[1]()); //5 not 1 I think the result should be [0,1,2,3,4] and I don't understand why the value should be 5. How does it work? I am completely confused.
linked to: http://stackoverflow.com/q/750486
tagged with: javascript
score: -1
type: Question
answer count: 1
downvote count: 1
favorite count: 0

http://stackoverflow.com/comment/39061106
type: Comment
has text: You do realise I don’t know every API on the planet, right? What you’re asking is no longer about JavaScript, it’s about that specific library you’re using. I assume you already know how to export from AudioRecorder, otherwise how can you be sure you original code doesn’t work in the first place?
comment on: http://stackoverflow.com/a/25101163
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39118851
comment on: http://stackoverflow.com/a/25132521
score: 0
type: Comment
has text: where should I use it?
type: AnswerComment

grunt-contrib-copy
type: Tag
tag name: grunt-contrib-copy
tags question: http://stackoverflow.com/q/25129330

http://stackoverflow.com/q/25082911
has body: I had a recent post about this, and I thought it was working but I'm getting a syntax error on my function. I had this code in my JS: function MyModule.init(url) { var myXHR = new XMLHttpRequest(), seconds = (new Date()).getTime(); // Load my data myXHR.addEventListener('readystatechange', function () { var preXHR = new XMLHttpRequest(), data; // Some code here .... preXHR.open('GET', url + '?t=' + seconds); preXHR.send(); } }); myXHR.open('GET', url + '?t=' + seconds); myXHR.send(); ... }; With I have this bit in my template: $(function(){ MyModule.init(' {% url 'catalog.data' %}'); }); But as I said the MyModule is throwing a syntax error in the JS file and saying it's undefined in my template. I've then looked around to create MyModule as an object in the JS file with an init method inside like this: var MyModule = { init: function(url) { ... } } But this also throws an error in my template stating MyModule is not defined and in the JS file there is an Unexpected Identifier at this line: myXHR.open('GET', url + '?t=' + seconds); And still saying the MyModule is not defined. Just need some help on how to implement this as an object and setup init as a method with an assignment. Thank you
answer count: 0
has comment: http://stackoverflow.com/comment/39027383
has title: Create an object and then setup init as a method with an assignment giving syntax error
type: Question
has comment: http://stackoverflow.com/comment/39026427
tagged with: javascript
score: 0
tagged with: syntax-error
has comment: http://stackoverflow.com/comment/39027300
has comment: http://stackoverflow.com/comment/39026817
type: UnansweredQuestion

http://stackoverflow.com/q/25082123
accepted answer: http://stackoverflow.com/a/25089590
type: Question
tagged with: master-pages
tagged with: javascript
answer count: 2
has title: Dynamically update a html element value based on h1
downvote count: 0
has body: Right, I have a problem which I am struggling to get my head around. On an aspx master page (procedure.master.aspx) I have the following element: &lt;Tags&gt; &lt;wbc:Tag Value="234"&gt;&lt;/wbc:Tag&gt; &lt;/Tags&gt; what I want to be able to do is change the VALUE of this depending on the page content (procedures.aspx which calls the master) i.e. if H1 contains "FOO" then Tag Value="BAR" etc. The TAG value is sent to a stored procedure returning XML based on the content of the page. Not a javascript GURU so open to any suggestions with Javascript (not JQuery) or VB.net.
tagged with: asp.net
favorite count: 0
has answer: http://stackoverflow.com/a/25089590
tagged with: http://stackoverflow.com/tag/html
tagged with: vb.net
possible better answer: http://stackoverflow.com/a/25082785
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25082785
score: 1
upvote count: 1

http://stackoverflow.com/comment/39020976
type: QuestionComment
has text: Please do not dump all your source code in the question. Try to reduce it to a small example to explain a specific problem...
comment on: http://stackoverflow.com/q/25080159
score: 0
type: Comment

http://stackoverflow.com/a/25096147
answers question: http://stackoverflow.com/q/25096114
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can use function who check is Domain is availible. &lt;?php if (isDomainAvailible('1st-Web-Page')) { echo '&lt;iframe src="1st-Web-Page"&gt;&lt;/iframe&gt;'; } else { echo '&lt;iframe src="2st-Web-Page"&gt;&lt;/iframe&gt;'; } //returns true, if domain is availible, false if not function isDomainAvailible($domain, $timeout = '30') { //check, if a valid url is provided if(!filter_var($domain, FILTER_VALIDATE_URL)) { return false; } //initialize curl $curlInit = curl_init($domain); curl_setopt($curlInit,CURLOPT_CONNECTTIMEOUT,$timeout); curl_setopt($curlInit,CURLOPT_HEADER,true); curl_setopt($curlInit,CURLOPT_NOBODY,true); curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true); //get answer $response = curl_exec($curlInit); curl_close($curlInit); if ($response) return true; return false; } ?&gt;
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25096114
has comment: http://stackoverflow.com/comment/39051146

http://stackoverflow.com/comment/40122563
type: AnswerComment
type: Comment
has text: @JosephMornin The attacker is *never* able to call `executeCopy` directly, because it can only be called by your extension. What I *do* know is that the function is called from the content script, *presumably* with the HTML directly from the page. In your question, you have *not* stated how the function is used, so I had to make some worst-case assumptions to be realistic. Further, you have not specified whether the "text" in your question is text or HTML, that's why the first revision of my answer assumed that you really wanted to copy text instead of HTML (to be continued...)
comment on: http://stackoverflow.com/a/25275151
score: 0

http://stackoverflow.com/comment/39173614
comment on: http://stackoverflow.com/q/25161751
type: Comment
score: 0
has text: Yes! But for now the action `UpdateProject` only performs an update of a record in the database (which) works. Next (once this part fully works) i want it to return data for the user. But I have found the error. I assumed (incorrectly) that the return of an empty String (As Response.Write) would be ignored by the ajax call. In fact it tries to compile it: hence the error. Many Many thanks to everyone for the help!
type: QuestionComment

http://stackoverflow.com/comment/39232815
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25193822
has text: @alejoss . No worries :) .

http://stackoverflow.com/a/59176202
has body: I am surprised that non of the answers consider the base url if it was set in &lt;base&gt; tag. All current answers try to get the host name or server name or first part of address. This is the complete logic which also considers the &lt;base&gt; tag (which may refer to another domain or protocol): function getBaseURL(){ var elem=document.getElementsByTagName("base")[0]; if (typeof(elem) != 'undefined' &amp;&amp; elem != null){ return elem.href; } return window.location.origin; } Jquery format: function getBaseURL(){ if ($("base").length){ return $("base").attr("href"); } return window.location.origin; } Without getting involved with the logic above, the shorthand solution which considers both &lt;base&gt; tag and window.location.origin: Js: var a=document.createElement("a"); a.href="."; var baseURL= a.href; Jquery: var baseURL= $('&lt;a href="."&gt;')[0].href Final note: for a local file in your computer (not on a host) the window.location.origin only returns the file:// but the sorthand solution above returns the complete correct path.
downvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25203124
upvote count: 6
has comment: http://stackoverflow.com/comment/104695587
has comment: http://stackoverflow.com/comment/104697229
score: 4
has comment: http://stackoverflow.com/comment/108080662

http://stackoverflow.com/comment/55309237
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25204073
has text: Haha "get rect"...I'm so sorry.
score: 0

http://stackoverflow.com/q/25105414
has body: How to detect the switching of muted and loop properties of a video? There are no "onmuted" or "onloop" events, as "onplay" or "onpause", unfortunately. Object.observe doesn't work. MutationObserver doesn't work either. Any suggestions would be appreciated.
score: 2
type: AnsweredQuestion
tagged with: google-chrome
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25106820
tagged with: html5-video
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 2
has title: HTML5 video - onmuted and onloop event
accepted answer: http://stackoverflow.com/a/25106820

http://stackoverflow.com/a/25207688
answers question: http://stackoverflow.com/q/25207436
type: Answer
has body: You're already passing the index of the pane you want to remove when you send $index as the parameter to your close($index) function. Thus your close function should look like this: $scope.close = function(i){ var removedPane = $scope.panes.splice(i,1); // do something here with the "removedPane" if you want to }; This line var idx = $scope.panes.indexOf(pane); is trying to find the index of the index being sent to the function, thus idx is most likely undefined. EDIT You need to go back to calling close like this: `ng-click="close($index)"`
score: 0

http://stackoverflow.com/q/25123106
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25123518
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39102220
has comment: http://stackoverflow.com/comment/39101623
has comment: http://stackoverflow.com/comment/39102125
has body: I'm trying to implement a jQuery script here: http://amsul.ca/pickadate.js/date.htm I have entered the following (where fbrp__35 is the id of my input) after my form: &lt;script&gt; $('#fbrp__35').pickadate() &lt;/script&gt; But it's not working. I have also tried the following: &lt;script&gt; $( document ).ready(function() { $('#fbrp__35').pickadate() }); &lt;/script&gt; What am I doing wrong?
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39101679
has comment: http://stackoverflow.com/comment/39101579
has comment: http://stackoverflow.com/comment/39101877
has comment: http://stackoverflow.com/comment/39101462
favorite count: 0
has title: Struggling to implement jQuery date picker
has comment: http://stackoverflow.com/comment/39101578
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25123518

http://stackoverflow.com/comment/39296316
type: Comment
type: QuestionComment
has text: how you want it....can you tell me what output you want?
comment on: http://stackoverflow.com/q/25227770
score: 0

http://stackoverflow.com/comment/39276433
has text: I believe you are saying this might not be possible ...is there any other way around ..I just want to set one textbox using $.ajax ...either by server side code or by client side code
comment on: http://stackoverflow.com/q/25216911
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25225275
answers question: http://stackoverflow.com/q/25225231
type: Answer
has comment: http://stackoverflow.com/comment/39291465
score: 0
has comment: http://stackoverflow.com/comment/39291773
has body: This is just a wild guess, but try placing the angularfire.js script before the firebase-simple-login.js Another guess would be to check if there is a missing configuration concerning the firebase url.

http://stackoverflow.com/q/25091112
has body: I tried all possible way on the internet to fetch my google spreadsheet as json $.getJSON() But I keep getting 404 Not found. On publish to web I get this url: https://docs.google.com/spreadsheets/d/1vho9BS2YdCz3aKuLyV9m15stYhBu4G97ngzRasQsG1Y/pubhtml. To fetch json I tired all the combinations of url in this url = "https://docs.google.com/spreadsheets/d/1vho9BS2YdCz3aKuLyV9m15stYhBu4G97ngzRasQsG1Y/od6/public/values?alt=json&amp;callback=?"; $.getJSON(url, function(resp) { console.log(resp) }); Not sure what else to do. Seems the od6/public/value format does not work fro me. Also in "publish to web", google seems to have removed the Cells and List option. Solution: I decided to use https://github.com/chriszarate/sheetrock. Did an awesome job!
type: Question
tagged with: google-sheets-api
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
score: -1
has title: get google spreadsheet in json gives 404 Not found
has comment: http://stackoverflow.com/comment/39042244
has comment: http://stackoverflow.com/comment/39042209
upvote count: 0
has comment: http://stackoverflow.com/comment/39053919
answer count: 1
has answer: http://stackoverflow.com/a/25097985
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39042220
has comment: http://stackoverflow.com/comment/39042222
type: UnansweredQuestion
tagged with: google-docs-api
has comment: http://stackoverflow.com/comment/39054268
downvote count: 1

http://stackoverflow.com/q/25119349
has title: Calculating relative item positions based on camera position and rotation
tagged with: game-engine
tagged with: javascript
has comment: http://stackoverflow.com/comment/39265087
has comment: http://stackoverflow.com/comment/39265196
has answer: http://stackoverflow.com/a/25211308
has body: For a 2d game, I have these concepts: stage: container in which items and cameras are placed. item: a visible entity, located on a certain point in the world, anchored from center. camera: an invisible entity, used to generate relative images of world, located on a certain point in the world, anchored from center. In the illustrations, you can see how they are related, and what the end result should be. Here is the code I have: (dumbed down to make it easier to read) Note1: This is not happening on canvas, so I will not use canvas translation or rotation (and even then, I don't think it would make the problem any easier). Note2: Item and camera positions are center coordinates. var sin = Math.sin(rotationRad); var cos = Math.cos(rotationRad); var difX = item.x - camera.x; var difY = item.y - camera.y; var offsetX = camera.width / 2; var offsetY = camera.height / 2; var view.x = (cos * difX) - (sin * difY) + _Ax + _Bx; var view.y = (sin * difX) + (cos * difY) + _Ay + _By; This is supposed to calculate an items new position by: calculating new position of item by rotating it around camera center (_A*) adjusting item position by offsetting camera position (_B*) adjusting item position by offsetting camera size I tried several different solutions to use for _A* and _B* here, but none of them work. What is the correct way to do this, and if possible, what is the explanation?
has comment: http://stackoverflow.com/comment/39264972
answer count: 1
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39265185
score: 2
tagged with: 2d
upvote count: 2
tagged with: math
has comment: http://stackoverflow.com/comment/39265207
has comment: http://stackoverflow.com/comment/39250468
type: Question

http://stackoverflow.com/a/25127878
answers question: http://stackoverflow.com/q/25127711
has body: I would insert an intermediate step to convert it into an Array and sort it using a custom sort function. Here's basically what I would do in that intermediate step: function sortObj(obj) { var array = []; for (var i in obj) { if obj.hasOwnProperty(i) { array.push({key: i, value: obj[i]}); } } array.sort(function (a, b) { return a.value["rank"] - b.value["rank"]; }); return array; } The reason I'm saving the keys is because it may be needed later. (I am well aware of YAGNI, but that would limit this code's reuse).
score: 0
type: Answer

http://stackoverflow.com/comment/39167212
score: 0
type: Comment
type: QuestionComment
has text: Try console logging just `d` and see what you've got, it's probably not JSON ?
comment on: http://stackoverflow.com/q/25158761

http://stackoverflow.com/comment/39189119
has text: Ooh, that's a good idea! Unfortunately in this case I can't use deep watches. I'll update my question to reflect that.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25170118
type: AnswerComment

http://stackoverflow.com/comment/39190435
score: 0
type: Comment
type: QuestionComment
has text: Be careful - I didn't examine it thoroughly, but it looked to me that this is fragile and not working across all browsers. Test thoroughly.
comment on: http://stackoverflow.com/q/25170285

http://stackoverflow.com/q/25168941
tagged with: javascript
favorite count: 0
tagged with: python
has answer: http://stackoverflow.com/a/25169047
linked to: http://stackoverflow.com/q/1756096
downvote count: 2
has title: JavaScript to python matrix
type: AnsweredQuestion
score: -2
accepted answer: http://stackoverflow.com/a/25169047
type: Question
upvote count: 0
tagged with: matrix
has body: I am currently trying a mathematics and computing course and hit a snag. The question I have been asked to produce a program for is: Write a program to store the contents of a 6 by 6 matrix. The matrix M has been defined such that the value of the ith and jth column of the matrix is the result of multiplying i and j. The JavaScript code is below: var m = new Array(); var i,j; for (i=0;i&lt;6;i++){ m[i]=new Array(6); for (j=0;j&lt;6;j++){ m[i][j]=(i+1)*(j+1); } } print m My question is what would the same code look like in Python. I have tried the program below but hit with type and assignment errors. m=[] i=0 j=0 for i in xrange (6): m.append(i) for j in xrange (6): m[i][j]=((i+1)*(j+1)) print m Any help would be greatly appreciated.
answer count: 1
tagged with: arrays

http://stackoverflow.com/a/25181893
answers question: http://stackoverflow.com/q/25181593
score: 0
has comment: http://stackoverflow.com/comment/39211027
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25181593
type: Answer
has comment: http://stackoverflow.com/comment/39210585
has body: Use icon: getMarkerImage(color), With function createMarker(latlng, name, address) { //alert(latlng+''+name+''+address); var html = "&lt;b&gt;" + name + "&lt;/b&gt; &lt;br/&gt;" + address; var marker = new google.maps.Marker({ map: map, position: latlng, icon: getMarkerImage(color) //New Added }); google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); markers.push(marker); } Set image using function getMarkerImage(iconStr) { if ((typeof (iconStr) == "undefined") || (iconStr == null)) { iconStr = "red"; } if (!icons[iconStr]) { icons[iconStr] = new google.maps.MarkerImage(""http://www.google.com/mapfiles/marker""+ iconStr +"".png"", //icons[iconStr] = new google.maps.MarkerImage("images1/small-marker-truck.png", // This marker is 20 pixels wide by 34 pixels tall. new google.maps.Size(26, 32), // The origin for this image is 0,0. new google.maps.Point(0, 0), // The anchor for this image is at 6,20. new google.maps.Point(9, 32)); } return icons[iconStr]; }
has comment: http://stackoverflow.com/comment/39210795

http://stackoverflow.com/comment/39049524
type: Comment
comment on: http://stackoverflow.com/a/25095145
has text: Just tried it, it's the function itself that's not being gone into. I placed an alert at the start to check and nothing popped up.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25180310
tagged with: css
has answer: http://stackoverflow.com/a/25180478
type: AnsweredQuestion
has body: There's this really cool effect I'd like to recreate, however I don't understand how the developer is achieving it. I've looked at the source - but I still don't quite understand. The site is: http://drewwilson.com and below will be a couple of screenshots of what is happening. When I click on the ellipsis on the header, a little about element pops up and the actual site 'zooms' backwards, leaving whitespace around it's border and greys out. I can't see any javascript or jQuery doing it, so i'm assuming it's css?! - Although I might have missed something totally - so any help is appreciated :) Inactivated Activated
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25180478
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: Menu/Page Zoom Out effect?

http://stackoverflow.com/q/25195053
score: 0
has body: When I use AJAX query to server, it return me string value. This string have predefined format like: 1|#||4|2352|updatePanel|updatePanelID column1 column2 trColumn1Info trColumn2Info some other information I want to get second arguments value of FunctionName by regular expression. I tryed to use next regexp, but it always return null: var forTest = ajaxResultStr.match(/FunctionName\((\S*)\)/g); alert(forTest); Can anybody tell me, whats wrong in my pattern? Thanks in advance
upvote count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
answer count: 3
tagged with: regex
has answer: http://stackoverflow.com/a/25195201
has answer: http://stackoverflow.com/a/25195115
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25195121
has title: JavaScript regexp matching
type: Question

http://stackoverflow.com/comment/39289036
has text: thank you so much for the time you spent on this, man. I honestly appreciate it. I commented out my old code and used yours; Everything is working except the close button. When i hit #close-button, all of #work disappears.
comment on: http://stackoverflow.com/a/25223596
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39080416
has text: @jgravois You forget the most important part - ` `. Well in fact I forget it too in the answer! See updated answer with the link to plnkr.
score: 1
comment on: http://stackoverflow.com/a/25106913
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39389696
score: 0
type: Comment
has text: My bad, ignore the first error (my_jquery.js)... it wasn't part of the magnific-popup codes. I would like to work on getting the magnific-popup jquery files to work somehow....
comment on: http://stackoverflow.com/a/25154283
type: AnswerComment

http://stackoverflow.com/a/25120600
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39096990
downvote count: 0
has body: You can use jQuery promise in this case. http://api.jquery.com/deferred.done/ var dfd = null; if (some condition) { //Standard HTML-element/tag manipulation $("#obj1").append('&lt;a class="trigger"&gt;Click Me &lt;/trigger&gt;'); $(".SomeClass").remove(); ...... //Create Deferred object and resolve immediately dfd = $.Deferred(); dfd.resolve(); } else { //HTML-element/tag manipulation after $.ajax-call //$.ajax returns Deferred dfd = $.ajax({ //perform ajax-call }) .done(function (data) { $("#obj1").append('&lt;a class="trigger"&gt;' data.someProp '&lt;/trigger&gt;'); }) } //Use when for waiting the Deferred to get resolved $.when(dfd).then(function(){ //Perform actions: Part2 $(".trigger").Click(function() { Somefunction() }); })
type: Answer
answers question: http://stackoverflow.com/q/25120451
score: 1
accepted answer of: http://stackoverflow.com/q/25120451
has comment: http://stackoverflow.com/comment/39097192
has comment: http://stackoverflow.com/comment/39097283

http://stackoverflow.com/comment/39093910
type: Comment
has text: Yes it was depreciated in 1.7 but REMOVED in 1.9. So the live events no longer work with 1.9+. You could still use them in 1.8.
comment on: http://stackoverflow.com/a/25119032
type: AnswerComment
score: 0

http://stackoverflow.com/q/25218677
has title: Javascript split function to split into array at new line or white space
has answer: http://stackoverflow.com/a/25218704
accepted answer: http://stackoverflow.com/a/25218704
favorite count: 0
upvote count: 5
has body: I'm trying to split some text either by whitespace and/or new line, and also remove the white space before and after the whole text, just in case. I'm not sure how to perform this as I cannot get my head around regex (I've tried other people's regex but it breaks my output) and I want to perform this using best practice rather than writing some lengthy buggy workaround My code can be located here: https://github.com/Dave-Melia/Text-Separator Many thanks D
has answer: http://stackoverflow.com/a/25218705
tagged with: regex
has comment: http://stackoverflow.com/comment/39279624
has answer: http://stackoverflow.com/a/25218775
answer count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39279556
type: Question
possible better answer: http://stackoverflow.com/a/25218705
has comment: http://stackoverflow.com/comment/39279615
tagged with: javascript
score: -1
downvote count: 6
has answer: http://stackoverflow.com/a/25218755

http://stackoverflow.com/q/25118772
favorite count: 0
accepted answer: http://stackoverflow.com/a/25118870
has comment: http://stackoverflow.com/comment/39095321
score: -3
has title: Why my tabs (i.e HOME, ABOUT ME..) doesn't show the corresponding paragraph or section?
has comment: http://stackoverflow.com/comment/39093330
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39093253
downvote count: 3
has comment: http://stackoverflow.com/comment/39093729
has comment: http://stackoverflow.com/comment/39093271
has comment: http://stackoverflow.com/comment/39093419
type: Question
has answer: http://stackoverflow.com/a/25118870
upvote count: 0
has body: Right now my navigation tabs are only clickable. I did it by using "anchor() tag". But as soon as I click it, it doesn't show the corresponding paragraph (which I already stored in my HTML file). Basically I haven't added any functionality to happen something after clicking the tab. And I don't know how to do that and which one is better (comparing with jquery and javascript). This is my code: .PHP file: Fatah's Homepage Welcome to my world! HOME WHO I'M GALLERY MY DIARY FATAH'S BLOG CONTACT ME It's home. It's who I'm. It's Gallery. It's diary. It's my blog. contact info. Developed by Jabir Al Fatah 2014 .CSS file: *{ margin:0px; padding:0px; } h1{ font:bold 20px Tahoma; } h2{ font:bold 14px Tahoma; } header,section,footer, aside, nav, article, hgroup{ display:block; } body{ width:100%; -webkit-box-pack:center; } #wrapper{ max-width:1000px; margin:20px auto; display:-webkit-box; -webkit-box-orient:vertical; -webkit-box-flex:1; } #top_header{ background:green; border:3px solid orange; padding:20px; text-align:center; } #top_menu{ background:white; color:black; border:3px solid red; padding:4px; text-align:center; } #top_menu li{ display:inline-block; list-style:none; padding:5px; font:bold 14px Tahoma; } #new_div{ display:-webkit-box; -webkit-box-orient:horizontal; } #main_section{ border:1px solid blue; -webkit-box-flex:1; margin:20px; padding:20px; } #the_footer{ text-align:center; padding:20px; border-top: 2px solid red; }
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25118989
has answer: http://stackoverflow.com/a/25118942
answer count: 3
has answer: http://stackoverflow.com/a/25118989
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39003734
comment on: http://stackoverflow.com/q/25070526
score: 1
has text: Have you checked this way `a.src="//example.com/script.min.js?v="+(Math.random());`
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25167856
favorite count: 0
has comment: http://stackoverflow.com/comment/39184706
has comment: http://stackoverflow.com/comment/39184855
tagged with: getdate
has answer: http://stackoverflow.com/a/25167979
accepted answer: http://stackoverflow.com/a/25167979
type: AnsweredQuestion
downvote count: 2
has title: Get dates of next 8 Saturdays (javascript)
type: Question
score: -2
has comment: http://stackoverflow.com/comment/39184908
tagged with: javascript
tagged with: date
upvote count: 0
answer count: 1
tagged with: dayofweek
has body: I was able to get date of closest Saturday - CodePen Need help with finding dates of the next seven saturdays. Thank you function myFunction(x){ var now = new Date(); now.setDate(now.getDate() + (x+(7-now.getDay())) % 7); document.getElementById("1s").innerHTML = now.getDate() + ' of ' + now.getMonth() + 'th'; }

http://stackoverflow.com/comment/39050135
type: Comment
type: QuestionComment
has text: :/ y u no support _Blob_ this way, _Chrome_? .. A quick google search should give you a few ways to convert blob to base64, the easiest way is via _FileReader/data URLs_ (remember to trim off the start)
comment on: http://stackoverflow.com/q/25090716
score: 0

http://stackoverflow.com/a/25084740
answers question: http://stackoverflow.com/q/25084305
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/39030047
has comment: http://stackoverflow.com/comment/39030210
has comment: http://stackoverflow.com/comment/39030150
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/39030031
has comment: http://stackoverflow.com/comment/39030085
has body: Get the style whitch will return in this form rgb(x,x,x) then convert it to hex and check DEMO: http://jsfiddle.net/bP7sP/ $(document).ready(function () { $('#validate_btn').click(function () { if(rgbToHex($('.style').css('color')) == "#ff0000"){ alert("RED"); } }); var hexDigits = new Array ("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"); function rgbToHex(rgb) { rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); } function hex(x) { return isNaN(x) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16]; } });
accepted answer of: http://stackoverflow.com/q/25084305
upvote count: 2

http://stackoverflow.com/comment/39213084
type: Comment
comment on: http://stackoverflow.com/a/25183289
type: AnswerComment
has text: It's still going through without checking the checkbox .
score: 0

http://stackoverflow.com/a/27626398
answers question: http://stackoverflow.com/q/25122267
score: 4
has body: require takes a 3rd argument which is an error callback, so you can assign window.ga to a function which always returns undefined. This avoids errors when calling google analytics functions elsewhere in your code. require(['ga'], function(data) { window.ga('create', 'UA-XXXXXXXX-X'); window.ga('send', 'pageview'); }, function() { window.ga = function(){}; });
downvote count: 0
type: Answer
upvote count: 4

http://stackoverflow.com/q/25220770
tagged with: wordpress
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/39285838
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39288561
tagged with: javascript
favorite count: 0
score: 0
has body: I have a function that displays 4 random businesses. It works great, except that when we turn on page caching, it stops being dynamic. How can I make just this one section of my site dynamic using javascript so upon every page reload it displays 4 new random entries. Site is using WordPress, and the WP Super Cache plugin.
has title: Making sections of PHP dynamic while page caching using javascript
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25155008
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39160749
accepted answer of: http://stackoverflow.com/q/25154854
type: Answer
answers question: http://stackoverflow.com/q/25154854
has comment: http://stackoverflow.com/comment/39160588
has comment: http://stackoverflow.com/comment/39160671
has comment: http://stackoverflow.com/comment/39161493
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39160655
has comment: http://stackoverflow.com/comment/39183238
has body: Deferred objects in jQuery are also thenables and you can use them in place of promises. Doing so is rather uncommon though. var d = $.Deferred().resolve(); d.then(function(){ console.log("HI"); // this will run. }); The original $.ajax having .done and .fail is pointless in this case, especially the .done whose return value is ignored and has no impact. In all honestly, I think the code could be improved to something like rather easily: var getData = $.post('/echo/html/', { html: 'testhtml', delay: 3 }); var d = $.Deferred(); $(document).on('click', 'button', function(ev){ d.resolve(); return false; }); $.when(d, getData).then(function(_, data){ $('p').html('I got the data!'); $('div').html(data); }); There is no point in .thening if you only use the identity function (that is, return the same thing and do nothing else. There is no point in .doneing only to return the same thing. Generally, I would advise against promises for handing events unless the events are strictly one time.

http://stackoverflow.com/comment/39244149
has text: jQuery is not a fast solution and it does not help learning JavaScript and understanding DOM manipulations.
type: Comment
comment on: http://stackoverflow.com/a/25199573
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39285710
type: Comment
has text: thank you very much for that, when i put the email address and when i click on the submit button, it is not doing anything. please see my update post in my first post.
comment on: http://stackoverflow.com/a/25221001
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39071036
score: 0
type: AnswerComment
has text: I want something more specific for example I want to draw line in certain x but between 2 different y but I can't do that with this chart
type: Comment
comment on: http://stackoverflow.com/a/25094036

http://stackoverflow.com/comment/39177676
type: QuestionComment
has text: To me, [this answer](http://stackoverflow.com/a/21928069/1355856) looks most promising. Maybe give that one a try.
type: Comment
comment on: http://stackoverflow.com/q/25163979
score: 0

http://stackoverflow.com/comment/39131181
type: AnswerComment
comment on: http://stackoverflow.com/a/25136364
has text: your error is ReferenceError: latLng is not defined instead of line `position: latLng` your lat and lang pos variable name is myLatlng so you must use : `position: myLatlng ` also in title variable you can use custom text for title of pointer. and finaly you can define relative address to your custom icon
type: Comment
score: 0

http://stackoverflow.com/comment/39213847
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25183289
has text: OR just had a nice idea disable all submits for your form on the page load e.g. after $(document).ready $('formname').submit(false); then enable it or disable it with each checkbox change. enable = $('formname').submit(true);

http://stackoverflow.com/a/25080469
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39021761
has body: The object doesn't get sent "as is". jQuery recodes the object to URL key/values pairs, for example: http://this.url?myKey=stringifiedArray. The documentation has more information on this. data Type: PlainObject or String A plain object or string that is sent to the server with the request. Objects are used because they're an easy data structure for developers to manipulate.
answers question: http://stackoverflow.com/q/25080275
has comment: http://stackoverflow.com/comment/39021554
type: Answer
accepted answer of: http://stackoverflow.com/q/25080275
upvote count: 1
has comment: http://stackoverflow.com/comment/39021637
score: 1
has comment: http://stackoverflow.com/comment/39022103

http://stackoverflow.com/comment/39079213
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25111108
has text: I don't know the specifics of V8, but declaring properties on the prototype uses less memory, in case that's a relevant consideration. But be careful to avoid unintentionally shared object properties (see http://www.bennadel.com/blog/1566-using-super-constructors-is-critical-in-prototypal-inheritance-in-javascript.htm).
score: 0

http://stackoverflow.com/a/25147464
downvote count: 1
has comment: http://stackoverflow.com/comment/89166185
score: 119
upvote count: 120
has comment: http://stackoverflow.com/comment/89165490
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25147394
answers question: http://stackoverflow.com/q/25147394
type: Answer
has body: You can use the options when initializing the carousel, like this: // interval is in milliseconds. 1000 = 1 second -&gt; so 1000 * 10 = 10 seconds $('.carousel').carousel({ interval: 1000 * 10 }); or you can use the interval attribute directly on the HTML tag, like this: &lt;div class="carousel" data-interval="10000"&gt; The advantage of the latter approach is that you do not have to write any JS for it - while the advantage of the former is that you can compute the interval and initialize it with a variable value at run time.

http://stackoverflow.com/comment/39284498
type: QuestionComment
type: Comment
has text: Do you have lat and long of the markers? Please explain further.
comment on: http://stackoverflow.com/q/25221146
score: 0

http://stackoverflow.com/a/25097836
has body: The var, variable declaration statement works from the left most expression to the right. The left hand side expression is evaluated first and then the right hand side expression. So, it creates a variable silent and then assigns the result of the comparison to it. Parenthesis would have helped to understand this better, var silent = ('test' == process.env.NODE_ENV); This checks if the environmental variable NODE_ENV is equal to "test" or not. And the boolean result will be used to initialize the newly created variable silent, at runtime.
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39055193
accepted answer of: http://stackoverflow.com/q/25097804
upvote count: 2
answers question: http://stackoverflow.com/q/25097804
has comment: http://stackoverflow.com/comment/39055159

http://stackoverflow.com/comment/39050647
score: 0
has text: What is the value of the `currentIndex` you see? I think you should include more code, so that other people will be able to help you easier.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25095606

http://stackoverflow.com/a/25145683
has comment: http://stackoverflow.com/comment/39143728
score: 0
type: Answer
has body: Once consideration is to change your mathod of tracking the move. I suggest keeping your "move" in one small array, x and y. Set the current move by setting the x or why you wish to modify 'u' move=[-500,0] 'd' move=[500,0] 'l' move=[0,-500] 'd' move=[0,500]
answers question: http://stackoverflow.com/q/25145592

http://stackoverflow.com/q/25160972
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39172489
type: UnansweredQuestion
has body: I am having a page with a form rendered multiple time with diffrent id . I want to call a on load method on it for every form . Please suggest . I am using the below method but its not working OrderTemplate.LoadTile = function(){ $('#producttileform',).on('load',function(){ alert('started'); }); }
has title: Form Load Event In Jquery
has comment: http://stackoverflow.com/comment/39172783
has comment: http://stackoverflow.com/comment/39171215
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39171213
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25161009
has comment: http://stackoverflow.com/comment/39171504
upvote count: 0
has comment: http://stackoverflow.com/comment/39171944
tagged with: javascript
tagged with: jquery
score: -1

http://stackoverflow.com/q/25112079
tagged with: velocity
upvote count: 1
has body: I have trouble creating a JavaScript template in WebStorm, which is using velocity template engine. The final document I am trying to get looks like this: app.service('Name', ['$http', function($http) { var singularUrlbase = apiurl + 'SingularName'; var pluralUrlbase = apiurl + 'PluralName'; this.get = function(id){ return $http.get( singularUrlBase + id ); } } I am trying with this template: #set ( $url1 = 'singularUrlBase + "/" + id') #set ( $url2 = "singularUrlBase + '/' + s.Id") app.service('${NAME}', ['$http', function($http) { var pluralUrlBase = apiurl + '$pluralName'; var singularUrlBase = apiurl + '$singularName'; this.get = function(id) { return $http.get( $url1 ); }; } The problems are: It displays return $http.get ( $url1 ) instead of return $http.get( singularUrlBase + id ); I don't know how to ignore $http, WebStorm is asking me to setup $http variable, but I don't want to.
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25112223
type: Question
has title: WebStorm velocity template engine
tagged with: javascript
tagged with: webstorm
accepted answer: http://stackoverflow.com/a/25112223
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25198653
downvote count: 0
has comment: http://stackoverflow.com/comment/39241889
has comment: http://stackoverflow.com/comment/39241930
type: Answer
has body: The problem was - as I thought - that the request body didn't get through to the server properly. I changed this $.post(url, body, self.results, "json"); to the following $.ajax({ url:url, type:"POST", data:JSON.stringify(body), //necessary for the data to be parsed properly contentType:"application/json; charset=utf-8", //important! dataType:"json", success: function(results){ self.results(results); } }); And now it works as it should. I used this SO question for the answer.
score: 1
answers question: http://stackoverflow.com/q/25185490
upvote count: 1

http://stackoverflow.com/a/25175285
score: 0
has body: To do animation you have to clear the canvas and redraw the rectangles in their new position at each frame, using either setInterval() or setTimeout() or requestAnimationFrame(). The best is to use requestAnimationFrame() for adapation of frames per second.
type: Answer
answers question: http://stackoverflow.com/q/25175192

http://stackoverflow.com/q/25205953
answer count: 0
upvote count: 2
type: UnansweredQuestion
has title: ASP.NET Horizontal drag and scroll for GridView
tagged with: drag
has comment: http://stackoverflow.com/comment/39255608
score: 2
has comment: http://stackoverflow.com/comment/39255466
has body: So, I have this really large GridView inside an Update Panel, and I want to make it horizontally drag-scrollable. I've tried almost everything, the problem is basically the drag function, beacuse the overflow does work. Any suggestion? Is there a way to make it function with simple javascript instead of jQuery or it's just a dream? (http://hitconsultants.com/dragscroll_scrollsync/scrollpane.html this is a perfect example of what I'm searching for, but I can't find the source code.)
type: Question
tagged with: javascript
tagged with: jquery
downvote count: 0
tagged with: asp.net
favorite count: 0
tagged with: gridview

http://stackoverflow.com/comment/39231489
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25193042
has text: Modern browsers will probably garbage collect the interval when it's no longer in use, but it would be good practice to manually clear it anyway
score: 0

http://stackoverflow.com/a/25149950
has comment: http://stackoverflow.com/comment/39151712
has comment: http://stackoverflow.com/comment/39154896
has comment: http://stackoverflow.com/comment/39151867
score: -1
has comment: http://stackoverflow.com/comment/39152207
has comment: http://stackoverflow.com/comment/39152099
upvote count: 0
answers question: http://stackoverflow.com/q/25149819
has comment: http://stackoverflow.com/comment/39151932
has comment: http://stackoverflow.com/comment/39155509
has comment: http://stackoverflow.com/comment/39152892
has body: You can use the following set of functions to add and remove class names. Plain js, no library. // Return true or false if el has className or not function hasClassName (el, cName) { var re = new RegExp('(^|\\s+)' + cName + '(\\s+|$)'); return el &amp;&amp; re.test(el.className); } // Add class to element if it doesn't have it already function addClassName (el, cName) { if (!hasClassName(el, cName)) { el.className = trim(el.className + ' ' + cName); } } // Remove className from element if it has it function removeClassName(el, cName) { if (hasClassName(el, cName)) { var re = new RegExp('(^|\\s+)' + cName + '(\\s+|$)','g'); el.className = trim(el.className.replace(re, '')); } } // Remove leading and trailing whitespace, reduce remaining whitespace to // a single character function trim(s) { return s.replace(/(^\s+)|(\s+$)/g,'').replace(/\s+/g,' '); } To keep zzzzBov happy, here are the same function using a space instead of \s (also removed reliance on the RegExp constructor so should be faster too). I'd recommend sticking with \s as I haven't seen any convincing argument not to, but make you're own choice. // Return true or false if el has className or not function hasClassName (el, cName) { return (' ' + el.className + ' ').indexOf(' ' + cName + ' ') != -1; } // Add class to element if it doesn't have it already function addClassName (el, cName) { if (!hasClassName(el, cName)) { el.className = trimSpaces(el.className + ' ' + cName); } } // Remove className from element if it has it function removeClassName(el, cName) { if (hasClassName(el, cName)) { el.className = trimSpaces((' ' + el.className + ' ').replace(' ' + cName + ' ', ' ')); } } // Remove leading and trailing whitespace, reduce remaining whitespace to // a single character function trimSpaces(s) { return s.replace(/(^ +)|( +$)/g,'').replace(/ +/g,' '); }
type: Answer
has comment: http://stackoverflow.com/comment/39152171
downvote count: 1

http://stackoverflow.com/q/25210649
possible better answer: http://stackoverflow.com/a/25211294
has comment: http://stackoverflow.com/comment/39264632
has comment: http://stackoverflow.com/comment/39264987
has answer: http://stackoverflow.com/a/25211646
has title: Javascript DOM confusion with variables
type: AnsweredQuestion
has body: I have this chunk Javascript of code in a Grails template: &lt;script&gt; $(document).ready(function() { var currentIndex = 0; var allIssues = $('#all-issues'); // The unordered list 'ul' var removeIssues = []; // An array to keep track of issues removed if (allIssues.length) { // If there are issues to be displayed var size = $('#all-issues').size(); allIssues.first().removeClass("display-none"); allIssues.first().addClass("display"); $('#startIndex').html(currentIndex + 1); $('#sizeIndex').html(size); $('#nextRedIssue').on ('click' ,function () { var $li = $('#all-issue.display'); var index = $('#all-issue').index($li) if (index &lt; size) { $li.addClass("display-none"); $li.removeClass("display"); var $nextLi = $('#all-issue').get(index++) $nextLi.removeClass("display-none"); $nextLi.addClass("display"); } }); } }); &lt;/script&gt; Now on second and third line where I define var currentIndex and var allIssues, they keep coming up as undefined (don't even exist) but that problem goes away when I move them outside of the DOM ready clause (but still within the tags of course). I do not understand why this is and would like to know. It also seems like if I just remove the document.ready wrapper, all the variable that were undefined before start being define and work fine. Thanks.
type: Question
has answer: http://stackoverflow.com/a/25211294
answer count: 2
tagged with: javascript
tagged with: jquery
tagged with: grails
score: 0
accepted answer: http://stackoverflow.com/a/25211646

http://stackoverflow.com/q/25150922
has comment: http://stackoverflow.com/comment/39154558
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/43112677
possible better answer: http://stackoverflow.com/a/27385462
tagged with: turbolinks
has title: Trouble using Foundation and Turbolinks with Rails 4
tagged with: zurb-foundation
has answer: http://stackoverflow.com/a/27385462
downvote count: 0
tagged with: jquery
favorite count: 0
has body: I have a header with 2 buttons : Login and Sign up Like this. When I click on one of them, a window appear : window open. For this I use the "Reveal Modal" of foundation (Reveal Modal). My problem : If I click on link for open a new page of my website and try to open / close the Login or Sign up popup, the window is closed but this time the shadow stay (like this) and I need to press F5 for this works again. I use Rails 4 and foundation 5. File _header.html.erb (View Partial) logo Login Sign up Page Test Page Test File application.js //= require jquery //= require turbolinks //= require foundation //= require bxslider/jquery.bxslider.min.js //= require home //= require_tree . $(function() { $(document).foundation(); }); Thank you for your help.
has answer: http://stackoverflow.com/a/25151587
linked to: http://stackoverflow.com/q/21293051
type: AnsweredQuestion
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/39153605
type: Question
accepted answer: http://stackoverflow.com/a/25151587
tagged with: javascript
score: 4

http://stackoverflow.com/comment/39087366
score: 0
type: Comment
type: QuestionComment
has text: Trying to get data out. The tables are first shown when a product is selected from a dropdown list. And my objective is to automate the task of fetching and storing the data on these pages.
comment on: http://stackoverflow.com/q/25108311

http://stackoverflow.com/comment/39038632
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25088777
has text: kdbanman, thanks for the explanation. The source of my confusion is how would one statement know whether the statement preceding it is an async?

http://stackoverflow.com/comment/39063318
type: QuestionComment
has text: This line `sum = sum += i;` looks dodgy
score: 1
comment on: http://stackoverflow.com/q/25102772
type: Comment

http://stackoverflow.com/q/25224729
tagged with: if-statement
answer count: 1
has body: I'm trying to validate a complicated form. In this example I'm checking all radio buttons have a value if ($('input[name=brand]:checked').val()!="" &amp;&amp; $('input[name=section]:checked').val()!="" ) { alert("both selected all is well"); $("a.gobutfton").addClass("ok"); } else{ alert("They are still not all selected"); } even if just one is clicked I get the "both are selected" alert (there for testing) given that I'll have multiple items and form types I can't even get two to behave how I'd imagined they should http://jsfiddle.net/Lrz8vrdd/1/
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25224787
accepted answer: http://stackoverflow.com/a/25224787
has title: Jquery conditional && not showing expected result
has comment: http://stackoverflow.com/comment/39291126
has comment: http://stackoverflow.com/comment/39290379
type: Question
type: AnsweredQuestion

http://stackoverflow.com/a/26431160
has comment: http://stackoverflow.com/comment/41508395
has body: I recently created Boundary, a CSS+JS library to solve problems just like this. Boundary creates elements that are completely separate from the existing webpage's CSS. Take creating a dialog for example. After installing Boundary, you can do this in your content script var dialog = Boundary.createBox({ "id": "yourDialogID" }); Boundary.loadBoxCSS("#yourDialogID", "style-for-elems-in-dialog.css"); Boundary.appendToBox( "#yourDialogID", " submit " ); Boundary.find("#submit_button").click(function() { // find() function returns a regular jQuery DOM element // so you can do whatever you want with it. // some js after button is clicked. }); Elements within #yourDialogID will not be affected by the existing webpage. Hope this helps. Please let me know if you have any question. https://github.com/liviavinci/Boundary
has comment: http://stackoverflow.com/comment/41507071
has comment: http://stackoverflow.com/comment/41508230
has comment: http://stackoverflow.com/comment/41508244
has comment: http://stackoverflow.com/comment/41508355
answers question: http://stackoverflow.com/q/25089832
score: 0
has comment: http://stackoverflow.com/comment/41507113
type: Answer

http://stackoverflow.com/comment/39067687
has text: Sorry, I'm not really that familiar with using Promises, either. But if you're trying to do anything fancy with asynchronous functions, that's usually the solution.
score: 0
comment on: http://stackoverflow.com/q/25104224
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39217609
score: 0
comment on: http://stackoverflow.com/q/25185566
type: Comment
type: QuestionComment
has text: thanks, will learn from that. However making that change means it doesn't work at all.

http://stackoverflow.com/comment/39255648
score: 0
type: Comment
type: QuestionComment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/58968/discussion-between-omar-and-dick-kirkland).
comment on: http://stackoverflow.com/q/25190411

http://stackoverflow.com/q/25087883
tagged with: bootstrap-dialog
type: Question
upvote count: 4
has body: I am trying to write my own method that calls the BootstrapDialog and creates a confirmation popup. If the user selects "confirm" then the method will return true and continue to call the jsf action. The code I have so far: /** * Confirm window * * @param {type} message * @param {type} callback * @returns {undefined} */ BootstrapDialog.confirmation = function(title, message) { var callback = function(result) { console.log(result); return result; }; var b = new BootstrapDialog({ title: title, message: message, closable: false, data: { 'callback': callback }, buttons: [{ label: 'Cancel', action: function(dialog) { typeof dialog.getData('callback') === 'function' &amp;&amp; dialog.getData('callback')(false); dialog.close(); } }, { label: 'Continue', cssClass: 'btn-primary', action: function(dialog) { typeof dialog.getData('callback') === 'function' &amp;&amp; dialog.getData('callback')(true); dialog.close(); } }] }).open(); return callback; }; I am calling the js like so: &lt;h:commandButton type="button" value="Exit" action="myaction" styleClass="btn btn-default" onclick="return BootstrapDialog.confirmation('Data unsaved', 'Are you sure you want to continue');"/&gt; The dialog pops up just fine, the issue is that it is not returning true / false. I have modeled my js after this example: http://nakupanda.github.io/bootstrap3-dialog/
has answer: http://stackoverflow.com/a/25101567
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Bootstrap dialog confirmation onclick confirmation event
score: 4
has answer: http://stackoverflow.com/a/28280324
answer count: 3
possible better answer: http://stackoverflow.com/a/28280324
favorite count: 0
accepted answer: http://stackoverflow.com/a/25101567
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/35877592
type: AnsweredQuestion

http://stackoverflow.com/a/25146871
has body: The property names of your "friends" object are "bill" and "steve". That's what the loop iterates through &mdash; the property names. It doesn't matter what variable name you use. What your loop is currently printing is "bill" and "steve", not "Bill" and "Steve". If you want to log the properties of the objects referenced by the properties of the "friends" object, you have to access those objects. If you wanted the "number" for example: for (var fn in friends) { console.log(friends[fn].number); }
upvote count: 3
answers question: http://stackoverflow.com/q/25146826
type: Answer
has comment: http://stackoverflow.com/comment/39146046
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39147890

http://stackoverflow.com/comment/39234255
type: QuestionComment
score: 1
has text: My initial thoughts: What do you think about this: on resize event, if the size goes beyond screen height, resize it to screen height, and then enable scrollbar. Also maybe call the windows `centerWindowOnScreen` function, im not sure if it resizes the window to stay within screen though, maybe just centers it like the function says.
comment on: http://stackoverflow.com/q/25193331
type: Comment

linechart
tag name: linechart
tags question: http://stackoverflow.com/q/25193911
type: Tag

http://stackoverflow.com/a/25200414
type: Answer
has comment: http://stackoverflow.com/comment/39245392
has body: Use a little regex: var url = 'www.google.com/page/2/more/here/' var match = url.match(/^.+\/.+\/([0-9]+)/); alert(match[1]); Exciting fiddle: http://jsfiddle.net/Grimdotdotdot/f2qot2q3/
has comment: http://stackoverflow.com/comment/39245273
answers question: http://stackoverflow.com/q/25200311
score: 0
has comment: http://stackoverflow.com/comment/39245422

http://stackoverflow.com/comment/39073771
type: QuestionComment
has text: `$txt` is a variable. `$txt=false` you are setting the variable to boolean false.
comment on: http://stackoverflow.com/q/25108219
score: 0
type: Comment

http://stackoverflow.com/comment/39204625
type: AnswerComment
has text: In your example it was local, but there are plenty of other options on that linked Chrome debugging page (which I see two others have also provided).
type: Comment
comment on: http://stackoverflow.com/a/25178888
score: 0

http://stackoverflow.com/a/48558724
type: Answer
answers question: http://stackoverflow.com/q/25152700
has body: There are two problems in your request. You need to supply a data view to $http function. So, data should be new DataView(data) or new Uint8Array(data) etc $http always attempt to send the data as json. You can prevent this if you override the transform function. The transform function is the agent that is responsible for transforming your binary into json. So, you should add transformRequest: [] property to your request. Example: var request = $http({ method: 'PUT', url: 'example.com', data: new Uint8Array(data), headers: {'Content-Type': 'application/octet-stream'}, transformRequest: [], responseType: 'arraybuffer' });
score: 0

http://stackoverflow.com/comment/39010179
type: QuestionComment
has text: so you could do the same there itself. I am not saying you are not allowed.
comment on: http://stackoverflow.com/q/25074213
score: 0
type: Comment

http://stackoverflow.com/a/25531539
has body: why not try a client side share button rather then the server side share button. Server side is only needed if you where going to do extra processing after it renders on the server side. Chances are you don't need to render on the server. &lt;a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank"&gt; Share on Facebook &lt;/a&gt; you could also just go to https://developers.facebook.com/docs/plugins/share-button/ pass in the url you would like to share it will generate example code for you. you can then based on that code, change the url of the shared page on the server side using a variable in its place. This would let you have a reusable code snippet that can be used for every page on your site. &lt;a href="https://www.facebook.com/sharer/sharer.php?u={$pageURLValue}" target="_blank"&gt; Share on Facebook &lt;/a&gt; When you're rendering the page just set {$pageURLValue} to what the current page is. Sorry i don't know rails so the variable tag may be different. replace {$pageURLValue} with what ever the value tag is for rails.
type: Answer
answers question: http://stackoverflow.com/q/25118911
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/39862099
has comment: http://stackoverflow.com/comment/39862232
downvote count: 0

http://stackoverflow.com/q/25115282
upvote count: 5
has answer: http://stackoverflow.com/a/25115342
possible better answer: http://stackoverflow.com/a/25116296
type: Question
has answer: http://stackoverflow.com/a/25115414
linked to: http://stackoverflow.com/q/14478106
score: 5
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: angularjs
answer count: 3
has comment: http://stackoverflow.com/comment/39087597
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/18124665
accepted answer: http://stackoverflow.com/a/25115414
favorite count: 0
has title: AngularJS orderBy array index
has body: I have an ng-repeat that looks like this: &lt;div ng-app="questionnaire"&gt; &lt;div ng-controller="QuestionnaireCtrl"&gt; &lt;div ng-repeat="(key,val) in questions | orderBy:key"&gt; {{questions[key].question}} {{questions[key].answer}} &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; The controller looks like this: (function(){ var app = angular.module('questionnaire',[]); app.controller('QuestionnaireCtrl', function($scope){ $scope.questions = { someItem: { question : 'First question' }, anotherItem: { question : 'Next question here' }, upgradeItem: { question : 'Another one' } }; }); })(); Now the ng-repeat works fine but displays the questions in a random order. I've tried using orderBy but can't get it working. I just want the questions and answers (which aren't currently in the array) to display in order of index (i.e. the order they're in the array). Alternatively I could add another field 'section' to the array and display them filtered in that order. E.g. $scope.questions = { someItem: { question : 'First question', section : '1' }, anotherItem: { question : 'Next question here', section : '1' }, upgradeItem: { question : 'Another one', section : '2' } }; Fiddle example here: http://jsfiddle.net/k52ez/
has answer: http://stackoverflow.com/a/25116296
type: AnsweredQuestion

http://stackoverflow.com/comment/39108471
type: AnswerComment
type: Comment
has text: same thing it always just shows there and no matter what it doesn't hide
comment on: http://stackoverflow.com/a/25126744
score: 0

http://stackoverflow.com/q/25073189
type: Question
has title: Is there any console log in Dreamweaver CC?
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
downvote count: 0
has body: Every time, when I want to test some javascript codes, I need to open a browser window as to checking the console log by using console.log('something need to be tested'); Is there any console log like the one inside Chrome in Dreamweaver CC, to help the web developers to be more convenience from checking out any errors in javascript? Thanks so much if anyone can help!
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25073333
score: 1

http://stackoverflow.com/q/25180085
has title: Get series data from highchart after chart loaded / displayed
tagged with: javascript
tagged with: jquery
has body: How to get the series data from loaded highchart, I want to retrieve on another method. Loading highchart : HTML : &lt;div id="container" style="height: 400px; min-width: 310px"&gt;&lt;/div&gt; JS : function generateHighchart(){ $('#container').highcharts({ chart: { renderTo: 'container', type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4]}, { name: 'John', data: [5, 7, 3]}] }); } function getSeriqalData(){ var Myseries = // how to retrieve series data here for using some other purpose } I have refereed this link but retrieving on same function itself Get Highcharts Series Data after Load I am generating 2 to 5 charts dynamically, after loaded the charts i want to reuse that series value for another purpose.
has comment: http://stackoverflow.com/comment/39212130
score: 0
has comment: http://stackoverflow.com/comment/39323707
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39851701
has comment: http://stackoverflow.com/comment/39208931
has comment: http://stackoverflow.com/comment/39322410
has comment: http://stackoverflow.com/comment/39217523
linked to: http://stackoverflow.com/q/18840397
type: Question
tagged with: highcharts

http://stackoverflow.com/comment/39279173
score: 10
type: QuestionComment
comment on: http://stackoverflow.com/q/25218505
type: Comment
has text: Please, *please*, ***please*** don't store passwords in databases in clear text. It's just such an amazingly bad idea. Instead, store a *one-way hash* of the password (SHA-1, etc.) and to check the password, you hash what they give you and compare it with the hash you're holding. That way, a compromised database doesn't reveal everyone's passwords.

http://stackoverflow.com/comment/39203809
type: AnswerComment
comment on: http://stackoverflow.com/a/25178388
has text: No, he needs to iterate through the returned array as well. Otherwise it still won't work.
type: Comment
score: 2

http://stackoverflow.com/q/25170618
downvote count: 0
has body: So the basics of the project that I'm working on are as follows: I've got my main application that is coded in C++ and this is where I have created a class that utilizes CHtmlView; I've called the class CHtmlEditor. Inside of CHtmlEditor I have a function defined below BOOL CHtmlEditor::CreateHtmlEditor(CRect rRectHtml, CWnd* wParentWindow, DWORD dwStyle, UINT id) { BOOL bRetVal = CHtmlView::Create(NULL, "HTML Editor", dwStyle, rRectHtml, wParentWindow, id); LoadFromResource(_T("HTMLEDITORFRAME.HTML")); return bRetVal; } This does work. The html file is loaded However I have two javascripts files defined inside of the html file using the script tags and when I try to access the functions in that javascript from inside of the C++ the function fails to execute Here's what the head of my html file looks like: &lt;head&gt; &lt;link href="htmleditor.css" rel="stylesheet" type="text/css" /&gt; &lt;script type="text/javascript" src="ckeditor/ckeditor.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="functions.js"&gt;&lt;/script&gt; &lt;/head&gt; To execute my javascript inside of my C++ I have a function that's defined below bool CHtmlEditor::CallJScript(IDispatch* pDocument, const CString strFunc, const CStringArray&amp; paramArray, CComVariant&amp; vOut) { CComQIPtr&lt;IHTMLDocument2&gt; pHtmlDoc = pDocument; if (pHtmlDoc == NULL) ... //Getting Java Script object CComPtr&lt;IDispatch&gt; spScript; HRESULT hr = pHtmlDoc-&gt;get_Script(&amp;spScript); ATLASSERT(SUCCEEDED(hr)); if (!SUCCEEDED(hr) || spScript == NULL) ... //Find dispid for given function in the object CComBSTR bstrMember(strFunc); DISPID dispid = NULL; hr = spScript-&gt;GetIDsOfNames(IID_NULL, &amp;bstrMember, 1, LOCALE_SYSTEM_DEFAULT, &amp;dispid); if (FAILED(hr)) { CT2A ascii(strFunc); std::string strFunc2 = ascii.m_psz; ... } const int arraySize = paramArray.GetSize(); //Putting parameters DISPPARAMS dispparams; memset(&amp;dispparams, 0, sizeof dispparams); dispparams.cArgs = arraySize; dispp…
type: Question
upvote count: 2
tagged with: javascript
has title: When loading an html file through LoadFromResource that has javascript files defined in the html the javascript fails to execute inside of C++
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
tagged with: c++
answer count: 0
type: UnansweredQuestion
score: 2

http://stackoverflow.com/a/25168365
has body: Simple concept of your question. HTML GO! JS $("#go").click(function() { var x; x = document.getElementById("WCPO_Pesquisa").value; document.getElementById("resultado").innerHTML = x; }); EDIT DEMO 1 - using form tags
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39218059
answers question: http://stackoverflow.com/q/25168215
has comment: http://stackoverflow.com/comment/39345162
has comment: http://stackoverflow.com/comment/39219678
has comment: http://stackoverflow.com/comment/39261082
has comment: http://stackoverflow.com/comment/39258490

http://stackoverflow.com/q/25135088
answer count: 1
tagged with: javascript
score: 0
has body: I am trying to show a many line charts in one chart. What's happening is that, instead of showing them all at the same time, you need to disable one to show another one. Here is my jsfiddle; What do I need to change in my code so it shows all of the graphs together? Thanks folks
type: AnsweredQuestion
tagged with: nvd3.js
tagged with: d3.js
has answer: http://stackoverflow.com/a/25142100
accepted answer: http://stackoverflow.com/a/25142100
type: Question
has comment: http://stackoverflow.com/comment/39128874
has comment: http://stackoverflow.com/comment/39128800
has title: multi line chart nvd3 not shown properly

http://stackoverflow.com/comment/39142571
type: Comment
has text: I think your capture groups are in the wrong place, though: `^((?:\d{2}){1,5})$` (one capture group for the whole thing).
comment on: http://stackoverflow.com/a/25145232
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39104342
score: 0
comment on: http://stackoverflow.com/q/25124476
has text: Are the attributes of the `_on` and `_show` classes always there (default?) If so why not just attach those to the ID, then only toggle the `_hide` and `_off` classes.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39504429
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25212598
has text: thanks for suggesting me "Wireshark",great open source software,and web-client is resolving request to ip4 no ip6 request ,i can surely say this because,After placing ip6 filter in wireshark and reconnect to xmpp server(ejabberd),there was no result regarding "localhost:5280/http-bind"(means no request resolving ip6)!!!!!
type: AnswerComment

http://stackoverflow.com/a/25158291
answers question: http://stackoverflow.com/q/25157788
downvote count: 0
has body: It's not possible and even if it was, it would be an undesirable "solution" because the data can be seen using other methods. The solution is to revise your code to ensure you only send data to the user that they are authorised to see. Don't dump all user data in the AJAX response.
has comment: http://stackoverflow.com/comment/39167415
type: AcceptedAnswer
score: 7
type: Answer
has comment: http://stackoverflow.com/comment/39166820
has comment: http://stackoverflow.com/comment/82355273
accepted answer of: http://stackoverflow.com/q/25157788
upvote count: 7

http://stackoverflow.com/q/25083177
has answer: http://stackoverflow.com/a/25085576
upvote count: 1
has comment: http://stackoverflow.com/comment/39029056
type: Question
has title: form validation in ie11 with angular
score: 1
tagged with: javascript
has body: In my form, I have a field that is required using Angular's form validation. It looks something like: &lt;form id="project" name="formProject"&gt; &lt;input id="projectName" name="projectName" ng-model="projectForm.projectName" placeholder="Name" required /&gt; &lt;div ng-show="!formProject.projectName.$pristine &amp;&amp; formProject.projectName.$error.required&gt; A project name is required. &lt;/div&gt; The problem is, once the user puts the cursor in the input box, the error message immediately shows. It doesn't wait for the user to start typing. This is not an issue in Firefox or Chrome, just IE. Is there an easy work around?
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39028397
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39029601
has comment: http://stackoverflow.com/comment/39029163
has comment: http://stackoverflow.com/comment/39030487

watir-webdriver
tags question: http://stackoverflow.com/q/25196646
tag name: watir-webdriver
type: Tag

http://stackoverflow.com/comment/39120586
type: Comment
has text: it working i have set 0 and and cleared all cache from var/cache nice answer but what is the issue with js if i merge it
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25133182

http://stackoverflow.com/comment/39281504
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25219662
type: AnswerComment
has text: any advantages / disadvantages between this solution and idans?

http://stackoverflow.com/comment/39286439
has text: Updated the question, reduced the unnecessary code as much as possible. Checkout update 5.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25106621
score: 0

http://stackoverflow.com/comment/39100659
type: Comment
comment on: http://stackoverflow.com/a/25122526
type: AnswerComment
has text: Best solution so far, but I do not want to alarm the user with invalid class before they have done anything. Is there a work around for that?
score: 0

http://stackoverflow.com/comment/39119352
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25121176
type: AnswerComment
has text: My primary idea was, that the user select the option in the dropdown and add the parameter as text. Via Javascript I want only write the checkbox with the value from the menu and the textfiled with the parameter.

http://stackoverflow.com/comment/39036296
type: Comment
has text: Better yet, make a jsfiddle
comment on: http://stackoverflow.com/q/25087930
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39207740
type: AnswerComment
score: 0
type: Comment
has text: Haha - not the down vote so much as the simplicity and obviousness of the answer...But thank you for your kind words anyway :)
comment on: http://stackoverflow.com/a/25180478

apache
tag name: apache
tags question: http://stackoverflow.com/q/25166043
tags question: http://stackoverflow.com/q/25077561
tags question: http://stackoverflow.com/q/25079836
tags question: http://stackoverflow.com/q/25075811
tags question: http://stackoverflow.com/q/25221515
tags question: http://stackoverflow.com/q/25086082
tags question: http://stackoverflow.com/q/25103039
tags question: http://stackoverflow.com/q/25210183
tags question: http://stackoverflow.com/q/25205899
type: Tag
tags question: http://stackoverflow.com/q/25121464

http://stackoverflow.com/comment/39060393
has text: Thanks for your suggestion, this won't work because I have no idea what text is going to be before the numeric characters as these are user input. So if a user has Obj123 Obj111 and Object123 Object111 this wouldn't work.
comment on: http://stackoverflow.com/a/25101094
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25116609
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39164387
type: Answer
has comment: http://stackoverflow.com/comment/39117447
score: 1
accepted answer of: http://stackoverflow.com/q/25114339
upvote count: 1
answers question: http://stackoverflow.com/q/25114339
has comment: http://stackoverflow.com/comment/39117559
has body: I've found the logs are not in order when I run things too, could be a timing issue or something, ignore the order when they're in the same second, I have done other tests to confirm things really do run in order on my own Cloud Code... had me completely confused for a while there. The issue you're having is that log #3 is never being hit... try tracing ACLinJSON on it's own to see the actual structure. When you append it to a string it outputs [object Object] as you have seen, so do console.log(ACLinJSON); instead. Here's the structure I've seen: { "*":{"read":true}, "Administrator":{"write":true} } Based on that I would expect your loop to work, but it may have a different level of wrapping. UPDATE: Turns out the issue was looking for the string "true" instead of a boolean true, thus the fix is to replace the following line: // replace this: if (ACLinJSON[key].read == "true") { if (ACLinJSON[key].read == true) {
has comment: http://stackoverflow.com/comment/39117378
has comment: http://stackoverflow.com/comment/39090198

http://stackoverflow.com/a/25086014
score: 0
type: AcceptedAnswer
has body: No need for start... {{key}} {{innerValue}}
answers question: http://stackoverflow.com/q/25085932
type: Answer
accepted answer of: http://stackoverflow.com/q/25085932

http://stackoverflow.com/comment/39157960
has text: still it's not coming..pls chk the same URL
type: AnswerComment
comment on: http://stackoverflow.com/a/25136364
score: 0
type: Comment

http://stackoverflow.com/a/25143515
has body: Looks like your problem is going to be here name: name+'rOptions', id: name+'rOptions' + (i+1), value: splitCodeValue[0], title: splitCodeValue[1], class:'one' &lt;---- You need to wrap class in quotes "class" :'one'
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39139292
accepted answer of: http://stackoverflow.com/q/25143413
upvote count: 2
answers question: http://stackoverflow.com/q/25143413

http://stackoverflow.com/comment/101196387
score: 0
type: Comment
comment on: http://stackoverflow.com/a/29359262
has text: you need only to check if this day exceeds the selected month and then subtract 7days ;-) then this solution is perfectly fine.
type: AnswerComment

http://stackoverflow.com/comment/39205715
score: 0
type: Comment
has text: And according to these docs. http://webapplog.com/tutorial-node-js-and-mongodb-json-rest-api-server-with-mongoskin-and-express-js/
type: QuestionComment
comment on: http://stackoverflow.com/q/25179337

http://stackoverflow.com/a/25074386
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25073102
answers question: http://stackoverflow.com/q/25073102
has body: I have done it in a new fiddle check out this http://jsfiddle.net/u5LUe/1/ i have used the stop event on the resizing element and i find that the calculation that you are using for the font size returns a big value and it is not correct so do some other calculation for the font size and do the small change in the code
type: AcceptedAnswer

http://stackoverflow.com/comment/39054216
comment on: http://stackoverflow.com/q/25097737
has text: Do you have something in the console ? or maybe 404 errors on the dev tools network tab ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25226433
has comment: http://stackoverflow.com/comment/39293628
type: Question
score: 0
has comment: http://stackoverflow.com/comment/39293837
answer count: 1
has comment: http://stackoverflow.com/comment/39293696
has comment: http://stackoverflow.com/comment/39293920
has title: Formatting an array of Javascript data
has answer: http://stackoverflow.com/a/25226702
has comment: http://stackoverflow.com/comment/39293783
tagged with: javascript
has body: This code is for a web chat. I'm looking to have this code inspect each word, and then format only the twitter @joeblow username as twitter profile link. Simply put, I'm parsing chat data to turn the text into twitter links, hashtags,a /command or just leave it as text if it's not any of these three. Below is my debug code. I'm trying to learn how to use apply or call and don't completely understand them. As far as the code, it should take in the context array, and apply the format function to each item in the array. Please note this is my first time trying to use apply() and I'm not sure what I'm doing wrong. When I run format.apply(undefined,context('@joeblow is my username')); it just returns [twitter]@joeblow. It should be printing something like [twitter]@joeblow [default]is [default]my [default]username. In a real world scenario, @joeblow would be HTML that links to @joeblows profile (the pseudo code below is just for brevity). I want the format() function to apply to every word passed. The context() function just takes the passed in data and makes it into an array. I know I could write a for loop, but I'm trying to learn how to use apply()/call(). function preformat(message) { format_message = { '#': 'hashtag', '/': 'command', '@': 'twitter' } var char = message.charAt(0); var type = format_message[char]; if (type) { return type; } else { return 'default'; } } function context(input) { var message = []; var words = input.split(' '); for (var i=0;i&lt;words.length;i++) { message[i] = words[i]; } return message; } function format(message) { var type = preformat(message); format.types = { 'command': function(type, message) { return '[command]' + message; }, 'hashtag': function(type, message) { return '[hashtag]' + message; }, 'twitter': function(type, message) { return '[twitter]' + message; }, 'default': function(type, message) { return '[default]' + message; } } var parse = format.types[type]; return parse(type,message); } I'm executing this using: format.appl…
has comment: http://stackoverflow.com/comment/39293750
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25226702
has comment: http://stackoverflow.com/comment/39294017

http://stackoverflow.com/comment/39107042
type: QuestionComment
has text: exec will run in a special envo, PATH will not work, you must directly reference the program in its location
comment on: http://stackoverflow.com/q/25125735
score: 1
type: Comment

http://stackoverflow.com/comment/39054940
comment on: http://stackoverflow.com/a/25097808
score: 0
type: Comment
has text: Yeah! It works! For some reason, it doesn't work for me. Maybe the problem is with my code, but you've earned a +1 anyways. Thanks.
type: AnswerComment

http://stackoverflow.com/q/25212405
favorite count: 0
has body: In my program, I get the following javascript alert I am able to switch to this alert. I am able to get the text and click the OK and Cancel buttons. The issue I am having is when using assertequals to verify the alert text. I am using the below code String Test = driver.switchTo().alert().getText(); System.out.println(Test); Assert.assertEquals(Test, "You are sharing your report with \"Limited Overall-10000 \".\n\nThis will share your report with \"179\" people. Continue?"); System.out.println correctly prints the text of the alert box. However, I get the below error when trying to use assertequals. Its strange because these same steps work for other javascript alerts on the page. org.openqa.selenium.WebDriverException: [JavaScript Error: "e is null" {file: "file:///C:/Users/IBM_AD~1/AppData/Local/Temp/anonymous2086351268768311654webdriver-profile/extensions/fxdriver@googlecode.com/components/command_processor.js" line: 7716}]
has answer: http://stackoverflow.com/a/26753574
upvote count: 2
type: UnansweredQuestion
score: 1
tagged with: java
tagged with: selenium
downvote count: 1
has answer: http://stackoverflow.com/a/26756637
type: Question
has comment: http://stackoverflow.com/comment/39268056
has comment: http://stackoverflow.com/comment/39267776
has comment: http://stackoverflow.com/comment/39268020
tagged with: javascript
has comment: http://stackoverflow.com/comment/39267979
has title: Getting JavaScript Error: "e is null" when using assert to verify javascript alert text
answer count: 2

http://stackoverflow.com/a/25140823
answers question: http://stackoverflow.com/q/25139922
type: Answer
score: 1
upvote count: 1
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25139922
has body: $data[] = array('column-1' =&gt; '&lt;form action="index.php/index/sign" method="post" id="form1"&gt; &lt;input type="checkbox" name="vehicle[]" value="Bike"&gt;I have a bike&lt;br&gt; &lt;input type="checkbox" name="vehicle[]" value="Car"&gt;I have a car&lt;br&gt; &lt;--Start: Add this line to --&gt; &lt;input type="hidden" name="actionVal" id="actionVal" value=""&gt; &lt;--End: Add this line to --&gt;', 'column-2' =&gt; '&lt;img src="' . $iconPath . '" /&gt; image #', ); &lt;script type="text/javascript"&gt; function submitform(){ &lt;--Start: Add this line to --&gt; document.getElementById('actionVal').value = 'add'; &lt;--End: Add this line to --&gt; document.forms["form1"].submit(); } function submitform1() { &lt;--Start: Add this line to --&gt; document.getElementById('actionVal').value = 'delete' &lt;--End: Add this line to --&gt; document.forms["form1"].submit(); } &lt;/script&gt; //PHP if($_POST['actionVal']=='add') { // add } else if($_POST['actionVal']=='delete') { // delete }

http://stackoverflow.com/q/25190211
score: 0
has comment: http://stackoverflow.com/comment/39226709
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has title: Storing HTML of a Dynamically Created Element in Database Using PHP
accepted answer: http://stackoverflow.com/a/25190820
has comment: http://stackoverflow.com/comment/39228108
tagged with: php
has comment: http://stackoverflow.com/comment/39226114
type: AnsweredQuestion
has body: I am creating a page where a user can create a table. They can add rows, data, and styling. Whenever the user adds rows or data it's appended to an originally blank HTML table element that is shown on the page This acts as a preview. The user can then style the preview, and that styling is also added onto the table and its children elements. I want to be able to take the resulting HTML code and place it into the database, preferably using PHP, when the user hits the save button. This is my PHP code: if(isset($_POST['submitted'])){ $prob = false; if(!empty($_POST['title']) && !empty($_POST['type']) && !empty($_POST['name'])){ $new_title = mysql_real_escape_string(trim($_POST['title'])); $new_type = mysql_real_escape_string(trim($_POST['type'])); $new_name = mysql_real_escape_string(trim($_POST['name'])); $new_table = '' ; $new_id = $id; }else{ echo ' Enter values for all fields '; $prob = true; } if(!$prob){ $q = "INSERT INTO tables (id , active , type , name , title , html_code) VALUES ('$new_id' , 'Y' , '$new_type' , '$new_name' , '$new_title' , '$new_table')"; if(@mysql_query($q)){ echo ' Success! '; }else{ echo ' '.mysql_error().' '; } } } I want to set the HTML code for the table to the variable $new_table. So far I've tried $new_table = $_POST['preview']; but I understand now why that doesn't work. I've also tried to use ob_start and ob_get_contents but that doesn't work either. I am fairly new to PHP, so there may be something fairly simple that I'm missing. So, my question is: how would I go about storing the HTML of a dynamically created element into a database using PHP? Any and all help is greatly appreciated! Thank you.
has answer: http://stackoverflow.com/a/25190820
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39054509
comment on: http://stackoverflow.com/q/25097867
type: Comment
type: QuestionComment
has text: can u show the function you are using to generate this html
score: 0

http://stackoverflow.com/comment/39294492
has text: i updated the fiddle. i just added a single select event on the TreePanel - which will be fired right after our click event ;) Now you can access the selected record in this function.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25201674

http://stackoverflow.com/comment/39289805
type: Comment
type: QuestionComment
has text: *"...setting a variable that will display in a dig with the values of..."* Say what now?
comment on: http://stackoverflow.com/q/25224367
score: 0

http://stackoverflow.com/comment/39275340
comment on: http://stackoverflow.com/q/25216407
type: Comment
type: QuestionComment
has text: a local variable inside createEntity function should do the trick
score: 1

matlab
tags question: http://stackoverflow.com/q/25104314
type: Tag
tag name: matlab

http://stackoverflow.com/a/25217544
has body: Here is a JS Fiddle Yes, you can not use just numbers as a function names. And also, wrap it in the head tag, define your function before calling it in your html. function myFunction() { alert("10/63"); } function myFunction2() { alert("13/10"); } function myFunction3() { alert("37/30"); } function myFunction4() { alert("4/21"); }
has comment: http://stackoverflow.com/comment/39277419
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25217421
has comment: http://stackoverflow.com/comment/39277516

http://stackoverflow.com/comment/39255538
has text: You sir are a legend @Gaby aka G. Petrioli
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25203390

http://stackoverflow.com/comment/39135572
type: AnswerComment
has text: A couple questions: first, I'm used to java where each time a method is called, the variable values in that method are reset. That doesn't hold true in Javascript? Also, why the triple equal signs? Since we are dealing with primitives, there would be no issue with just a double equals right?
comment on: http://stackoverflow.com/a/25141501
type: Comment
score: 0

http://stackoverflow.com/q/25144816
upvote count: 1
has comment: http://stackoverflow.com/comment/39141927
linked to: http://stackoverflow.com/q/302122
favorite count: 0
linked to: http://stackoverflow.com/q/25310701
tagged with: input
possible better answer: http://stackoverflow.com/a/25144985
tagged with: php
has comment: http://stackoverflow.com/comment/39142157
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: forms
has title: Adding square brackets to either side of the text on an input form with a onkeyup event?
type: Question
has answer: http://stackoverflow.com/a/25144975
accepted answer: http://stackoverflow.com/a/25144975
has answer: http://stackoverflow.com/a/25144985
tagged with: javascript
has body: I want square brackets to automatically appear on either side of a string of text when entered in the text field of an input form. The result needs to coincide with an onkeyup event. Here's a snippet of code from the .php file: $generator .= ' '; $generator .= 'Enter your text:'; $generator .= ' '; $generator .= '&nbsp Font size: &nbsp px '; Is this possible to do with inline Javascript?
answer count: 2
tagged with: inline

http://stackoverflow.com/a/25121799
answers question: http://stackoverflow.com/q/25121371
has body: What I'm getting from your story is that you load dynamic content with a div.tabswrap and whenever that new content is loaded, you want to execute the tabs() function, correct? The reason why it doesn't work is you're trying to bind to an element that does not yet exist. You can only bind to events on elements that exist. Also the load event is not triggered when you insert a node into the dom, so that would not work even after the dom is updated. Try something like: &lt;script&gt; function tabs() { // something } function loadNewContent() { // get dynamic content from somewhere $('.content').html(newContent); if ($('.tabswrap', $(newContent)).size() &gt; 0) { tabs(); } } &lt;/script&gt;
has comment: http://stackoverflow.com/comment/39115962
accepted answer of: http://stackoverflow.com/q/25121371
upvote count: 1
has comment: http://stackoverflow.com/comment/39108375
score: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39099964
type: Answer

http://stackoverflow.com/comment/51669236
comment on: http://stackoverflow.com/a/25172729
type: AnswerComment
has text: `$viewChangeListeners` are only triggered when the `$modelValue` is changed. When the `ngModel` is invalid, the `$modelValue` becomes `undefined` and the `$viewChangeListeners` do not fire anymore. However, the `$viewValue` is still being updated on every change. Any suggestions how to watch the `$viewValue`?
type: Comment
score: 6

http://stackoverflow.com/comment/39191512
has text: Well there's nothing wrong with `.getElementsByClassName()`, but the browser has to work at it so doing it afresh with every iteration of the loop just to get a single element is terribly inefficient. Since you're already using jQuery, you might as well go all-in. All I did was move the JavaScript to the body (jsfiddle setting) and add a "quantity" element to the page because it was missing.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25171125

http://stackoverflow.com/comment/39011624
type: QuestionComment
has text: Do you have errors in the console ? (dev tools -> console)
comment on: http://stackoverflow.com/q/25075172
score: 0
type: Comment

http://stackoverflow.com/comment/39270287
type: QuestionComment
comment on: http://stackoverflow.com/q/25213732
type: Comment
has text: In Chrome Dev tools: `Sources` -> `Event Listener Breakpoints` -> `Mouse` -> `click` .
score: 0

http://stackoverflow.com/comment/39040563
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25090141
has text: The bigger question may be how to do this on parse.com - their docs indicate this is how their default routing should work but the OP hasn't been able to do that yet.
type: AnswerComment

http://stackoverflow.com/a/25226952
score: 0
has comment: http://stackoverflow.com/comment/39294911
has comment: http://stackoverflow.com/comment/39295093
answers question: http://stackoverflow.com/q/25226857
has comment: http://stackoverflow.com/comment/39295016
has comment: http://stackoverflow.com/comment/39294732
type: Answer
has comment: http://stackoverflow.com/comment/39294885
has body: There is a syntax error, the last closing ) is missing in the bottom script block. The controller name is mismatch, the MainCtrl is registered but the ctrl is used in ng-controller. In the first ng-repeat="item in list", it loop over $scope.list but the data is in $scope.item. Plunker: http://plnkr.co/edit/crEDsbbN5e7wKVKbFPlZ?p=preview
has comment: http://stackoverflow.com/comment/39294658
has comment: http://stackoverflow.com/comment/39294695
has comment: http://stackoverflow.com/comment/39294948
has comment: http://stackoverflow.com/comment/39294767
has comment: http://stackoverflow.com/comment/39294702

http://stackoverflow.com/q/25144682
downvote count: 2
has title: How to validate an input text value in JavaScript?
has comment: http://stackoverflow.com/comment/39141694
type: Question
score: -2
has comment: http://stackoverflow.com/comment/39142138
tagged with: javascript
upvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25144712
has body: I need my form to be submitted only if a user enters number 11 into a texbox. If the box is empty or the input is other than 11, the form should not be submitted. Here is how I try to achieve that: function validate(form_objmath) { if (test_required &amp;&amp; !test_required(form_objmath)) { return false; } var obj3 = document.getElementById("Result"); if (!obj3 || obj3.value != 11) { alert("The result is incorrect"); return false; } return true; } For some reason, it gives me "The result is incorrect" even when I enter 11 into the textbox and the form doesn't get submitted. Please advise. Thank you!

http://stackoverflow.com/a/25128404
has body: Can you provide us with a screenshot of your Script record setup? Also since you are using a client side script, you don't need to use the pageInit event for adding a custom button. There is a 'Buttons' subtab, under the 'Scripts' tab when you create the Script record in NetSuite. This subtab is next to the 'Libraries' subtab. There are two columns here, 'Label' and 'Function'. So in your case, you can just put 'Validate VSOE' in the Label field and vsoeValidate in the Function field. Please note that if you do it this way, the button will only be shown when you are creating or editing a record.
has comment: http://stackoverflow.com/comment/39143346
has comment: http://stackoverflow.com/comment/39133794
has comment: http://stackoverflow.com/comment/39133243
score: 0
answers question: http://stackoverflow.com/q/25120235
type: Answer
has comment: http://stackoverflow.com/comment/39142729
has comment: http://stackoverflow.com/comment/39149871

tooltip
tags question: http://stackoverflow.com/q/25119796
type: Tag
tags question: http://stackoverflow.com/q/25125062
tag name: tooltip

http://stackoverflow.com/q/25189036
has body: I am trying to do a Post request to my NodeJs server using PostMan and the terminal, but it seems the request never ends. I have a website and a form, and I try to send the form by using Ajax. I do the same thing in other file except the fact that the other file does not contain a form and the post works. This is my html form: Create a Team Choose a Charity Enter Team Member's Email Upload your Company or Team's Logo Click the charity's name to select who your team will run for! This is my javascript ajax to send the form to the server: function createTeam(){ var teamN= document.getElementById("teamName").value; var companyName =document.getElementById("companyName").value; //maybe not, tae it off. var charityName = document.getElementById("charityName").value; if((teamN.trim() === "") || (companyName.trim() === "") || (charityName.trim() === "")) { alert("You did not fill the team Name or companyName, Please enter with a name"); }else{ var sessionID = $.cookie("sessionID") $.ajax({ type: "POST", url: "http://xxx.xxxx.xxx.x:9000/team/?sessionID="+sessionID, data: $("#create_team_form").serialize(), success: function(msg) { alert("team supposedly saved") $.cookie("teamID",msg.teamID) $.cookie("sessionID",sessionID) //window.location.href='teamCreated.html' } }); } } It goes inside the if, but the else is just slow. I don't know if the data is being sent. I could not save a document so far in my mongodb. This is my team.js in the server: var express = require('express'); var sha1 = require('sha1'); var router = express.Router(); var sessionOBJ = require('./session'); var mongoose = require('mongoose'); var Schema = mongoose.Schema; router.all('*', function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header("Access-Control-Allow-Headers", "X-Requested-With"); res.header("Access-Control-Allow-Methods", "PUT, GET,POST"); }); var teamSchema = new Schema({ teamID: String, teamName: String, teamDescription: String, teamAdminID: String, teamLink: St…
score: 1
type: Question
tagged with: mongodb
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/29636024
tagged with: http-post
tagged with: node.js
accepted answer: http://stackoverflow.com/a/29636024
upvote count: 1
has title: Super slow post request to NodeJS server
type: AnsweredQuestion

http://stackoverflow.com/comment/39189319
type: AnswerComment
has text: Oh, and the grid would represent a width:20 and height:200 in the fiddle's case .. so 3,6 would equate to pixel locations 60 and 1200
type: Comment
comment on: http://stackoverflow.com/a/25150055
score: 0

http://stackoverflow.com/comment/39267864
type: AnswerComment
has text: The 'source' part is redundant, since the selector also contains an id (#...), which is (or should be) unique in the page. Only using id gives better performance (webbrowsers can then use the native document.getElementById() call): $('#infrSound' + this.id)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25212251

http://stackoverflow.com/a/25108375
answers question: http://stackoverflow.com/q/25108341
upvote count: 1
score: 1
downvote count: 0
has body: It is because you are printing out the whole object. If you only want to print out the text you should do: alert(helpQuestion.description); And a fiddle: http://jsfiddle.net/rLFvM/
type: Answer

http://stackoverflow.com/q/25190753
upvote count: 1
tagged with: directive
has comment: http://stackoverflow.com/comment/39228392
type: Question
has comment: http://stackoverflow.com/comment/39230417
tagged with: testing
has body: I'm currently attempting to test an angular directive using jasmine. Here is a simplified example of what the directive under test looks like: angular.module('app', []).directive('testDirective', [ function() { return { restrict:'A', scope: { myAttr: '@' }, link: function(scope, element, attrs) { element.html(scope.myAttr); scope.$watch('myAttr', function(n, o) { if(n !== o) { element.html(n); } }); } }; } ]); Using an isolate scope, it is one-way binding the value of the attribute data-my-attr to the scope value of myAttr and then watching the value of myAttr for any change, at which time it updates the displayed element. Once again, this code has been heavily modified for clarity, so forgive the highly contrived example. The test is compiling an element containing this directive, verifying that the initial html of the element is set correctly (it is) and then changing the value of the attribute and expecting the corresponding change in the element to occur (it is not). This is a simplified version of the test code. it('fires myAttr watch', function() { var body = angular.element('body'); var template = angular.element('&lt;div id="testid" data-test-directive data-my-attr="initialValue"/&gt;'); body.append([template]); compile(template)(scope); scope.$digest(); expect(angular.element('#testid').text()).toEqual('initialValue'); template.attr('data-my-attr', 'newValue'); scope.$digest(); expect(angular.element('#testid').text()).toEqual('newValue'); }); Although this directive works as expected when used in production, under test it seems that updating the value of the attribute doesn't cause the corresponding scope value to update, which results in the watch never firing. Why doesn't the value on the scope get updated, and why does this only happen in tests? Here is a plunkr demonstrating the problem http://plnkr.co/edit/MmS1X2zrPZyGSUIVUsDg?p=preview Any ideas?
tagged with: javascript
has answer: http://stackoverflow.com/a/25191597
has comment: http://stackoverflow.com/comment/39229180
accepted answer: http://stackoverflow.com/a/25191597
answer count: 1
downvote count: 0
tagged with: jasmine
favorite count: 0
tagged with: angularjs
has title: Change in one-way bound directive attribute during test not updating directive scope
has comment: http://stackoverflow.com/comment/39229073
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39229951
score: 1

random
tags question: http://stackoverflow.com/q/25119793
tags question: http://stackoverflow.com/q/25177647
tags question: http://stackoverflow.com/q/25122102
tags question: http://stackoverflow.com/q/25174276
tag name: random
tags question: http://stackoverflow.com/q/25193110
tags question: http://stackoverflow.com/q/25209688
type: Tag

http://stackoverflow.com/comment/39126190
has text: @TrueBLueAussie prev/next button does not work correctly. Unfortunately each press is displayed, and then hiding the last slide
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25134903
score: 0

http://stackoverflow.com/a/32079696
type: Answer
has body: It worked for my needs: moment().locale('en').format('L'); moment().locale('pt-br').format('L'); Just change the format for your needs. The Documentation of the moment is great. http://momentjs.com/
score: 0
answers question: http://stackoverflow.com/q/25179377

http://stackoverflow.com/a/25194649
score: 0
has comment: http://stackoverflow.com/comment/39234420
type: Answer
has comment: http://stackoverflow.com/comment/39263433
has comment: http://stackoverflow.com/comment/39261337
has comment: http://stackoverflow.com/comment/39234779
answers question: http://stackoverflow.com/q/25194606
has comment: http://stackoverflow.com/comment/39234648
has comment: http://stackoverflow.com/comment/39234700
has comment: http://stackoverflow.com/comment/39234633
has body: Try: $("body").append($("&lt;script&gt;", { text: "//Some code" })); The &lt;/script&gt; in your string is being interpreted as the end of the Javascript that contains your jQuery code. The problem is in the code in the script body. This line has quoting problems: document.write('&lt;img src='https://extended-validation-ssl.verisign.com/dot_clear.gif'/&gt;'); it should be: document.write('&lt;img src=\\'https://extended-validation-ssl.verisign.com/dot_clear.gif\\'/&gt;'); I think it's also necessary to double the backslashes in this line: document.write('&lt;a HREF=\''+u1+'\' tabindex=\'-1\' onmousedown=\'return mouseDown(); \' target=\'VRSN_Splash\'&gt;&lt;IMG NAME=\'seal\' BORDER=\'true\' SRC=\''+seal_gif_url+'\' oncontextmenu=\'return false; \'&gt;&lt;/A&gt;'); You need to escape all the slashes because this Javascript is inside a quoted string in the original script.

http://stackoverflow.com/a/25074176
answers question: http://stackoverflow.com/q/25074099
has body: You need to stop the event from bubbling. It's simple. $("a").click(function (e) { e.stopPropagation(); }); in place of: //this doesn't work :-( $(".nav &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; ul &gt; li &gt; a").click(function(){ return true; });
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39011372
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25074099

http://stackoverflow.com/comment/39276236
has text: Sounds interesting! I could imagine you pass your plugin a configuration object of image->marker pairs. E.g., var $markers = $.markers({ '#pos_marker': '#pos', ... }); Under the hood you handle the event binding and positioning. Perhaps you provide an external api to control when they're shown/hidden: $markers.show();
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25216819

http://stackoverflow.com/comment/97443109
type: Comment
score: 1
has text: Can some one supply the HTML that would match the JS solution above, I'm struggling to get this to work with BS3?
type: AnswerComment
comment on: http://stackoverflow.com/a/25089383

http://stackoverflow.com/comment/39228523
score: 0
has text: @RahilWazir the Alert Shows for $('#geofenceId').val() as 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25191009

http://stackoverflow.com/q/25162219
type: Question
tagged with: polymer
tagged with: arrays
tagged with: javascript
has title: Pass Javascript Array to Polymer 'post-service' html
score: 0
answer count: 2
has body: I'm still new at Polymer and I'm slowly learning how to use Polymer by modifiying the examples that Google provided. But I'm encountering a bit of an issue. I have a Array in Javascript: var dash = [{"uid": 1, "text" : "It's a TOWN!", "username" : "Sam112", "avatar" : "../ToolKit/images/avatar-01.svg", "favorite": false, "num" : "Standard"}]; function addto () { dash.push({"uid": 2, "text" : "It's a BABY!", "username" : "Pete223", "avatar" : "../ToolKit/images/avatar-01.svg", "favorite": false, "num" : "Standard"}); } And I want to put this data in the 'post-service' template file: &lt;script&gt; Polymer('post-service', { created: function() { this.posts = dash; }, postsLoaded: function() { this.posts = this.$.ajax.response.slice(0); }, setFavorite: function(uid, isFavorite) { console.log('Favorite changed: ' + uid + ", now: " + isFavorite); } }); &lt;/script&gt; So i called the addto() function and then I loaded the index.html Polymer file and i expected to load data from the Array... But It loads the Array, but the added object ( from addto() ), doesn't load. It apparently loads from the original array but not the new entry from the addto() function. Is there a way to make 'post-service' load an array when it changes? Thanks again!
has answer: http://stackoverflow.com/a/25169011
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25183630

http://stackoverflow.com/comment/39196285
has text: The second image in the question has 4 control points on each side.how do i add more control points on each side??
comment on: http://stackoverflow.com/a/25165895
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39673246
has text: Thank you for the replies folks. I added the following to the js to trigger the event. //line added make sure the search is displayed on load setTimeout('Shr.panel.JobOpenings.search()', 100);]
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25193419
score: 0

bind
tags question: http://stackoverflow.com/q/25146194
tags question: http://stackoverflow.com/q/25229704
type: Tag
tag name: bind
tags question: http://stackoverflow.com/q/25127088

winjs
tags question: http://stackoverflow.com/q/25136990
tags question: http://stackoverflow.com/q/25192470
tag name: winjs
type: Tag

http://stackoverflow.com/comment/39090071
type: QuestionComment
type: Comment
score: 1
has text: Let's say `number_of_days_in_calendar = 365`, `day_when_project_started = 91` and `container = 365px` => `((91 / 365) * 100) * (365px / 365) = margin-left: 24.93%` If would container be, let's say `730px` the final result would be `margin-left: 49.86%;`
comment on: http://stackoverflow.com/q/25114642

http://stackoverflow.com/comment/39053590
type: Comment
comment on: http://stackoverflow.com/a/25097418
type: AnswerComment
has text: Ask that in a comment. I don't consider this a valid answer.
score: 0

http://stackoverflow.com/comment/39243032
comment on: http://stackoverflow.com/q/25199338
score: 0
has text: how are you changing the value of _targetdiv from null to div???
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25186506
accepted answer: http://stackoverflow.com/a/25186776
tagged with: twitter-bootstrap
tagged with: web-services
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25186776
has answer: http://stackoverflow.com/a/25186778
possible better answer: http://stackoverflow.com/a/25186946
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25186946
score: 0
answer count: 3
has title: HTML/Javascript and Web Services - When should I use a form?
tagged with: http://stackoverflow.com/tag/html
has body: With the modern web technologies there are more and more ways to achieve tasks. Before we would use Forms to POST data and use it on the Server side code. But today, when using javascript and web services to use the browser as a client (without server-side code), I am a bit lost when it comes to use forms. See this example: I am wondering if I should use a Form to get parameters for my application page. Basically, I currently have: Parameter1 Refresh Values function RefreshData() { // this get data method uses AJAX, from jQUery GetData($('#Parameter1Id').val(), dataCallBack, errorCallBack); } function dataCallBack(data) { UpdateUIData(data); } But I think in this case, for this usage, a Form is not necessary because I could just use objects without putting them in a form. But also, I have noticed that when not using a form, sometimes the pages reload by itself when a form object changes. Can you please help me to understand what would be best to do, to build the UI, when using mostly client side code? Thanks in advance.

http://stackoverflow.com/comment/39293592
comment on: http://stackoverflow.com/q/25226418
has text: return a function in the add-function.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39261325
type: QuestionComment
comment on: http://stackoverflow.com/q/25208952
score: 0
has text: Like this -> **http://jsfiddle.net/adeneo/2pmp3hzf/2/**
type: Comment

http://stackoverflow.com/a/25070421
accepted answer of: http://stackoverflow.com/q/25070397
has comment: http://stackoverflow.com/comment/39003357
has body: PHP (and other server-side scripting languages, like Python and Ruby) only exists on the server, it doesn't get sent to the client. When you access a web page that's implemented using a server script, the server runs the script, and the script produces HTML as its output. This gets sent to the browser. PHP can be somewhat confusing in this regard because it's an embedded language. You insert &lt;?php ... ?&gt; inside a block of HTML (or any other language). That looks kind of like HTML because of the &lt; ... &gt; bracketing, but it's not. The PHP processor starts out just copying the contents of the file to its output, but when it encounters &lt;?php, it then starts processing it as executable PHP code until it encounters ?&gt; or the end of the file. But only the output of that code block is sent, not the block itself.
answers question: http://stackoverflow.com/q/25070397
type: Answer
upvote count: 2
score: 2
has comment: http://stackoverflow.com/comment/39003485
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/39209530
type: Comment
has text: After the json is sent back to the javascript (where is in the index.php file) how can I make use of the variables result, msg using PHP? For example, i want to use them in a mysql_query
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25181613

http://stackoverflow.com/q/25175762
tagged with: jasmine
has title: How to test Jasmine setup code?
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25193704
tagged with: unit-testing
has body: Update: I figured out what the issue was, see my comment below. Is there a way to guarantee state before each Jasmine test? For example: describe('some thing', function () { beforeEach(function () { doSetup(); // this expect does not evaluate :( expect(something).toBe(inSomeState); }); it('has some behavior', function () { // test code }); }); The expect inside of the setup make no difference at all. Even throwing an error in the beforeEach does nothing. I would like to have some assurance that the setup has completed correctly before running the next test.. is there a way to do this?
type: Question
tagged with: testing
answer count: 1
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25193704

http://stackoverflow.com/comment/39163582
score: 0
type: Comment
has text: I'm trying to dynamically update the input fields. So if the user inputs 10 in the USD input it will render 10 x btc_to_usd exchange rate.
type: AnswerComment
comment on: http://stackoverflow.com/a/25156279

http://stackoverflow.com/a/25211646
score: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25210649
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25210649
has body: I assume the variables are defined within the ready function but not elsewhere in your program. If so: Note that JavaScript variables have function scope, which simply means they are defined only within the function itself. [edit] Variables declared outside any function have global scope, making them defined throughout your code (except where variables of the same name are declared within functions). That's why you can see them if they're placed outside the ready function. Note that you should avoid global variables, but we wouldn't know what to recommend without seeing the rest of your code. [end edit] If not: We may need to see more of your code. currentIndex should be defined throughout the function, and allIssues should be defined as long as your ul's id is all-issues.
downvote count: 0

http://stackoverflow.com/comment/39262469
has text: possible duplicate of [How to reset a form using jQuery with .reset() method](http://stackoverflow.com/questions/16452699/how-to-reset-a-form-using-jquery-with-reset-method)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25209635

http://stackoverflow.com/comment/39130610
score: 0
type: AnswerComment
has text: Yeah probably, not really an universal solution for longer strings. I guess let's just go with it since the OP didn't specify if the example uses real values or not.
type: Comment
comment on: http://stackoverflow.com/a/25138781

http://stackoverflow.com/q/25083003
answer count: 1
type: UnansweredQuestion
tagged with: jquery-ui-droppable
has title: How to Get JQuery UI Droppable to Drop Multiple Elements?
tagged with: javascript
tagged with: jquery
has body: I have been given a piece of code that allows the user to drag one row of a table to a div. I have been asked to allow the user to select multiple rows and drag them all to the div. I've been trying to modify the code I was given to do what I need it to do. So, I have a table of rows, where the first column of each row contains a drop down box. I want the user to be able to select many check-boxes, and be able to drag all the rows corresponding to those checked check-boxes into another containing a table. I managed to get the dragging part to work - the user is able to check many check-boxes, and its shows a group of rows being dragged. However, when I drop these rows, only one row in being dropped. Can anyone help me drop all the rows being dragged. Here is my code: $(oTable.fnGetNodes()).draggable({ appendTo: "#event", cursor: "move", helper: function (event) { var checkBoxes = $(".drag"); var rows = $('#lotsDataTable tr').filter(':has(:checkbox:checked)'); if (checkBoxes.length > 0) { return $(' ').find('table').append(rows.clone()).appendTo('#event'); } else { return $(' ').find('table').append($(event.target).closest('tr').clone()).appendTo('#event'); } } }); $("#event table").droppable({ activeClass: "ui-state-default", hoverClass: "ui-state-hover", accept: ":not()", drop: function (event, ui) { $(this).find(".placeholder").remove(); $(" ").html(ui.draggable.html()).appendTo(this); ui.draggable.draggable({ disabled: true }); } }); This is the HTML that I want to drop to: Drag and drop rows here to add them to this event
tagged with: jquery-ui-draggable
has answer: http://stackoverflow.com/a/25083572
type: Question
tagged with: http://stackoverflow.com/tag/html
score: 0

http://stackoverflow.com/comment/39052207
type: AnswerComment
score: 0
type: Comment
has text: That does work however, I would prefer the one delete box so I will look at the below answer.
comment on: http://stackoverflow.com/a/25096288

http://stackoverflow.com/comment/39131078
has text: Do you have some question or not?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25138276

http://stackoverflow.com/comment/39258139
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25207325
score: 0
has text: Any why the lack of javascript tags?

http://stackoverflow.com/q/25075062
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
has body: I have created a popup using modal. When user clicks on a link it will show this modal popup. I have put an exit button inside popup in order to close the popup. My problem is when i click on the exit button, the popups exits but the parent page gets reloaded. Is there any way to preventing the parent page from reloading. Here is the code for modal popup: Details User Details Name ID Email Country Website Change History
has title: Prevent Parent page from reloading when exit button is clicked in popup
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39011519
has answer: http://stackoverflow.com/a/25078566
type: Question
has answer: http://stackoverflow.com/a/25075232

http://stackoverflow.com/comment/39464883
has text: Ah, I had tried this at some point, then I realized I needed to use expect('GET',regex).respond() isntead of whenGET(...)
type: AnswerComment
comment on: http://stackoverflow.com/a/25212592
score: 0
type: Comment

http://stackoverflow.com/comment/39282301
comment on: http://stackoverflow.com/q/25124443
type: Comment
type: QuestionComment
has text: It's work.. thanks Artjom. but other problem :(
score: 0

http://stackoverflow.com/comment/39163247
type: QuestionComment
has text: So what do you want me to? Wait for the comments like "please elaborate :p"
score: 0
comment on: http://stackoverflow.com/q/25156229
type: Comment

http://stackoverflow.com/comment/39096984
type: QuestionComment
comment on: http://stackoverflow.com/q/25112059
type: Comment
score: 1
has text: Well anything with `display` set to `none` will not be rendered at all. Which is why `#article_x` doesn't work for them. There are two ways you can fix this--either set `display` to anything but none or put all blog articles on a separate page and `href` with anchors to that page.

http://stackoverflow.com/comment/39182762
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25166416
has text: yeah...they want two full-page video backgrounds. This project is ridiculous. Thanks for the input!!
score: 1

http://stackoverflow.com/q/25092351
has body: function stopNav() { var han; evt = window.event if (evt) { var elem = evt.target ? han = evt.target : evt.srcElement &amp;&amp; (han = evt.srcElement) if (evt.type=="click") { evt.preventDefault();alert('stopped navigation'); } } } I want to prevent the possibility of user navigating away from the page. sometimes if they click on a link or a button or even a element, it will navigate to another page. I want to prevent this from happening. If it's some ajax event happening on the page, that's fine.
upvote count: 1
type: Question
tagged with: javascript
has title: javascript: catch any click event on current page and prevent navigation?
has answer: http://stackoverflow.com/a/25092836
downvote count: 0
answer count: 1
score: 1
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39044307
has comment: http://stackoverflow.com/comment/39044397

http://stackoverflow.com/comment/39220619
comment on: http://stackoverflow.com/a/25187185
has text: I don't understand this bit here: // use classSelector in your jQuery selectors here
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39010935
comment on: http://stackoverflow.com/a/25074731
type: AnswerComment
score: 0
has text: ah! I already have that on my mind but didn't tried. And now you've suggested that's why I tried and work. Thanks!
type: Comment

http://stackoverflow.com/comment/39131637
type: Comment
type: QuestionComment
has text: I can't really see why I got downvoted here ... as I didn't know how to use it, I couldn't have known about the || operator ... whatever.
comment on: http://stackoverflow.com/q/25139106
score: 0

http://stackoverflow.com/q/25092641
has comment: http://stackoverflow.com/comment/39044924
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25093750
has title: automate javascript clicks within code
type: Question
tagged with: c#
tagged with: javascript
has body: I want to code some script (language is not a problem), which will open a site in webbrowser or webbrowser control. but the problem I am facing is that some sites have javascript alerts/confirm (ok/cancel) buttons appear during start or if some error occurs. I don't want the user to click these buttons manually, but write some code which clicks these messages. is there any way to do so? EDIT: I have requirement from a client to create a new desktop application or plugin for browser which will send OK message for all confirm or alerts. Please note that I don't have access to code for these websites user want to visit. Hope this will make it more clear.
tagged with: browser
score: 0
has comment: http://stackoverflow.com/comment/39044954
answer count: 1
tagged with: jquery
tagged with: browser-extension
linked to: http://stackoverflow.com/q/10749959

http://stackoverflow.com/a/25104848
answers question: http://stackoverflow.com/q/25104772
has body: My advise to you is to use data- tag elements and assign them a click listener independent of other functionalities, for example : HTML: &lt;a href="http://google.com" data-toggle="GAPush" data-event="_trackEvent" data-action="google"....&gt;..&lt;/a&gt; JS: $('[data-toggle="GAPush"]').click(function() { var eventname = $(this).data('name'); var action = $(this).data('action'); //do your login here and read other parameters from data-eventname m use _gapush() }); you know you can have unlimited data- tag elements if you need them for other functionalities.
has comment: http://stackoverflow.com/comment/39072856
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39068435

http://stackoverflow.com/comment/39171324
has text: In batarank I found that ViewLevel is in scope which is child of my scope. How to access it ?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25143701
type: Comment

http://stackoverflow.com/q/25145533
answer count: 3
has answer: http://stackoverflow.com/a/25146638
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39143593
has comment: http://stackoverflow.com/comment/39146755
has comment: http://stackoverflow.com/comment/39145345
favorite count: 0
has comment: http://stackoverflow.com/comment/39152653
has answer: http://stackoverflow.com/a/25146007
upvote count: 2
has body: I have a website where the homepage is a div with six divs and six imgs in it. I want to know the best way to make it so that on a mobile site only one div / img is served. I know there are a lot of tricks to re-organize the page using CSS, but I do not want the imgs hidden, I want them not created (on mobile devices) at all. I would like this without jQuery. Is this even possible? HTML (Full Size) Ideal HTML (Mobile Size)
has comment: http://stackoverflow.com/comment/39143305
tagged with: css
type: AnsweredQuestion
tagged with: responsive-design
has comment: http://stackoverflow.com/comment/39143229
has comment: http://stackoverflow.com/comment/39143677
score: 1
downvote count: 1
accepted answer: http://stackoverflow.com/a/25146007
type: Question
possible better answer: http://stackoverflow.com/a/25145628
has comment: http://stackoverflow.com/comment/39143202
has answer: http://stackoverflow.com/a/25145628
tagged with: javascript
has title: How to serve fewer images to mobile sites
has comment: http://stackoverflow.com/comment/39147500

http://stackoverflow.com/comment/39184107
type: Comment
has text: This is in the right direction. But what I am looking for is, e.g. Google streeview inside your rooom and you can highlight a cup that is on a table. (highlight does not need to look like its in 3d space)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25145866

http://stackoverflow.com/a/25119634
score: 17
accepted answer of: http://stackoverflow.com/q/25119503
answers question: http://stackoverflow.com/q/25119503
has body: You want to wrap your onclick callback in a debouncing function like http://underscorejs.org/#debounce Say you have this function search() { // ... } $jquery(".myFilterCheckboxes").click(search); You should be able to just change the above to: // Only allow one click event / search every 500ms: $jquery(".myFilterCheckboxes").click(_.debounce(search, 500)); There are tons of debouncing functions out there, and writing your own isn't a big deal really if you can't or don't want to include underscore.js. My first thought was towards debouncing because you mentioned multiple clicks creating multiple events in a short period. Debouncing is used really often for things like type-ahead search or autocomplete to provide a little space between key presses for thinking time. As others have mentioned it may make more sense to simply disable the checkboxes / click event while your search is running. In that case, try something like this: function disableClick(elem) { elem.unbind("click"); elem.attr("disabled", true); } function enableClick(elem, onclick) { // Enable click events again elem.live("click", search); // Enable the checkboxes elem.removeAttr("disabled"); } function search() { var boxes = $jquery(".myFilterCheckboxes"); disableClick(boxes); $.get(...).always(function() { enableClick(boxes, search); }); } $jquery(".myFilterCheckboxes").live("click", search); Why disable the click event, add the disabled attribute to the checkboxes instead of just a global lock variable? Well, global locks can be somewhat error prone, but more than that, we already have a global object that matters in the DOM. If we just modify the DOM state we get the right behavior and signal to our users that they should chill out on the checkboxes until the search completes. That said, it probably makes sense with any kind of locking / unbinding scenario to indicate to the user with a loading spinner or something that you're doing work.
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39100304
upvote count: 17
has comment: http://stackoverflow.com/comment/39095712

http://stackoverflow.com/comment/39183910
comment on: http://stackoverflow.com/a/25167317
type: Comment
has text: That's the idea - yes. Apache will proxy all requests through to node. This way you don't need to run nodejs with funky permissions.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39390317
type: Comment
has text: getSearchUsers is in /lib/search.js, so shouldn't that load first?
comment on: http://stackoverflow.com/a/25219854
score: 0
type: AnswerComment

http://stackoverflow.com/a/25202655
has body: The problem is that in the javascript code you are appending the second list to the correct parent element. In the jade code that you have you are merely appending it to the end of the html, therefore it will always be displayed in that particular order. The easy solution would be to put the Lorem 1-1 object after Lorem1 in the array, but that is very inefficient. Templating engines are really only for very light logic and we're getting into the realms of complex logic without changing the data structure a little. It might be better to change your boards object to two separate objects: boards = [{"id":1,"parent_board":0,"title":"Lorem 1","description":"ec40db959345153a9912"}, {"id":2,"parent_board":0,"title":"Lorem 2","description":"bb698136a211ebb1dfedb"}]; subboards = [{"id":3,"parent_board":1,"title":"Lorem 1-1","description":"6062bc28a9f781e06417d"}]; So that your jade code can change to this: each board in boards li = #{board.title} each subboard in subboards if subboard.parent_board == board.id ul li = #{subboard.title} Alternatively an even better solution would be to change the boards object so that subboards are inside the parent board: boards = [{"id":1,"parent_board":0,"title":"Lorem 1","description":"ec40db959345153a9912", "subboards": [{"id":3,"parent_board":1,"title":"Lorem 1-1","description":"6062bc28a9f781e06417d"}]}, {"id":2,"parent_board":0,"title":"Lorem 2","description":"bb698136a211ebb1dfedb"}]; each board in boards li = #{board.title} each subboard in board.subboards ul li = #{subboard.title} JS for populating the object from flat data structure. Note that in the jade template you should probably change it so it only inserts boards with parent_board == 0 or remove the subboard objects from the main array: for(var i = 0; i &lt; boards.length; i++){ var boardId = boards[i].id; var boardParent = boards[i].parent_board; if(boardParent !== 0){ // Check to see if the array exists for a start if (!boards[boardParent].subboards) { // If not then create…
has comment: http://stackoverflow.com/comment/39251412
upvote count: 3
has comment: http://stackoverflow.com/comment/39252046
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39249354
type: Answer
has comment: http://stackoverflow.com/comment/39249286
accepted answer of: http://stackoverflow.com/q/25202005
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25202005

http://stackoverflow.com/q/25088223
has comment: http://stackoverflow.com/comment/39037229
has comment: http://stackoverflow.com/comment/39037231
has comment: http://stackoverflow.com/comment/39037224
has comment: http://stackoverflow.com/comment/39036972
has comment: http://stackoverflow.com/comment/39037526
tagged with: authentication
type: Question
has comment: http://stackoverflow.com/comment/39037393
has comment: http://stackoverflow.com/comment/39036805
tagged with: javascript
has comment: http://stackoverflow.com/comment/39037061
has title: Javascript login issues
has body: I'm trying to create a login page and having a few issues. Firstly, while the JS alerts on a wrong password, with the correct password it doesn't redirect to the secure page. Second, I feel like having the password in the javascript isn't really secure against anyone that knows how to view the source code of my site, so what would be a better way to hide this password (It will be the same for all users attempting to access the page)? HTML: &lt;div id="container"&gt; &lt;div class="login"&gt; &lt;div class="login_side"&gt; &lt;div class="login_inside"&gt; &lt;h2&gt;LOGIN&lt;/h2&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="../index.html"&gt;Go Back&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a target="_blank" href="Contact.html"&gt;Contact Us&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;form&gt; &lt;label&gt;Password&lt;/label&gt; &lt;input type="Password" name="password" id="password" /&gt; &lt;input type="submit" value="Submit" name="submit" class="submit" onclick="LogIn()" /&gt; &lt;/form&gt; &lt;/div&gt; &lt;/div&gt; JavaScript: function LogIn(){ loggedin=false; var pass=""; pass = document.getElementById("password").value; pass=pass.toLowerCase(); if (pass=="login") { loggedin=true; window.location.assign("TrainingSecured.html") } if (loggedin==false) { alert("Invalid login!"); } } JSFiddle: http://jsfiddle.net/cc7EV/
score: 0
tagged with: window.location
has comment: http://stackoverflow.com/comment/39037020
has comment: http://stackoverflow.com/comment/39037363
tagged with: getelementbyid
answer count: 1
has comment: http://stackoverflow.com/comment/39036841
has comment: http://stackoverflow.com/comment/39037093
has comment: http://stackoverflow.com/comment/39036879
linked to: http://stackoverflow.com/q/549
type: UnansweredQuestion
tagged with: input
has comment: http://stackoverflow.com/comment/39037157
has answer: http://stackoverflow.com/a/25088510

http://stackoverflow.com/q/25145691
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Multiple selection with multiple this
has comment: http://stackoverflow.com/comment/39143469
has answer: http://stackoverflow.com/a/25145747
answer count: 4
has answer: http://stackoverflow.com/a/25145959
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/25145745
has body: need help on Jquery multiple selection. Here is the code $.each(($("#reciprocitationAgreement option:selected:not([disabled]), #reciprocitationAgreement input")), function() { $(this).text(); }); There are 2 types of element that passes trought each loop. 1 - Select (option) - get text from option element 2 - Input field - get value from input fields There are 2 selected elements. Is there any way to point in the same block of code to $(this, option).text(); and $(this, input).val()?
type: Question
has answer: http://stackoverflow.com/a/25146112

http://stackoverflow.com/comment/39104952
has text: $('#pricetable td:nth-child(2)').each(function () { var item = $(this).text(); if (item == "y") billableCount++; });
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25124711

http://stackoverflow.com/q/25213200
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/39271201
tagged with: javascript
has comment: http://stackoverflow.com/comment/39281929
has title: Links brought in after loading a page through jquery AJAX do not work
score: 0
has body: Running into an issue with a mobile app. We are doing an jQuery ajax to call in a remote page off our sever (using Cordova as the shell). This brings in the remote code (bare-bone HTML) and we plan to use local resource to style it. getMyPage: function() { $.ajax({ type: "GET", url: "http://localhost:8888/shell/", crossDomain: true, timeout: 10000, success: function(data) { $("appbody").html(data); }, error: function( xhr,err ) { alert('Cannot Connect to the Internet'); } }); } It brings in the page fine, but when we click on any of the links (served from the CMS Drupal) nothing happens. Through inspector it thinks the files are local using the file:// prefix which do not exist. Anyone know how to make those links perform the same AJAX call to the remote server? i.e all the links perform the same ajax GET call.
has comment: http://stackoverflow.com/comment/39285245
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/39285117
has comment: http://stackoverflow.com/comment/39276575
has comment: http://stackoverflow.com/comment/39270174
type: UnansweredQuestion
tagged with: cordova
answer count: 0

http://stackoverflow.com/comment/39035977
score: 0
type: Comment
has text: I wonder if I want the url dynamically respond to the $resource callback (i.e. return result into a page if I type in abc.com/log.php?var=1), should I use it to combine with ngRoute module? or just ngRoute module is enough? Do you know any similar exmaple or demostration on this? Thanks a lot!
comment on: http://stackoverflow.com/a/25085235
type: AnswerComment

http://stackoverflow.com/q/25128838
has title: Kineticjs - Creating own line style
has body: I am working on an image editor with kineticjs. So it's time to make nice brushes. I would like to use png images for this with a different set of alpha values for each pixel, depending on the brush type, and changing the color once they are added to the layer. I would like to know, how can I achieve this? I made a simple painter following the answer to this question But what I want is to reduce the opacity in some parts of the shape that we use as base for painting lines, like in this image. Notice that the first and the last are the same, just the opacity in the last is less. Thank you.
answer count: 1
downvote count: 0
score: 1
favorite count: 0
tagged with: kineticjs
type: UnansweredQuestion
upvote count: 1
linked to: http://stackoverflow.com/q/16708016
type: Question
tagged with: canvas
has answer: http://stackoverflow.com/a/25130099
tagged with: javascript

http://stackoverflow.com/q/25163334
tagged with: cordova
type: UnansweredQuestion
has body: Let's me start by explaining what I wanted to achieve. I am working a mobile project (using Ionic, AngularJS and Cordova). I need a page (View) that will list grouped items. All items of the same group needs to stay on the same row. Hence, the rows are most likely to span beyond the screen width, but that is iff the use can scroll each group in a horizontal (x) direction. While, I was searching for a workable solution I saw Zynga Scroller. His Paging X-Axis looks so close but not exactly what I was looking for. The Paging X-Axis uses DOM id which makes it difficult to scroll each group independent of the other. I have tried modifying the scripts (Paging X-Axis) to achieve the above stated objective without success. Portion of code (just to allow codepen link): var rect = container.getBoundingClientRect(); scroller.setPosition(rect.left + container.clientLeft, rect.top + container.clientTop); scroller.setDimensions(container.clientWidth, container.clientHeight, content.offsetWidth, content.offsetHeight); I created this Pen to show what I have done. Notice that scrolling on a particular group scrolls all groups (that is not what I want). Secondly, the scrolling never run at all when I plug it into my Ionic Project. /** Original definitions **/ // var container = document.getElementById("container"); // var content = document.getElementById("content"); // I need mutiple containers with indepentent content scrollers, indendent containers with contents and cell var containers = document.getElementsByClassName("scroller-container"); var contents = document.getElementsByClassName("scroller-content"); // Did this just to reproduce dom-paging-x.html demo var container = containers[0]; var content = contents[0]; // Initialize Scroller var scroller = new Scroller(AppFactory.render, { scrollingY: false, paging: true }); // Setup Scroller var rect = container.getBoundingClientRect(); scroller.setPosition(rect.left + container.clientLeft, rect.top + container.clientTop); scroller…
has title: DOM Horizontal Scrolling using zynga scroller
tagged with: ionic-framework
type: Question
tagged with: javascript
tagged with: scroller
has answer: http://stackoverflow.com/a/26006375
score: 0
answer count: 1

http://stackoverflow.com/q/25087949
tagged with: parse-platform
type: UnansweredQuestion
tagged with: xmlhttprequest
score: 1
has body: I need to call a cloud call in one parse application from the cloud of another parse application through the Rest API. For this I have this code now. However, I always get the error: com.parse.ParseException: ReferenceError: XMLHttpRequest is not defined at main.js:12:20. (this line is referring to the line where the XMLHttpRequest is initialized). My code for this is: var url = "https://api.parse.com/1/functions/signUp"; var myObj = new Object(); myObj.age = 45; myObj.email = "test@gmail.com"; myObj.password = "testpw"; var client = new XMLHttpRequest(); client.open("POST", url); client.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); client.setRequestHeader("X-Parse-Application-Id", "xxx"); client.setRequestHeader("X-Parse-REST-API-Key", "xxx"); client.send(JSON.stringify(myObj)); Since this code is executed in the Parse cloud, I think the problem is that the XMLHttpRequest isn't constructed correctly. Could that be? Is this even possible with Parse, calling a cloud call from a parse application through the rest-api from the cloud from another parse application?
upvote count: 1
has title: Call Cloud Call from one Parse Application in another Parse application
tagged with: httprequest
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25088467
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/25122686
answers question: http://stackoverflow.com/q/25122586
has body: Import the file using this code: var imported = document.createElement('script'); imported.src = '/path/to/imported/script'; document.head.appendChild(imported); If this fails use third party library like jQuery $.getScript('/path/to/imported/script.js', function() { // script is now loaded and executed. // put your dependent JS here. });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25122586
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/39100701

http://stackoverflow.com/a/25147831
score: -1
downvote count: 1
type: Answer
upvote count: 0
has body: Here's a neat HTML/CSS trick you can use without javascript to use the same HTML page to display different information... HTML: History CSS: #history {display:none; } #history:target {display:block; } For better flow and use of your toggle function, simply call it with
answers question: http://stackoverflow.com/q/25081703

http://stackoverflow.com/comment/39028423
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25083002
has text: Thanks for the assistance though Michael, I greatly appreciate it!
type: AnswerComment

http://stackoverflow.com/comment/39130828
score: 0
type: Comment
type: QuestionComment
has text: Where is the bootstrap? i can't see any sign of bootstrap in your code. I think your question is completely vague.
comment on: http://stackoverflow.com/q/25138711

http://stackoverflow.com/q/25217831
has answer: http://stackoverflow.com/a/25217896
tagged with: facebook
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has body: I've got this example straight off facebook api docs and I keep getting Reference Error: FB is not defined in both firefox and IE10. I do not understand why FB is not defined when I used their example code? Is this just a security exception because I'm running this locally or is there really something wrong with the FB docs code? FB Login Test Login
tagged with: javascript
has title: Facebook API example code has errors
accepted answer: http://stackoverflow.com/a/25217896
upvote count: 1
answer count: 1
favorite count: 0
tagged with: ajax

http://stackoverflow.com/a/25085235
accepted answer of: http://stackoverflow.com/q/25083305
upvote count: 1
has body: http://plnkr.co/edit/CKgWrson3IbMugRKdX5p?p=preview A few problems that I fixed that others pointed out in the comment. Remove $scope from factory. Here you are getting a generic $scope object but not the actual scope. You will get that in the controller. When you call angular resource with query() the first argument is already the param. But you can specify the common params like you did before. function($resource) { return $resource('mocked-resource.json', { callback: 'JSON_CALLBACK' }, { query: { method: 'GET', isArray: true } }); Hope this helps.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39110316
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39035977
answers question: http://stackoverflow.com/q/25083305
type: Answer

http://stackoverflow.com/q/25105734
has comment: http://stackoverflow.com/comment/39069272
tagged with: ajax
score: 0
has title: jQuery DataTables - No XHR request made
tagged with: datatables
has comment: http://stackoverflow.com/comment/39069571
has comment: http://stackoverflow.com/comment/39069022
has body: I have a simple datatable with the following initialization options: $('#inventory').dataTable({ "sPaginationType": "full_numbers", "ajax": '/api/inventory/', "columns": [ { "data": "id" }, { "data": "description" }, { "data": "cost_price" }, { "data": "sale_price" }, { "data": "on_hand" } ] }); HTML: ID Description Cost Price Sale Price On Hand ID Description Cost Price Sale Price Stock Here is my debug bookmarklet. I noticed that under server interaction it says Last JSON from server: No XHR request made. In the frontend i see No data available in table where my data should be. There's no error in the Chrome console and if I hit the URL with my browser it returns the JSON fine. What can cause DataTables to not make the XHR request?
type: UnansweredQuestion
answer count: 0
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25209971
tagged with: crossfilter
score: 5
tagged with: javascript
answer count: 3
has title: Add percentages to the pie chart label in dc.js
upvote count: 5
tagged with: d3.js
has answer: http://stackoverflow.com/a/41605473
type: AnsweredQuestion
has body: I have a pie chart for which I want to add percentages to the label. Here is a jsfiddle of the pie chart and the code is below. Right now the chart shows the actual values. I looked at the dc.js Getting Started and How-To Guide which is an example of a dashboard. It has the chart with percentages in the label. However, when I try to replicate the structure I get an error. For example, when I use the label function like so .label(function(d) {if(all.value){return d.key + " " + d.value / all.value();} .renderLabel(true) in the console it says that all is not defined. Also, the d.key returns nothing as well. I guess my data has a different structure. Help appreciated. Thanks. HTML &lt;body&gt; &lt;div id='Chart'&gt; &lt;/div&gt; &lt;/body&gt; JS var ndx = crossfilter(data); var XDimension = ndx.dimension(function (d) { return d.Category; }); var YDimension = XDimension.group(); dc.pieChart("#Chart") .width(480).height(300) .dimension(XDimension) .group(YDimension) .label(function(d){return d.value}); dc.renderAll(); Data var data = [{ Category: "A", ID: "1" }, { Category: "A", ID: "1" }, { Category: "A", ID: "1" }, { Category: "A", ID: "2" }, { Category: "A", ID: "2" }, { Category: "B", ID: "1" }, { Category: "B", ID: "1" }, { Category: "B", ID: "1" }, { Category: "B", ID: "2" }, { Category: "B", ID: "3" }, { Category: "B", ID: "3" }, { Category: "B", ID: "3" }, { Category: "B", ID: "4" }, { Category: "C", ID: "1" }, { Category: "C", ID: "2" }, { Category: "C", ID: "3" }, { Category: "C", ID: "4" }, { Category: "C", ID: "4" },{ Category: "C", ID: "5" }];
downvote count: 0
has answer: http://stackoverflow.com/a/39011424
favorite count: 0
possible better answer: http://stackoverflow.com/a/41605473
has answer: http://stackoverflow.com/a/25210335
accepted answer: http://stackoverflow.com/a/25210335
tagged with: dc.js
type: Question

http://stackoverflow.com/a/75578092
score: 9
has comment: http://stackoverflow.com/comment/133775102
type: Answer
has body: NodeJS, in v19.6, added support for statfs and statfsSync. import { statfs } from 'fs'; // path in mounted volume const pathToCheck = '/'; const space = statfs(pathToCheck, (err, stats) =&gt; { if (err) { throw err } console.log('Total free space',stats.bsize*stats.bfree); console.log('Available for user',stats.bsize*stats.bavail); })
upvote count: 9
answers question: http://stackoverflow.com/q/25186026
downvote count: 0

http://stackoverflow.com/q/25115074
answer count: 2
has body: My purpose is to make a chat application using Node.js + Socket.IO, but I met with a difficulty. The issue is that the minus event doesn't work correctly(Result: 64 - 12 = 65), but the plus event works fine(Result: 42 + 23 = 65). Maybe the cause of the issue is related to socket.once() function... but I don't know the answer clearly. The following is the source code of my simplified Node.js app. app.js: var http = require('http'); var fs = require('fs'); var socketio = require('socket.io'); var app = http.createServer(function (req, res) { if (req.url === '/') { fs.readFile(__dirname + '/index.html', function (err, result) { if (err) throw err; res.writeHead(200, { 'Content-Type': 'text/html' }); res.end(result); }); } else { res.writeHead(404); res.end(); } }); app.listen(3000, function () { console.log('The server running on port 3000.'); }); var io = socketio(app); io.on('connection', function (socket) { socket.on('plus', function (param) { socket.emit('result', param.a + param.b); }); socket.on('minus', function (param) { socket.emit('result', param.a - param.b); }); }); index.html: Result: 42 + 23 = 65 64 - 12 = 65 Thanks.
has answer: http://stackoverflow.com/a/25116001
accepted answer: http://stackoverflow.com/a/25116001
tagged with: javascript
has title: Socket.IO's once function not working correctly
upvote count: 1
favorite count: 0
downvote count: 0
has answer: http://stackoverflow.com/a/25117903
tagged with: node.js
possible better answer: http://stackoverflow.com/a/25117903
type: AnsweredQuestion
score: 1
tagged with: socket.io
type: Question

http://stackoverflow.com/q/25104175
has comment: http://stackoverflow.com/comment/39065894
has answer: http://stackoverflow.com/a/25104749
tagged with: jquery
has body: I am new to jQuery. I am loading a table through ajax. Inside the table i have one toggle. The on click event attached to it is not working. But if the table allready exist it work fine. Due to the ajax load the onClick function is not attaching to it. The code looks like following jQuery $(function() { $(document).on('click', '.mytable .toggle', function () { alert("toggle Clicked"); }); }); Html Before ajax Html after ajax Tab #1 + Everything Else [99] 1$
has comment: http://stackoverflow.com/comment/39065869
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25105133
has answer: http://stackoverflow.com/a/25105133
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25104749
has title: re-attaching jquery function on td after dynamically loading table
has comment: http://stackoverflow.com/comment/39066115
has answer: http://stackoverflow.com/a/25119856
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39065892
score: 0
answer count: 3

http://stackoverflow.com/comment/39306656
type: Comment
has text: thanks for the suggestion, but I was able to fix it with a workaround, or rather the way it should have been fixed in the beginning: = '5'}" class="icon rate_star_small">
type: AnswerComment
comment on: http://stackoverflow.com/a/25222521
score: 0

http://stackoverflow.com/a/25085147
has comment: http://stackoverflow.com/comment/39035284
answers question: http://stackoverflow.com/q/25083982
has comment: http://stackoverflow.com/comment/39031178
upvote count: 1
has comment: http://stackoverflow.com/comment/39035862
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39031553
has comment: http://stackoverflow.com/comment/39031345
type: Answer
has body: Please note, I have experience with JavaScript but I've never used ExtJS before. Now, having said that, you're not seeing the same results as the console because the Ext.JSON.encode() method internally calls .hasOwnProperty() for each property in the object returned by viewModel.getData(). You can see this for yourself by stepping in to this method via the debugger. For left - .hasOwnProperty() returns true For from1 - .hasOwnProperty() returns false. Since from1 returns false, the string returned by Ext.JSON.encode() does not include this property. Now, the question becomes: why does it return false for from1? This is because your viewModel doesn't include from1 as a property. It currently looks like this: viewModel: { data: { left: 'left' } } You need to add from1 into your viewModel. Now, I did notice one thing. If I added from1 and set its value to TopPanel, it still did not work as expected. If I chose any other value except TopPanel things worked as expected and the string outputted by Ext.JSON.encode() included the property . It has something to do with the first viewModel configuration that you have declared. It currently looks like this: viewModel: { data: { from1: 'TopPanel' } ... The two viewModel configurations are colliding somehow. But I'd have to dig further into how ExtJS works before I could tell you why that is happening. Hopefully, my answer will nudge you in the right direction.

http://stackoverflow.com/q/25191009
has comment: http://stackoverflow.com/comment/39229250
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39228646
has body: I have a variable list as follows, var gfList = {}; gfList['1'] = { center: new google.maps.LatLng(41.878113, -87.629798), radius: 400 }; gfList['2'] = { center: new google.maps.LatLng(40.714352, -74.005973), radius: 250 }; gfList['3'] = { center: new google.maps.LatLng(34.052234, -118.243684), radius: 650 }; gfList['4'] = { center: new google.maps.LatLng(49.25, -123.1), radius: 550 }; I want an object from this list based on my Select box value selected . The following code is working, if I use Static Value $('#geofenceId').on("change", function() { var geofenceId = '1'; var gfence = gfList[geofenceId]; alert('Values are : ' + geofenceId + ',' + gfence.center + '--' + gfence.radious); }); but this code not working, if i get the value from select Box $('#geofenceId').on("change", function() { var geofenceId = $('#geofenceId').val(); var gfence = gfList[geofenceId]; alert('Values are : ' + geofenceId + ',' + gfence.center + '--' + gfence.radious); }); I got error as follows for above code in browser console TypeError: gfence is undefined
has comment: http://stackoverflow.com/comment/39230094
accepted answer: http://stackoverflow.com/a/25205878
score: 0
has comment: http://stackoverflow.com/comment/39228743
has comment: http://stackoverflow.com/comment/39227714
answer count: 1
has comment: http://stackoverflow.com/comment/39228523
tagged with: jquery
has title: Get an object from dynamic list object
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39228485
has comment: http://stackoverflow.com/comment/39227761
has answer: http://stackoverflow.com/a/25205878
has comment: http://stackoverflow.com/comment/39227715

http://stackoverflow.com/comment/39124289
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25135046
has text: I'd consider making a jsFiddle which describes your issue.
type: Comment

http://stackoverflow.com/comment/39112739
type: Comment
score: 0
type: AnswerComment
has text: Thanks for the keyword NLP.
comment on: http://stackoverflow.com/a/25120700

http://stackoverflow.com/comment/107225060
has text: @MatveevDmitriy I'm sorry but no one, simply no one can read this one liner. Writing code this way is imho a bad practice.
comment on: http://stackoverflow.com/a/55435771
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/49123744
answers question: http://stackoverflow.com/q/25176006
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/85252849
has body: var data =[]; function add(){ var fname = document.getElementById("firstname").value, lname= document.getElementById("lastname").value, email = document.getElementById("email").value, age = document.getElementById("age").value, mobile = document.getElementById("mobile").value, gen = gender1.checked?gender1.value:gender2.value, date = document.getElementById("date").value, adress = document.getElementById("address").value, city = document.getElementById("city").value, state = document.getElementById("state").value, zip = document.getElementById("zip").value, pan = document.getElementById("pan").value, tan = document.getElementById("tan").value, aadhar = document.getElementById("aadhar").value, obj = {name1:fname,name2:lname,mail:email,aged:age,num:mobile,gend:gen,tarrek:date, add:adress,place:city,stat:state,zpicode:zip,panc:pan,tanc:tan,aadharc:aadhar} data.push(obj); var table = " "; table+= " Firstname Lastname Email Age Mobile Gender Date Address City State Documents Zip Pan Tan Aadhar "; for(var i=0;i<data.length;i++){ table+=" "+data[i].name1+" "+data[i].name2+" "+data[i].mail+ " "+data[i].aged+" "+data[i].num+" "+data[i].gend+ " "+data[i].tarrek+" "+data[i].add+" "+data[i].place+ " "+data[i].stat+" "+data[i].zpicode+" "+data[i].panc+ " "+data[i].tanc+" "+data[i].aadharc+ " " } table+=" "; document.getElementById("table-data").innerHTML=table; };

http://stackoverflow.com/comment/39011077
has text: Well I didn't say it wasn't working :/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25074816

http://stackoverflow.com/comment/39269031
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25210199
type: AnswerComment
has text: `this` refers to different things in the two uses. The top usage refers to the `select`, since that's the object the callback is being called by, whereas the second `this` refers to the `option`. Filter iterates over the current selection, and runs the filter on each, so `this` gets me a reference to whichever `option` it's processing at the time.

http://stackoverflow.com/q/25148398
tagged with: exception
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25148945
has title: Catch OS exception when Javascript calls Perl script
score: 1
has body: I have a Java script (say) a.js that calls a Perl script b.pl by: JavaScript:xmlhttpPost("http://:/cgi-bin/b.pl"); xmlhttpPost is something like: function xmlhttpPost(strURL) { var xmlHttpReq=createXMLHttpRequest(); xmlHttpReq.open('POST', noCache(strURL), true); where createXMLHttpRequest creates ActiveXObject b.pl calls another perl module, c.pm. In c.pm, there is a piece of code to catch OS exception: eval { $ftp-&gt;put($filenamepath); }; if ($@) { return "FTP time-out"; } $ftp leverages Net::FTP. If I run b.pl from command line and there is a time-out exception when using ftp to put a file, the excpetion was caught correctly. However, if b.pl is run via a.js, the time-out exception was not caught. Please advise. Thanks!
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39191442
tagged with: perl
tagged with: javascript
has comment: http://stackoverflow.com/comment/39149243
has comment: http://stackoverflow.com/comment/39174186
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25217310
accepted answer of: http://stackoverflow.com/q/25187926
has body: To dynamically set the "selected" value of a Select2 component: $('#inputID').select2('data', {id: 100, a_key: 'Lorem Ipsum'}); Where the second parameter is an object with expected values. UPDATE: This does work, just wanted to note that in the new select2, "a_key" is "text" in a standard select2 object. so: {id: 100, text: 'Lorem Ipsum'} Example: $('#all_contacts').select2('data', {id: '123', text: 'res_data.primary_email'}); Thanks to @NoobishPro
downvote count: 4
answers question: http://stackoverflow.com/q/25187926
has comment: http://stackoverflow.com/comment/112438020
type: AcceptedAnswer
upvote count: 94
has comment: http://stackoverflow.com/comment/54895504
has comment: http://stackoverflow.com/comment/75929948
has comment: http://stackoverflow.com/comment/105468018
has comment: http://stackoverflow.com/comment/92657162
has comment: http://stackoverflow.com/comment/39279480
has comment: http://stackoverflow.com/comment/93029302
has comment: http://stackoverflow.com/comment/116977593
type: Answer
score: 90
has comment: http://stackoverflow.com/comment/68117920

http://stackoverflow.com/a/25144975
has comment: http://stackoverflow.com/comment/39214109
has comment: http://stackoverflow.com/comment/39240780
has comment: http://stackoverflow.com/comment/39469337
type: Answer
has comment: http://stackoverflow.com/comment/39308844
has comment: http://stackoverflow.com/comment/39234196
has body: Uses jQuery as a quick hack and very mucky but this is a simple way to do it: $('.plugin_input_wrapper input').on('keyup', function() { var oldVal = $(this).val().replace(/\[/g,''); oldVal = oldVal.replace(/\]/g,''); var val = '[' + oldVal + ']'; $(this).val(val); }); JSBin Simply gets the current value of the textbox being typed in, trims out the old brackets and adds them in again and injects back into the textbox
has comment: http://stackoverflow.com/comment/39214868
has comment: http://stackoverflow.com/comment/39443091
has comment: http://stackoverflow.com/comment/39219454
answers question: http://stackoverflow.com/q/25144816
score: 0
accepted answer of: http://stackoverflow.com/q/25144816
has comment: http://stackoverflow.com/comment/39214295
has comment: http://stackoverflow.com/comment/39217505
has comment: http://stackoverflow.com/comment/39214378
has comment: http://stackoverflow.com/comment/39214511
has comment: http://stackoverflow.com/comment/39216123
has comment: http://stackoverflow.com/comment/39290245
has comment: http://stackoverflow.com/comment/39232247
type: AcceptedAnswer

http://stackoverflow.com/q/25193131
upvote count: 1
type: Question
tagged with: uploadify
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25193617
has body: On the backend I'm sending: res.send(JSON.stringify(back)); where back, after being stringified is: {"success":true,"data":{"success":true,"data":{"name":"-kkWjmTLb","version":1,"dateCreated":1407448946239,"dateUpdated":1407448946239,"vidLoc":"rtmp://xxxxxxx.cloudfront.net/cfx/st/vid_-kkWjmTLb","thumbLoc":"https://xxxxxxxxxxx.cloudfront.net/big_icon.png","author":"53a47a469c52c9d83a2d71d9","videoBucket":"xx.xxxxxxxx","thumbBucket":"xx.xxxxxxxx","scenario":false,"fakeName":xxxxxxxxxx.flv"}}} ` On the frontend I'm doing this: $(htmlId).uploadify('settings','onUploadSuccess', function(file, data, res) { console.log('uploadSuccess',data); And the console log tells me that data is OK Not that big string up there, but simply OK. How can I get my string to the frontend as a response to uploadify? The full bakend code: app.post('/uploadVideo',function(req,res){ console.log("hit video upload"); checkProperties(req.query,['name','ext','tenant'],function(results){ if(!results.error){ var form = new formidable.IncomingForm(); form.uploadDir = __dirname+'/uploads'; form.keepExtensions = true; console.log('queries are ',req.query); form.on('file',function(field,file){ var data = {}; var uid = shortId.generate(); var renamed = form.uploadDir + "/vid_"+uid; fs.rename(file.path,renamed); if(typeof req.query.tenant !== 'undefined'){ console.log('setting data'); data.tenant = req.query.tenant; data.fakeName = req.query.name; data.name = uid; console.log('data set',data); }else{ console.log('no tenant'); res.send(400); return; } console.log('calling uploadVideoS3',data); uploadVideoS3(renamed,req.query.ext,data,fs.readFileSync(renamed),function(back){ if(back.success){ console.log('done uploaded to S3',JSON.stringify(back)); res.send(JSON.stringify(back)); }else{ console.log('video upload S3 failed'); res.send(400); } }); }); form.on('error',function(err){ console.log("error with file upload " + err); res.send(400); res.end(); }); form.on('end',function(){ console.log("done"); }); form…
has title: Uploadify onUploadSuccess not returning my data
answer count: 1
downvote count: 0
favorite count: 0
tagged with: httpresponse
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25193617
score: 1

http://stackoverflow.com/comment/39222900
type: AnswerComment
score: 0
type: Comment
has text: the threads are created in the javascript file using something like this... (new Thread(function() {...})).start(); I could potentially make a big array of all of the spawned threads if that would help.
comment on: http://stackoverflow.com/a/25188587

http://stackoverflow.com/q/25141080
possible better answer: http://stackoverflow.com/a/57628307
type: AnsweredQuestion
upvote count: 38
linked to: http://stackoverflow.com/q/34235155
accepted answer: http://stackoverflow.com/a/25179198
tagged with: google-chrome
type: Question
has answer: http://stackoverflow.com/a/57628307
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25179198
has answer: http://stackoverflow.com/a/37784751
has body: I'm currently writing a chrome extension which uses Chrome's DesktopCapture API. I'm struggling to set a callback when someone clicks on "Stop sharing". I tried using the onended EventHandler of the MediaStream, but the MediaStream's ended property is still set to true after clicking on the button. The only difference I could find between the stream (before and after clicking the button) is that the videoTracks.readyState is set to ended. Edit: I would also like to notice if the user closes the window they were streaming before.
answer count: 3
tagged with: google-chrome-extension
tagged with: webrtc
favorite count: 0
score: 38
has title: How to listen for "Stop sharing" click in Chrome DesktopCapture API
linked to: http://stackoverflow.com/q/26111693

http://stackoverflow.com/q/25181304
answer count: 1
has body: I have created a custom module whose functionality i want to export in other js modules, but while requiring the module i am getting the following error: Error: Cannot find module 'dbconstant' In file login.js i am doing following: var dbConst = require('dbconstant'); which leads to error described above. But when import the module using following code, it works fine: var dbConst = require('/home/gaurav/mygitRepo/officemgmt/api/dbconstant'); login.js reside @ /home/gaurav/mygitRepo/officemgmt/api I seriously doubt that giving absolute path is way to do this, if not, how can i import module. Please put a comment if dbconstant code is also needed for analyzing the issue, i will add that too if required.
tagged with: module
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25181451
accepted answer: http://stackoverflow.com/a/25181451
type: Question
has title: Error: Cannot find module 'dbconstant'
tagged with: javascript
score: 0

http://stackoverflow.com/a/25087982
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25087783
type: Answer
answers question: http://stackoverflow.com/q/25087783
has comment: http://stackoverflow.com/comment/39037396
score: 1
has comment: http://stackoverflow.com/comment/39037422
upvote count: 1
has body: I believe what you are looking for is setting the minimum height of your container first: @media screen and (max-width: 1440px) { .more-block { min-height: 210px; } } Then you can get that value in JS, like that: var $more = $("div.more-block"); var initialHeight = parseInt($more.css('min-height')); $more.divgrow({ initialHeight: initialHeight });

http://stackoverflow.com/q/25077844
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39017279
favorite count: 0
has comment: http://stackoverflow.com/comment/39016830
upvote count: 3
has title: jQuery/AJAX concurrent access to global variable
accepted answer: http://stackoverflow.com/a/25078718
linked to: http://stackoverflow.com/q/124764
has comment: http://stackoverflow.com/comment/39017299
has comment: http://stackoverflow.com/comment/39018017
has body: I'm writing some jQuery code that performs a plain ajax call. I've a global Javascript variable that I need to increase thread-safely with every call. If this was Java, I would use synchronized but this is not the case :-) Here's a code snippet: var myval; function myFunc() { $.ajax({ url: myurl, type: 'GET', data: { ...my data... }, success: function() { myval++; } }); } Given that myFunc() is associated with a click event, how can I be sure that myvar is always safely/consistently increased? I know I could maybe use async: false, but I'd prefer to avoid it. I'm not even sure it would work that way. Thanks for any help!
has answer: http://stackoverflow.com/a/25078718
type: AnsweredQuestion
score: 3
downvote count: 0
tagged with: thread-safety
tagged with: concurrency
type: Question

http://stackoverflow.com/comment/39170152
has text: Will do, but just to make sure, don't you want to increment/decrement a counter whenever a check-box is pressed?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25159581

http://stackoverflow.com/comment/39148596
comment on: http://stackoverflow.com/a/25147564
score: 1
type: AnswerComment
has text: One binding on the parent element and the events from the child elements will bubble up. You can also bind to the `submit` event of the child forms your call. In the handler if you refer to `$(this)` it will be scoped to the element that triggered the event.
type: Comment

http://stackoverflow.com/q/25073788
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25074747
has title: Change input value based on
type: AnsweredQuestion
tagged with: coffeescript
tagged with: ruby-on-rails
type: Question
has body: In my Ruby on Rails application I have table with car prices. This table has the following inputs: Car from_days Car to_days Car netto_price Car brutto_price I have the following html code(I convert it to HAML to be more readable) %table.table.table-striped.table-bordered %thead %tr %th Od [Liczba dni] %th Do [Liczba dni] %th Cena netto %th Cena brutto %th %tbody#prices %tr.nested-fields %td .form-group.integer.optional.car_prices_from_days %input#car_prices_attributes_0_from_days.numeric.integer.optional.form-control.form-control{name: "car[prices_attributes][0][from_days]", step: "1", type: "number", value: "1"}/ %td .form-group.integer.optional.car_prices_to_days %input#car_prices_attributes_0_to_days.numeric.integer.optional.form-control.form-control{name: "car[prices_attributes][0][to_days]", step: "1", type: "number", value: "12"}/ %td .form-group.string.optional.car_prices_netto_price %input#car_prices_attributes_0_netto_price.string.optional.form-control{min: "0", name: "car[prices_attributes][0][netto_price]", type: "text", value: "123,00"}/ %td.brutto .form-group.string.optional.car_prices_brutto_price %input#car_prices_attributes_0_brutto_price.string.optional.form-control{min: "0", name: "car[prices_attributes][0][brutto_price]", type: "text", value: "151,29"}/ %td.remove %input#car_prices_attributes_0__destroy{name: "car[prices_attributes][0][_destroy]", type: "hidden", value: "213"}/ %a.delete.remove_fields.existing{href: "#", style: "display: none;"} %span.glyphicon.glyphicon-remove %input#car_prices_attributes_0_id{name: "car[prices_attributes][0][id]", type: "hidden", value: "213"}/ %tr.nested-fields %td .form-group.integer.optional.car_prices_from_days %input#car_prices_attributes_1406871212209_from_days.numeric.integer.optional.form-control.form-control{name: "car[prices_attributes][1406871212209][from_days]", step: "1", type: "number"}/ %td .form-group.integer.optional.car_prices_to_days %input#car_prices_attributes_1406871212209_to_days.numeric.…
has answer: http://stackoverflow.com/a/25074747
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39009255
answer count: 1

http://stackoverflow.com/q/25121007
has comment: http://stackoverflow.com/comment/39103844
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has comment: http://stackoverflow.com/comment/39110277
score: 0
has title: Using .json files as data in D3
has comment: http://stackoverflow.com/comment/39098867
has body: I've been trying to import a .json file into a D3 code to act as data.I'm new to D3 so I'm using a tutorial book which says I must serve the data first. I managed to start a local server using Command Prompt, and I've created a "data" folder in my Python34 file,a put the .json data in there, and it is visible at localhost:8000. I'm using Notepad++, and the code itself looks like this: D3 What's wrong here? Is it the code, or something else? As I said, I'm new to D3 and fairly new to programming itself, so try to explain the answer as if I was a total beginner. I will most probably (in my near future) have to create D3 codes to visualise demographic information using either .json or .csv files, so learning how to get data from a file is very inportant for me.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/svg
answer count: 0
tagged with: d3.js
has comment: http://stackoverflow.com/comment/39097475
type: Question

http://stackoverflow.com/comment/39225018
score: 0
type: Comment
has text: DJDavid98 thanks for the help and hanging in there w me. Yes that worked -- with one small change, adding the period before class name. (something so simple, understanding the click function).
type: AnswerComment
comment on: http://stackoverflow.com/a/25184229

http://stackoverflow.com/q/25104233
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25105660
tagged with: angularjs
has title: Shared http library
tagged with: node.js
type: AnsweredQuestion
downvote count: 0
has body: I'm working on a project that uses Node.js and AngularJS. AngularJS has the $http service. This service is great for making web service calls to rest-based services. I'm curious, does anyone know of a Node module that will allow me to make web service calls, yet will let me use that code in the browser world as well? In a sense a HTTP service that I can use on the server and on the client? I saw a package called present that allows you to get timestamps. This package has a fallback process so you can use it on both the client and the server. I'd love to be able to find something similar for http web service calls.
score: 1
type: Question
has comment: http://stackoverflow.com/comment/39066133
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25105660
upvote count: 1

http://stackoverflow.com/q/25183389
has answer: http://stackoverflow.com/a/25183508
accepted answer: http://stackoverflow.com/a/25183508
score: -3
type: AnsweredQuestion
has body: There is an error in my code. function checkWrong() { var programInfo = {}; var bookedQueue = new programInfo(); bookedQueue.title = "cost"; bookedQueue.startTime = "13:50"; console.log(bookedQueue.title); } JavaScript : Uncaught TypeError: object is not a function Above error occurs on the 6th line. What should I do to solve this problem?
has title: JavaScript : Uncaught TypeError: object is not a function
type: Question
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25183493
downvote count: 3
has answer: http://stackoverflow.com/a/25183493
has comment: http://stackoverflow.com/comment/39212726
has comment: http://stackoverflow.com/comment/39212647
favorite count: 0
upvote count: 0

http://stackoverflow.com/comment/39249154
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25202748
has text: first of all, your string is invalid due to nested same quote marks. typo or error, still please post a valid string. also, please show us what code have you tried so far

http://stackoverflow.com/comment/39107182
comment on: http://stackoverflow.com/q/25126054
has text: This may be of interest to you: http://stackoverflow.com/questions/13486479/how-to-get-an-array-of-unique-values-from-an-array-containing-duplicates-in-java
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39196101
has text: @epascarello yes :( ... fixed
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25173859

http://stackoverflow.com/comment/39240100
type: Comment
score: 0
has text: Thats the question. I probably need to test out some more, its working okay now. But performance could be an issue
comment on: http://stackoverflow.com/a/25149572
type: AnswerComment

http://stackoverflow.com/q/25097566
has comment: http://stackoverflow.com/comment/39053861
score: 10
tagged with: javascript
has answer: http://stackoverflow.com/a/55191099
linked to: http://stackoverflow.com/q/9196451
linked to: http://stackoverflow.com/q/14106864
tagged with: inline
has comment: http://stackoverflow.com/comment/39053906
possible better answer: http://stackoverflow.com/a/55191099
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/25097808
has comment: http://stackoverflow.com/comment/39053853
has comment: http://stackoverflow.com/comment/39054132
tagged with: styles
has answer: http://stackoverflow.com/a/67940752
tagged with: css
has answer: http://stackoverflow.com/a/25098011
has body: I want to add all CSS styles of a specific element to its inline style attribute. For example: I have: and: #d { background: #444444; width: 50px; height: 20px; display: inline-block; } Now I want a JavaScript function that turns my div into this: Please help me. And, by the way, I don't want any CSS styles to re-write any existing inline style.
type: AnsweredQuestion
has title: CSS style to inline style via JavaScript
downvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/39053970
has comment: http://stackoverflow.com/comment/39053796
accepted answer: http://stackoverflow.com/a/25097808
has answer: http://stackoverflow.com/a/25097730
has comment: http://stackoverflow.com/comment/39053945
upvote count: 12

http://stackoverflow.com/a/25076052
downvote count: 5
answers question: http://stackoverflow.com/q/25075807
has comment: http://stackoverflow.com/comment/50145186
score: 2
type: AcceptedAnswer
has body: Bootstrap has this out of the box, you can set a delay property in options (in js) delay: { show: 500, hide: 100 } and in HTML: data-delay='{"show":"500", "hide":"100"}' where hide will get triggered after 100 ms
has comment: http://stackoverflow.com/comment/77991193
type: Answer
upvote count: 7
accepted answer of: http://stackoverflow.com/q/25075807

http://stackoverflow.com/a/70290375
type: Answer
downvote count: 1
score: -1
has body: Maybe could usefull for someone var ax = moment( new Date().toLocaleString(), // today/now is 09/12/2021 10:00:00 "DD/MM/YYYY HH:mm:ss" ).diff( moment( "12/11/2022 13:43:11", // some time in future or past "DD/MM/YYYY HH:mm:ss" ) ); console.log('if today is in the future of the compared date then result should be negative ==>', ax); // ax bigger than 0 zero means date in past. ms less than zero is in future
upvote count: 0
answers question: http://stackoverflow.com/q/25150570

http://stackoverflow.com/q/25179722
has answer: http://stackoverflow.com/a/25203772
has body: I'm using Codeigniter and I have a dynamically created form with lots of input fields. I'm using jQuery and AJAX to submit form and I'm passing all the data from form as an object. This is my jQuery code: $('body').on("submit", "#app-options-form", function(evnt){ // Show loader while AJAX is loading $('.response-container').html('&lt;img class="response-loader" src="&lt;?php echo base_url();?&gt;/img/loader.gif" &gt;'); // Prevent form submission evnt.preventDefault(); // Get all form inputs var inputs = $('#app-options-form :input[type="text"]'); // Put them in object as name=&gt;value var data = {}; for(i=0; i&lt;inputs.length; i++) { data[inputs[i]["name"]] = inputs[i]["value"]; } // Generate POST request $.post("&lt;?php echo site_url("admin/ajax_app_options"); ?&gt;", {"edit_form_submited" : true, "data" : data}, function (data) { $('.response-container').html(data.result); }, "json"); }); I'm having difficulties with validation of that form. If I put a field name as a parameter for set_rules(), it won't work because it will look for $_POST['field_name'] but this doesn't exist. The value of this field is passed as $_POST['data']['field_name'], because I'm passing all inputs as an object called "data". So, is there any way to validate this form? EDIT: My PHP code: // Get received data, here are all the input fields as $field_name=&gt;$field_value $data = $this-&gt;input-&gt;post('data'); // Try no. 1 for setting the rules foreach($data as $key=&gt;$value) { $this-&gt;form_validation-&gt;set_rules($key, 'Vrijednost', 'trim|xss_clean|max_length[5]'); } // Try no. 2 for setting the rules foreach($data as $key=&gt;$value) { $this-&gt;form_validation-&gt;set_rules($value, 'Vrijednost', 'trim|xss_clean|max_length[5]'); } // Try no. 3 for setting the rules foreach($data as $key=&gt;$value) { $this-&gt;form_validation-&gt;set_rules($this-&gt;input-&gt;post('data')['$key'], 'Vrijednost', 'trim|xss_clean|max_length[5]'); } These are my tries to set the rules, but none of…
type: AnsweredQuestion
tagged with: codeigniter
tagged with: forms
has title: Codeigniter Form Validation pass value instead field name
type: Question
accepted answer: http://stackoverflow.com/a/25203772
has comment: http://stackoverflow.com/comment/39215517
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39222198

http://stackoverflow.com/comment/39078516
type: QuestionComment
comment on: http://stackoverflow.com/q/25110166
score: 0
has text: @MatthewLock - Sure; I wasn't saying you did (although it may sound that way, I was only pointing out the OP had a real grievance). The music is beautiful, all well. `:)`
type: Comment

http://stackoverflow.com/comment/39245836
has text: @Rory McCrossan: It appears they have multiple issues (at least 3), so marking as duplicate for the delegation alone may not be appropriate. We need to see the full pages. Thanks :)
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25200743

http://stackoverflow.com/q/25109627
type: Question
has comment: http://stackoverflow.com/comment/39077271
has comment: http://stackoverflow.com/comment/39078039
accepted answer: http://stackoverflow.com/a/25110525
tagged with: angularjs
tagged with: uuid
has title: Inputting an UUID/GUID into a form's text input using Angular JS
score: 0
answer count: 1
tagged with: guid
linked to: http://stackoverflow.com/q/105034
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25110525
tagged with: javascript
has body: I am creating a form with several input options for the end user, but with one input which I would like to be an UUID/GUID. Here's what I have so far for the module (project.js): angular.module('project', ['ngRoute', 'firebase']) .value('fbURL', 'https://private.firebaseio.com/') .factory('Projects', function($firebase, fbURL) { return $firebase(new Firebase(fbURL)); }) .config(function($routeProvider) { $routeProvider .when('/', { controller:'ListCtrl', templateUrl:'list.html' }) .when('/edit/:projectId', { controller:'EditCtrl', templateUrl:'detail.php' }) .when('/new', { controller:'CreateCtrl', templateUrl:'detail.php' }) .otherwise({ redirectTo:'/' }); }) .controller('ListCtrl', function($scope, Projects) { $scope.projects = Projects; $scope.project = { trackid: 'UUID' }; }) .controller('CreateCtrl', function($scope, $location, $timeout, Projects) { $scope.project = { trackid: 'UUID' }; $scope.save = function() { Projects.$add($scope.project, function() { $timeout(function() { $location.path('/'); }); }); }; }) .controller('EditCtrl', function($scope, $location, $routeParams, $firebase, fbURL) { var projectUrl = fbURL + $routeParams.projectId; $scope.project = $firebase(new Firebase(projectUrl)); $scope.destroy = function() { $scope.project.$remove(); $location.path('/'); }; $scope.save = function() { $scope.project.$save(); $location.path('/'); }; $scope.project = { trackid: 'UUID' }; }); And here's what I have for the form input (in my detail.php file): Track ID As you can tell, in this example I'm simply inserting the text "UUID" where I would actually like to insert an UUID. I can't however seem to figure out how to insert a function there that would be generating this UUID. Any help would be very much appreciated! Thank you!

http://stackoverflow.com/comment/39115815
type: Comment
comment on: http://stackoverflow.com/a/25130750
has text: You managed to give the same answer as Alejandro Iván, only 18 minutes later.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25103000
has comment: http://stackoverflow.com/comment/39063757
has body: You can use strokeRect: setInterval(func, 1000); var x = document.getElementById("counter"); var d = document.getElementById("canv1"); var ctx = d.getContext("2d"); var i = 1; var c = 1; function func() { x.value = c; ctx.clearRect(0, 0, 100, 100); ctx.strokeRect(20 + c, 20, 40, 40); c++; } Demo: http://jsfiddle.net/ys9Yk/6/
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25102944
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25102944
type: Answer

http://stackoverflow.com/a/25189381
accepted answer of: http://stackoverflow.com/q/25189073
answers question: http://stackoverflow.com/q/25189073
score: 0
has comment: http://stackoverflow.com/comment/39224785
has body: Change the button's click function as follows. $('#myButton').click(function(){ $('.myDiv').css('height','auto'); // The above line will increase the height of div automatically //and avoids overlapping with other elements $('#myButton').css('display','none'); $('.myDiv').css('overflow','visible'); }); Instead of changing the height hard-coded, change the "overflow" property. Because this is the one which you must reset if the text needs to get wrapped around the image. Set it to 'visible' or 'inherit'. - http://jsfiddle.net/vivek_nk/z05cwh5g/3/
has comment: http://stackoverflow.com/comment/39224885
has comment: http://stackoverflow.com/comment/39224641
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/39272457
has text: @CBroe Some random number to indicate the user scrolled down. Should not matter though. Who scrolls just 1px?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25214866

http://stackoverflow.com/comment/39074917
score: 0
type: Comment
type: QuestionComment
has text: Sorry, I didn't upload the code because I was hoping for an "evident-solution-i-missed" like the binary/ascii thing. I will edit my original message in a few seconds to add the files. Anyway, guys you answer very fast ! Thanks a lot :)
comment on: http://stackoverflow.com/q/25108794

http://stackoverflow.com/q/25176418
upvote count: 2
type: AnsweredQuestion
score: 2
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25177490
has answer: http://stackoverflow.com/a/25177277
type: Question
answer count: 2
tagged with: highcharts
downvote count: 0
possible better answer: http://stackoverflow.com/a/25177277
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25177490
has body: Hi I am using highchart API for generating graph in loop for(i=1;i&lt;10;i++) { xseries = "{'INCOPAV','B&amp;M','SGS-ETSA'}"; yseries = "[{name: 'Generados',data: [49.9, 71.5, 106.4]}, {name: 'Cerrados',data: [83.6, 78.8, 98.5]}]"; generateAllGraph('graph_container'+i,'abcd'+i,xseries,yseries); } function generateAllGraph(container,graphTitle,XaxesSeries,YaxesSeries) { $('#'+container+'').highcharts({ chart: { renderTo: container, type: 'column' }, title: { text: graphTitle }, subtitle: { text: '' }, legend: { itemStyle: { fontSize: "10px" } }, xAxis: { categories: [XaxesSeries] }, yAxis: { min: 0, title: { text: 'Registros' } }, tooltip: { formatter: function() { return ''+ this.x +': '+ this.y +' Registros'; } }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0 } }, series: YaxesSeries }); } but it is not taking X and Y axes as per argument I think there is something wrong in passing X-axes and y-axes variable I tried it with using jQuery.parseJSON( ) but not getting result and giving output like this please help me
has title: Highchart is not working in jquery function
favorite count: 0

http://stackoverflow.com/q/25193930
has comment: http://stackoverflow.com/comment/39233308
tagged with: checkbox
tagged with: css
has body: I have been at this for two days and hope you can help. I have a form with eight text input fields and three checkboxes. Here is the HTML for said form: Underline Bold Italic I am trying to change the CSS of the input fields depending on whether or not the checkboxes are clicked. After that, I want to get the the new CSS for text-decoration, font-weight, and font-style and put these values into an array, where each of the 8 inputs has its own array. Underline, bold, and italic are supposed to just be true or false. I was able to get the text to change just fine after checking or unchecking the boxes, but when I tried to retrieve the new styles, I used console.log() and wasn't getting the correct values. Here is the jQuery I tried. I think I need an entirely new approach. The way I had it set up initially was to enable the user to click on the checkbox, say, for underline, and then click on each input to change it to having underlined text. This did work, and I'd like to try to keep it this way, if possible. It was just the retrieval of newly-changed styles I was having issues with. I know there's a more elegant way of doing this, so any help I can get is much appreciated. var thisElem = $(".textStyleSamples").attr("this-elem"); var sample = "Sample"; $(".ubem").change(function() { $(".textStyleSamples").each(function() { $("#" + thisElem + sample).on("click", function() { if ($("#underline").prop("checked")) { $(this).css("text-decoration", "underline"); } else { $(this).css("text-decoration", "none"); } if ($("#bold").prop("checked")) { $(this).css("font-weight", "bold"); } else { $(this).css("font-weight", "normal"); } if ($("#italic").prop("checked")) { $(this).css("font-style", "italic"); } else { $(this).css("font-style", "normal"); } }); }); }); var textElem = ["h1", "h2", "h3", "h4", "pageText", "aLink", "aVisited", "aHover"]; var isUnderlined = false; var isBold = false; var isItalic = false; var styleArray = new Array(8); $("#get_styles").on("click", functi…
type: Question
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39233347
has comment: http://stackoverflow.com/comment/39244177
answer count: 0
type: UnansweredQuestion
has title: How can I change the CSS of form inputs and then get the new CSS values with jQuery?

http://stackoverflow.com/a/25316188
type: Answer
has comment: http://stackoverflow.com/comment/39462819
has comment: http://stackoverflow.com/comment/39461774
downvote count: 0
answers question: http://stackoverflow.com/q/25204285
score: 3
has comment: http://stackoverflow.com/comment/39462132
upvote count: 3
has body: UPDATE I think your problem is the placeholder. Chrome & safari will resize the placeholder text as well, making it the defining text once you start typing. If you leave it out it works fine: http://jsfiddle.net/me2loveit2/qjvbhquj/11/ OLD RESPONSE Here is one solution: http://jsfiddle.net/me2loveit2/qjvbhquj/ I am using jQuery UI to bind the resize event to my fitText() function. JS: $("textarea").resizable({ resize: function() { fitText(); }, minWidth:'100px', minHeight:'50px' }); $(document).keyup(function(){ fitText(); }); function fitText(){ var textarea = $('textarea'); while((textarea.get(0).scrollHeight < textarea.outerHeight()) && (textarea.get(0).scrollWidth < textarea.outerWidth())){ textarea.css('font-size','+=1'); } while((textarea.get(0).scrollHeight > textarea.outerHeight()) || (textarea.get(0).scrollWidth > textarea.outerWidth())){ textarea.css('font-size','-=1'); } } fitText(); CSS: textarea{ text-align: center; width:100px; height:50px; overflow:hidden; } HTML: hi this is text
has comment: http://stackoverflow.com/comment/39463166

http://stackoverflow.com/q/25196001
accepted answer: http://stackoverflow.com/a/25196550
type: Question
has comment: http://stackoverflow.com/comment/39236893
has comment: http://stackoverflow.com/comment/39236864
answer count: 1
has answer: http://stackoverflow.com/a/25196550
tagged with: javascript
linked to: http://stackoverflow.com/q/6903762
has body: I need to test whether a given function object belongs to a certain class. Under Firefox and Chromium/Chrome, I can create a dictionary of function names, and then test whether somefunction.name in class_a_functions using function.name. This does not work in IE. I can't seem to create a dictionary of function objects to test for a functions containment. What is a cross-browser way to achieve this that does not involve hacking out the name from the function's toString representation and using that as a function identity. as expressed here?
has comment: http://stackoverflow.com/comment/39237718
linked to: http://stackoverflow.com/q/237104
upvote count: 1
has comment: http://stackoverflow.com/comment/39237684
has title: Cross browser function identity
has comment: http://stackoverflow.com/comment/39237766
tagged with: cross-browser
has comment: http://stackoverflow.com/comment/39236874
favorite count: 0
has comment: http://stackoverflow.com/comment/39237030
has comment: http://stackoverflow.com/comment/39236992
has comment: http://stackoverflow.com/comment/39236892
has comment: http://stackoverflow.com/comment/39236965
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39236910
tagged with: internet-explorer
downvote count: 0
score: 1

http://stackoverflow.com/a/25095063
answers question: http://stackoverflow.com/q/25088865
has comment: http://stackoverflow.com/comment/39075905
score: 0
has body: What you are trying to accomplish should be done with responsive design techniques. In a perfect world, you could just use media queries to adjust the css applied to format the content differently. But I have also had the need sometimes to do server side detection of the client, because I would render an entirely different widget based on the form factor. You seem to be using .shtml, which is a poor choice IMHO. Your webserver at a min must support php, and that is a way more powerful server side choice for your app. PhpMobileDetect is a great script that will give you a way to detect if it is mobile, tablet, or desk. Problem now is that we have enormous phones, or phablets. But it might just be the right fit for your task.
type: Answer
has comment: http://stackoverflow.com/comment/39075893

http://stackoverflow.com/a/25094586
upvote count: 22
downvote count: 0
answers question: http://stackoverflow.com/q/25093905
score: 22
type: Answer
has body: Welcome to McBurger, a fancy (yeah right) burger joint. The smell of dried-up grease invades your nostrils, causing your bowels to gurgle with a mixture of disgust and delight. You patiently wait in line behind a mother of what should be human children. Finally, you meet the teenage cashier face to face, not without some pity. You order a burger (surprise) and some fries. You pay up and wait a bit for your order. After some time, you get your burger, only to discover that they forgot your fries! You walk up to the cash register again, and ask for them. You again wait out for the fries to be ready. Once they are, you guzzle everything up and leave. What does this have to do with anything? The angsty cashier is the server, perhaps running php. You are the client, maybe a web browser capable of understanding html/css/js. To get service, you approach the counter and say "I want a burger". McBurger then prepares and gives you a burger. To get service, a web browser approaches the server and says "I want this page". Your server then prepares and gives you a page. The most important aspect of this is that there is no mingling of customer and McBurger. You won't prepare your own fries, and McBurger won't drink your milkshake. The same way, the web browser will not run php, and the server will not run javascript for you. If you want McBurger to give you their famous caramel ice-cream, you must approach the counter and ask for one. If you want your web-page to save something to the DB when you click a button, you must approach the server and ask it to do so. You and McBurger communicate over sound. Browsers and servers communicate over HTTP. Let's take a look at HTTP. Rabbit, where have you taken me? If you're running on pretty much any linux distro or a Mac, you have netcat installed. If you're on Windows, sorry, you'll have to take my word for the next section, or download a nc port or a telnet client of some sort. Anyway, open up your favourite terminal, and let's talk to …

http://stackoverflow.com/comment/39074480
score: 0
type: Comment
type: QuestionComment
has text: I wrote you an answer for it! good luck savioa
comment on: http://stackoverflow.com/q/25108632

http://stackoverflow.com/a/25149212
has comment: http://stackoverflow.com/comment/39150299
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39150582
has comment: http://stackoverflow.com/comment/39150373
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25148976
answers question: http://stackoverflow.com/q/25148976
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39150434
has comment: http://stackoverflow.com/comment/39150606
has body: there was few error please see here: http://plnkr.co/edit/5SpDRkMokbPCMRT8oB0r?p=preview app.directive('mypopover', function($compile, $templateCache) { var getTemplate = function(contentType, scope, element) { var template = $templateCache.get("templateId.html"); $.ajax({ type: "GET", url: 'pop.html', type: 'get', dataType: 'html', success: function(data) { console.log($(template).html(data)); var options = { content: data, placement: "right", html: true, date: scope.date }; $(element).popover(options); }, error: function(data) { alert(data) } }); return template; } return { restrict: "A", link: function(scope, element, attrs) { console.log('entering link') var popOverContent; popOverContent = getTemplate("user", scope, element); } }; }); html:
type: Answer

http://stackoverflow.com/comment/39074847
has text: Dear downvoter, if you still here, how could I improve my answer?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25097906

http://stackoverflow.com/comment/39083725
comment on: http://stackoverflow.com/a/25079247
type: AnswerComment
score: 0
type: Comment
has text: Thanks for your reply! I followed your second suggestion and it WORKED!!- var path = "${pageContext.request.contextPath}" and $("#tranTbodyId").append(' ' + key + ' ... Only change is I removed the double quotes before and after '/Fcipage.spr' instead just went with single quotes because when "" was present it inserted the escape char %22 which was not desirable for me.

http://stackoverflow.com/q/25222010
tagged with: php
tagged with: css
has answer: http://stackoverflow.com/a/25222090
type: Question
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has body: I am working with MyBB so I am limited slightly. I basically have a marketplace that lists a small 120x120 image next to each ad. I want it so when they hover the image it expands to a bigger image. My script automatically recreates thumbnails in various sizes and I am trying to use 320x240. I have tried doing the simple .image { height:320px; width:240px; } But have realized that it just stretches the image. So I am not trying to figure a new way to get my thumbnail to change. Also my thumbnail can ONLY be accessed via a PHP variable called {$GLOBALS['threadfields']['key']['thumbs']['160x120']['url']} And this will not display anything except the url to the image, but it is missing the domain name. So for example if I were to echo that variable I would get attach.php?f3fasdfsdfthumb=160x120 but to display it I would need to concatenate it to my domain name so it is www.domain.com/attach.php?f3fasdfsdfthumb=160x120 I am really lost on how to do this. Basically I just need the image displayed (which is a 120x120 thumbnail, to be swapped with a bigger thumbnail. I have edited my template to have this at the beginning. &lt;script type="text/javascript"&gt; var src = "http://www.worldeducationtips.com/&lt;?php echo $GLOBALS['threadfields']['mimage']['thumbs']['320x240']['url']; ?&gt;"; $('.productimage').hover(function(){ $(this).attr('src') = src; }); &lt;/script&gt; My img src class is called productimage.
has title: Switch thumbnail image size on hover

http://stackoverflow.com/comment/39268574
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25210726
score: 0
has text: Thank you guys for the help. The whole code is around 800 lines that is why I didn't post it. But since is working with Firefox and not with chrome, where would you start? how can I capture an event and debug it? I tried to set a breakpoint on the like of the event but It does not enter...

http://stackoverflow.com/q/25082074
has comment: http://stackoverflow.com/comment/39024742
has comment: http://stackoverflow.com/comment/39024710
has body: I have this custom js function $.fn.sense=function func() { and I am calling it later as setTimeout($.fn.sense(),1); Now the above line is giving a weird error on IE8 .. It says invalid argument? :( How so? It works in all sane browsers
type: Question
has title: Why does custom function says invalid argument in IE8
tagged with: internet-explorer-8
accepted answer: http://stackoverflow.com/a/25082121
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/39024929
has comment: http://stackoverflow.com/comment/39024674
has answer: http://stackoverflow.com/a/25082121
linked to: http://stackoverflow.com/q/7969088
type: AnsweredQuestion

http://stackoverflow.com/a/25122459
has comment: http://stackoverflow.com/comment/39100469
has body: I saw your error: You have 2 variables called uploads. One is an instance of the div and the other is the array. What you are basically doing is assigning it a new type whenever you launch the function and in the end you have no array to pull data from. Try renaming them.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39100942
has comment: http://stackoverflow.com/comment/39101175
has comment: http://stackoverflow.com/comment/39101472
has comment: http://stackoverflow.com/comment/39100393
has comment: http://stackoverflow.com/comment/39101537
answers question: http://stackoverflow.com/q/25122053
upvote count: 1
has comment: http://stackoverflow.com/comment/39100761
type: Answer

http://stackoverflow.com/q/25198398
answer count: 2
has body: I have a form like this: 3 options select... <?php echo $text_boton_form;?> >> and my function in javascript: function cambiar_url() { var provincia=document.getElementById(provincia).value; var poblacion=document.getElementById(poblacion).value; var aseguradora=document.getElementById(aseguradora).value; // URL friendly var URL_AMIGABLE="/Provincia:" +provincia+"/Ciudad:"+poblacion+"/Aseguradora:"+aseguradora+"/"; var url = 'http://fronesis.com/directorio/ver' + URL_AMIGABLE; document.getElementById('form_directorio').action = url; return true; } I would like have a dinamic action form. And no work... what is wrong?
tagged with: javascript
has answer: http://stackoverflow.com/a/25198458
score: 0
has comment: http://stackoverflow.com/comment/39241247
tagged with: action
has title: How to switch the 'action' field in an HTML form dynamically?
has answer: http://stackoverflow.com/a/25198694
accepted answer: http://stackoverflow.com/a/25198694
type: AnsweredQuestion
tagged with: forms
type: Question
possible better answer: http://stackoverflow.com/a/25198458

http://stackoverflow.com/q/25080047
favorite count: 0
has comment: http://stackoverflow.com/comment/39020718
type: Question
has comment: http://stackoverflow.com/comment/39032176
tagged with: command-line
tagged with: coffeescript
upvote count: 1
tagged with: knockout.js
answer count: 1
has comment: http://stackoverflow.com/comment/39020916
has answer: http://stackoverflow.com/a/25150244
has body: Trying to compile a simple coffee script to JS in command line fails with the following error: &gt; ReferenceError: ko is not defined at Object.&lt;anonymous&gt; &gt; (/Users/jikku/JS/ko_crashcourse/script.coffee:2:9) at &gt; Object.&lt;anonymous&gt; (/Users/jikku/JS/ko_crashcourse/script.coffee:1:1) &gt; at Module._compile (module.js:456:26) The coffeescript I am trying to compile: app_model = task: ko.observable() tasks: ko.observableArray() add_task: -&gt; @tasks.push @task() return ko.applyBindings app_model It works fine in JS2Coffee I used the command: coffee s.coffee Any ideas why?
tagged with: javascript
has title: CoffeeScript error
has comment: http://stackoverflow.com/comment/39020669
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/25150244
score: 1

http://stackoverflow.com/q/25199055
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39243245
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25199569
type: Question
has comment: http://stackoverflow.com/comment/39243075
tagged with: jplayer
has body: I'm trying to add the Jquery Jplayer http://jplayer.org to my Backbone App but cant get it running. I set up the script into my RequireJS config file and my console tells me that the script is loaded. So I setup a View to test it which looks like this: define([ 'app', 'backbone', 'audioplayer' ], function (App, Backbone, audioplayer) { var audioplayer = App.module(); var audioplayer = Backbone.View.extend({ template: 'audioplayer', initialize: function() { var self = this; $("#jquery_jplayer_1").jPlayer({ ready: function(event) { $(this).jPlayer("setMedia", { title: "Cro Magnon Man", mp3: "http://jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3", oga: "http://jplayer.org/audio/ogg/TSP-01-Cro_magnon_man.ogg" }); }, swfPath: "http://jplayer.org/latest/js", supplied: "mp3, oga" }); } }); return audioplayer; } ); and my HTML template: play pause stop mute unmute max volume All I got is the html on my view, but I'm not able to play the track what am I doing wrong?
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25199569
tagged with: javascript
has title: BackboneJS How to add JPlayer

http://stackoverflow.com/q/25204952
has comment: http://stackoverflow.com/comment/39253742
accepted answer: http://stackoverflow.com/a/25205418
has title: Create a custom color scheme based off a string in javascript
type: AnsweredQuestion
type: Question
tagged with: function
tagged with: javascript
score: 0
tagged with: colors
answer count: 3
has answer: http://stackoverflow.com/a/25205173
has body: I'm trying to make a web chart which displays various people in a different color based off of the person's name, that will be consistent for that name. For example, if one of my resources was "Jane Doe", she might be calculated to have a navy blueish color, and "John Smith" could be some sort of light green. The trick here is that I would need to make the color consistent for Jane and John wherever they showed up in the chart, but be noticeably different from every other name on the chart. Sometimes this chart will only have a few people, and sometimes it will actually be pretty busy, so assigning color schemes based off of some finite set seems like a bad idea to me. Additionally, I would need to make the foreground color contrast well with the background color, so that the chart was easy to read. How can I do this in a webpage? I am envisioning two javascript functions: getBackColor(name) and getForeColor(name) but I'm not married to the idea if there's a better way to approach this.
has answer: http://stackoverflow.com/a/25205418
possible better answer: http://stackoverflow.com/a/25205155
has answer: http://stackoverflow.com/a/25205155

http://stackoverflow.com/a/25195908
answers question: http://stackoverflow.com/q/25195755
has comment: http://stackoverflow.com/comment/39255827
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/39258946
has comment: http://stackoverflow.com/comment/39258590
accepted answer of: http://stackoverflow.com/q/25195755
has comment: http://stackoverflow.com/comment/39259481
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/39259406
has body: I use jQuery to set the date text field to read only, so values in these fields can be added by datetime picker here is the code: $("#textfield_id").attr('readOnly', 'true');
type: Answer

http://stackoverflow.com/comment/39132147
score: 0
type: AnswerComment
type: Comment
has text: Thanks! So I didn't play right with the `z-index property`
comment on: http://stackoverflow.com/a/25139660

http://stackoverflow.com/comment/39060262
has text: Wow Eric Bidelman there! Thanks Eric! And keep up the awesome work!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25101000

http://stackoverflow.com/comment/41236529
comment on: http://stackoverflow.com/a/25123019
has text: Hi Idan, I am getting the same error on my android application. Worklight version is 6.1.0.2 Interim Fix - 6.1.0.01.20140922-2007. Applied the CALL_PHONE permission in android manifest file and also updated the <access origin> as you specified.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25132154
has answer: http://stackoverflow.com/a/25132388
possible better answer: http://stackoverflow.com/a/25132207
has comment: http://stackoverflow.com/comment/39118210
downvote count: 0
has answer: http://stackoverflow.com/a/25132207
tagged with: wordpress-theming
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has body: I am making theme for Wordpress and my client wants blog titles always on 2 lines, even if there are only two words. Is it possible to somehow split the string always in middle? It should work something like this: = = = = = = = = = = = = = = = = = = Short = = title = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = A little = = longer title = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = long title = = with more words = = = = = = = = = = = = = = = = = =
tagged with: css
score: 2
accepted answer: http://stackoverflow.com/a/25132388
type: AnsweredQuestion
upvote count: 2
has title: Text always on two lines
type: Question
has comment: http://stackoverflow.com/comment/39118531
tagged with: javascript
has answer: http://stackoverflow.com/a/25132233
answer count: 3

http://stackoverflow.com/a/25232949
type: Answer
answers question: http://stackoverflow.com/q/25226400
accepted answer of: http://stackoverflow.com/q/25226400
score: 0
type: AcceptedAnswer
has body: I think you have a problem with redefining your functions - I forget the term, but as all functions defined in $rootScope are available in $scope your are probably screwing up the original $rootScope version. For example, a function defined here in $rootScope like this: $rootScope.hi = function() { console.log('hi'); } is available in $scope like this: $scope.hi(); You can either totally leave out the $scope version or rename it. I think this will fix your issue.

http://stackoverflow.com/a/25107287
score: 4
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25102897
accepted answer of: http://stackoverflow.com/q/25102897
has body: It can be done the following way : var input='bla\n\nbla\n\nShare something ...\n\nbla bla bla\n&lt;image tag&gt;&lt;/img&gt;bla\n&lt;image tag&gt;&lt;/img&gt;'; var output = input.split('Share something')[0]+'Share something'; console.log(output);
downvote count: 1
upvote count: 5

http://stackoverflow.com/comment/39086075
comment on: http://stackoverflow.com/a/25114957
score: 1
type: AnswerComment
has text: see http://stackoverflow.com/questions/3115360/multi-line-string-insert-using-jquery
type: Comment

http://stackoverflow.com/q/25196932
tagged with: kendo-asp.net-mvc
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25203594
has body: I am using Kendo ui grid for save the data. For Grid i am using Inline edit but my save button is not in individual row, grid data will save on one common button. My issue is below. I have lots of row in grid like 60 to 100 when I am pressing the save button that grid will loop of all the row which have (means loop will 60 to 100 times). I want below scenario : If I edit any 2 to 3 rows or 10 to 20 rows out of 100 and if I press the save button then only that edited row is update not all row. My code for save grid and binding of grid is as below. Please let me know if anyone find any solution. // Bind Grid function MakeGridFromXML(data) { var div = document.getElementById("divValidationPlans"); div.style.display = "block"; if (data.length == 0) { var customFieldString = " " + "<Field Id=\"TRTitle\" Title=\"TR Title\" Type=\"Text\" Value=\"\" class='k-textbox' />" + "<Field Id=\"TestType\" Title=\"Test Type\" Type=\"SingleSelect\" Value=\"\" />" + "<Field Id=\"TestProcedure\" Value=\"\" Title=\"Test Procedure\" Type=\"SingleSelect\" />" + "<Field Id=\"TestObjectives\" Value=\"\" Title=\"Test Objectives\" Type=\"Text\" /> "; data.push({ "CustomFields": customFieldString, "TestObjectives": "" }); } $("#grdTest").html(""); var fieldSchema = []; var columnSchema = []; columnSchema.push({ field: "", width: "30px", template: " ", }); var counter = 0; $.each(data, function (index) { counter = counter + 1; var isInsertUpdate = false; var xmldoc = $.parseXML(data[index].CustomFields); var $xml = $(xmldoc); var jsonStr = '{'; $xml.find("Fields").find("Field").each(function () { jsonStr = jsonStr + '"' + $(this).attr("Title").replace(/\s/g, '').replace(/[^\w\s]/gi, '') + '":{'; jsonStr = jsonStr + '"Title":"' + $(this).attr("Title") + '",'; jsonStr = jsonStr + '"Value":"' + $(this).attr("Value") + '",'; jsonStr = jsonStr + '"Id":"' + $(this).attr("Id") + '"},'; if (counter == 1) { var type = $(this).attr("Type"); switch (type) { case 'SingleSelect': if ($(this).attr("Id") != 'T…
type: Question
tagged with: kendo-grid
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25203594
score: 0
has title: Kendo Ui Grid Save Issue

http://stackoverflow.com/q/25216150
tagged with: javascript
tagged with: jquery
downvote count: 0
answer count: 1
favorite count: 0
tagged with: ajax
has title: File submit failing with jQuery's Form Data() and Ajax
type: UnansweredQuestion
has body: I have created a form to upload two files - questionpaper and the key. But the Ajax request is not working in an intended manner. I have been trying and trying but unable to figure out the bug. Please help. Here is my form. All fields are required Upload Question Paper Upload Key Here goes the javascript part.
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/39277118
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25216230

http://stackoverflow.com/comment/39197176
has text: because you defiend marker outside of map initialization function. I have edited your code please look at this demo [link](http://jsfiddle.net/farshadajdar/rskh26c4/)
type: Comment
comment on: http://stackoverflow.com/a/25136364
type: AnswerComment
score: 0

http://stackoverflow.com/q/25205534
score: 0
has answer: http://stackoverflow.com/a/25206355
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25206588
type: UnansweredQuestion
tagged with: jquery-ui
tagged with: dialog
type: Question
answer count: 2
has title: Javascript function shown in Jquery dialog
tagged with: javascript
tagged with: jquery
has body: I want a Jquery dialog box with a javascript function I have that displays a list of ingredients (the ingredients are coming from a database which is why I have it in a js function). I have this as a button: &lt;div id="dialog"&gt; //WANT showKeyIngredients() to show up in here, the dialog box &lt;/div&gt; &lt;div id="confirm-dialog"&gt; &lt;a href='#' class="buttonstyle2" onclick="showKeyIngredients();"&gt; Browse &lt;/a&gt; &lt;/div&gt; And this as my jQuery: $(function () { $("#dialog").dialog({ autoOpen: false, bgiframe: true, autoOpen: false, resizable: false, minHeight: 250, width: 700, height: 250, modal: true }); $("#confirm-dialog").click(function () { $("#dialog").dialog("open"); }); }); I apologize this is probably pretty messy as I am new to jQuery and have been just copying and pasting stuff altogether. I am not even sure if this is possible. I have been researching everywhere and haven't found anything. All I want is my showKeyIngredient() function to show up in the dialog box. The onclick in the html doesn't show up in the dialog box at all. http://jqueryui.com/dialog/ I like the dialog box here, but want my showKeyIngredients() function to show up in it. And have a button that pops up this dialog box.
has comment: http://stackoverflow.com/comment/39254716

http://stackoverflow.com/q/25157004
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/733314
tagged with: spring
has title: how to retrieve the returned value from the controller in the jsp using the ajax
linked to: http://stackoverflow.com/q/13209673
has answer: http://stackoverflow.com/a/25157435
type: Question
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/39164313
tagged with: ajax
score: 0
linked to: http://stackoverflow.com/q/2342371
answer count: 1
has body: this is my javascript code &lt;script type="text/javascript"&gt; function callMe() { var districtId = $("#district").val(); alert(districtId); $.ajax({ type: "POST", url: "addBranch", data: "districtId=" + districtId, success: function(response) { } }); } &lt;/script&gt; this is my controller code @RequestMapping(value = "/addBranch", method = RequestMethod.POST) public @ResponseBody List getForm1(@ModelAttribute Branch branch, Model model,@RequestParam("districtId") int districtId) { try { districtVillageList = villageService.getDistrictVillageList(districtId); } catch (Exception er) { log.error("error in addLoanType=" + er); } return districtVillageList; } I am getting the list in the controller, but as i am new to ajax,i dont know how to retrieve the list in the ajax and use the retrieved values in jsp...Please can any one helo me??

http://stackoverflow.com/a/25199064
has body: $( "div" ).each(function( index ) { if($( this ).text().contains($("#search").text())) $(this).hide(); }); try above code on blur event of textbox
type: Answer
downvote count: 1
score: -1
upvote count: 0
answers question: http://stackoverflow.com/q/25198709

http://stackoverflow.com/comment/39283069
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25220338
type: Comment
has text: What do you mean by degrees/pixel? How may I compute this? I know the size of the screen, the resolution, the zoom level as well, and as far as I know a tile is 256px, but I don't know the maths behind it, and I'm not sure what are you trying to say by degrees/pixel.

http://stackoverflow.com/q/25211545
has answer: http://stackoverflow.com/a/25211586
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25211601
score: 0
has body: I am trying to add the class last dynamically to every second row with jQuery as below blah blah blah blah2 Below is the jquery This does not add the class. Any help will be appreciated. I want the every second article element to have "last" appended.
has comment: http://stackoverflow.com/comment/39266007
has answer: http://stackoverflow.com/a/25211612
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has comment: http://stackoverflow.com/comment/39266027
type: AnsweredQuestion
has title: Add class dynamically using jquery
has answer: http://stackoverflow.com/a/25211702
possible better answer: http://stackoverflow.com/a/25211586
type: Question
accepted answer: http://stackoverflow.com/a/25211612

http://stackoverflow.com/q/25131388
has comment: http://stackoverflow.com/comment/39116949
has answer: http://stackoverflow.com/a/25131545
favorite count: 0
has body: I'm getting the browser's language code using: var lang = window.navigator.language; This returns the code (i.e. en-US). How do I convert this to the language name (i.e. English)?
score: 11
linked to: http://stackoverflow.com/q/3217492
tagged with: internationalization
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/69968496
upvote count: 11
has answer: http://stackoverflow.com/a/25131730
type: Question
has comment: http://stackoverflow.com/comment/39116862
possible better answer: http://stackoverflow.com/a/69968496
has title: How do you convert a language code to the language name in JavaScript?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25131545
has comment: http://stackoverflow.com/comment/39116824
answer count: 3

http://stackoverflow.com/comment/39229883
comment on: http://stackoverflow.com/q/25192132
type: Comment
type: QuestionComment
has text: My guess is that getElementByClassName:10 is the column and getElementByClassName:31 is the line, isn't?
score: 0

http://stackoverflow.com/q/25077449
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/4650692
has answer: http://stackoverflow.com/a/25077691
has answer: http://stackoverflow.com/a/25077806
has comment: http://stackoverflow.com/comment/39016846
has comment: http://stackoverflow.com/comment/39016306
has comment: http://stackoverflow.com/comment/39016094
type: Question
has comment: http://stackoverflow.com/comment/39016927
has title: How to know return of window.onbeforeunload
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39017771
has comment: http://stackoverflow.com/comment/39016080
has comment: http://stackoverflow.com/comment/39018085
has comment: http://stackoverflow.com/comment/39016020
has comment: http://stackoverflow.com/comment/39016187
has body: i have JS function window.onbeforeunload which returns a msg and browser shows that in confirmbox. Now how will i know whether user clicked on leave that page or stay on page ? Javascript window.onbeforeunload = function(e) { return "Click STAY ON PAGE then SAVE to save any data you've entered.\n If you've already SAVED select LEAVE PAGE to continue."; } http://jsfiddle.net/Ly6WE/

http://stackoverflow.com/comment/39184630
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25143806
type: Comment
has text: It was supposed to work. But it does not do anything. :/ I am gonna try again. So, I can choose your answer.

http://stackoverflow.com/comment/39231667
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25193096
has text: […] And if “security restrictions” means restrictions implemented by your system, you could handle those plus the case of “image not found” by doing an AJAX request for the image URL first – that you can answer with a text error message/an error code, that your script can react to. If no error is indicated, then make the same request again using an `Image` object (you might want to think about HTTP caching in this case; or make the AJAX request a HEAD request only instead of a full GET).

http://stackoverflow.com/comment/39075278
has text: It's more a principle question. But whats about the chaining I mentioned. Isn't it lost the way you proposed?
comment on: http://stackoverflow.com/a/25109074
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25138998
answers question: http://stackoverflow.com/q/25138873
has body: Use the .blur() function to remove the focus, like this: setInterval(function(){ if($("#dialogadd_participant").dialog("isOpen")){ $("#reg_id").blur(); } else { $("#reg_id").focus(); } }, 1000);
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25138873

google-chrome-extension
tags question: http://stackoverflow.com/q/25107774
tags question: http://stackoverflow.com/q/25229924
tags question: http://stackoverflow.com/q/25173120
tags question: http://stackoverflow.com/q/25087829
tags question: http://stackoverflow.com/q/25094387
tags question: http://stackoverflow.com/q/25092998
tags question: http://stackoverflow.com/q/25072940
tags question: http://stackoverflow.com/q/25148246
tags question: http://stackoverflow.com/q/25229422
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/25173372
tags question: http://stackoverflow.com/q/25130876
tags question: http://stackoverflow.com/q/25099409
tags question: http://stackoverflow.com/q/25151398
tags question: http://stackoverflow.com/q/25088698
tags question: http://stackoverflow.com/q/25156714
tags question: http://stackoverflow.com/q/25141080
tags question: http://stackoverflow.com/q/25077422
tags question: http://stackoverflow.com/q/25136465
tags question: http://stackoverflow.com/q/25158666
tags question: http://stackoverflow.com/q/25180184
tags question: http://stackoverflow.com/q/25093338
tags question: http://stackoverflow.com/q/25114200
type: Tag
tags question: http://stackoverflow.com/q/25125237
tags question: http://stackoverflow.com/q/25228957
tags question: http://stackoverflow.com/q/25214874
tags question: http://stackoverflow.com/q/25089832
tags question: http://stackoverflow.com/q/25192167
tags question: http://stackoverflow.com/q/25089958
tags question: http://stackoverflow.com/q/25195886
tags question: http://stackoverflow.com/q/25096284
tags question: http://stackoverflow.com/q/25174158

http://stackoverflow.com/q/25117566
has body: I have a button which must change what it does after meeting some condition. So I'm selecting the button by it's class and I want to remove that class upon meeting the condition and add a new class to the element and do something else with it. but it's not working. I just made up an example for my problem. this is the code: $('.button-1').click(function(){ $('.box').width(function(){ return $(this).width() + 10; }); $(this).removeClass('button-1').addClass('button-2'); }); $('.button-2').click(function(){ $('.box').width(function(){ return $(this).width() - 10; }); $(this).removeClass('button-2').addClass('button-1'); }); and it's Fiddle I expect this to toggle between increasing and decreasing the black box width, but it keeps on increasing.
tagged with: css
has title: jquery keeps on selecting element after changing the class
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25117611
type: Question
has answer: http://stackoverflow.com/a/25117611
answer count: 2
has answer: http://stackoverflow.com/a/25118314
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25118314

http://stackoverflow.com/a/25157840
type: Answer
has body: In asp.net mvc there is also a good feature ModelState.IsValid to check whether model validation has satisfied or not you can use that if somehow javascript is disabled in browser or somehow client validations bypassed.. public ActionResult Index() { if( ModelState.IsValid ) {} else {} } Always try to use ModelState.IsValid in asp.net mvc because client validations are never reliable and also there is no full proof way to check whether javascript is enabled or disabled..the advantage of using ModelState.IsValid is that if whether javascript is enabled or disabled your form will submit and all validations for model will be checked on controller side also..
answers question: http://stackoverflow.com/q/25157691
score: 0

http://stackoverflow.com/comment/39047442
score: 0
has text: If there is nothing in the console, your `connection` handler doesn't fire at all, because at least `undefined` should be in the console. Probably you have an error in some other place along with an error I've described in my answer.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25083564

http://stackoverflow.com/comment/39140738
type: QuestionComment
has text: Based on these questions [1](https://stackoverflow.com/questions/12005442/express-static-cannot-response-to-post-requests), [2](https://stackoverflow.com/questions/18326888/how-to-get-post-files-in-express-static) I believe it is.
comment on: http://stackoverflow.com/q/25128707
score: 0
type: Comment

http://stackoverflow.com/q/25222675
has comment: http://stackoverflow.com/comment/39288793
tagged with: javascript
has answer: http://stackoverflow.com/a/25222754
upvote count: 2
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39286823
has comment: http://stackoverflow.com/comment/39287143
has body: I am a beginner of Javascript. I have done some Python and Java before. I am not clear when and why we should store codes into different .js files or the same file. Is there any conventions and rules for this?
has comment: http://stackoverflow.com/comment/39287164
type: AnsweredQuestion
score: 2
downvote count: 0
linked to: http://stackoverflow.com/q/247209
has comment: http://stackoverflow.com/comment/131805802
accepted answer: http://stackoverflow.com/a/25222754
type: Question
has title: When should I save Javascript code into different files or the same file?

http://stackoverflow.com/comment/39193878
comment on: http://stackoverflow.com/q/25105502
score: 0
has text: @JaredFarrish (pjs dev here) that's actually a really bad example as it uses the native JS API instead of regular Processing syntax, and uses processing.js 1.0.0 which is years out of date =) A better example would be http://jsbin.com/ratafaqe/1/edit
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39105234
type: Comment
has text: aah.. All your states are managed by the same controller? Where do these code reside?
comment on: http://stackoverflow.com/q/25124886
score: 0
type: QuestionComment

http://stackoverflow.com/q/25147394
has answer: http://stackoverflow.com/a/75394396
tagged with: javascript
has answer: http://stackoverflow.com/a/79330275
favorite count: 0
has comment: http://stackoverflow.com/comment/39147146
has body: I have a bootstrap carousel on my web page, I'm trying the increase the time interval between each slide. The default delay of 5000 milliseconds is too fast, I need about 10 seconds.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39147002
tagged with: css
score: 57
has answer: http://stackoverflow.com/a/25147464
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/29938585
has answer: http://stackoverflow.com/a/51442695
has answer: http://stackoverflow.com/a/53516643
has answer: http://stackoverflow.com/a/29938585
has title: How to change the interval time on bootstrap carousel?
downvote count: 6
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/66026690
has answer: http://stackoverflow.com/a/37671872
accepted answer: http://stackoverflow.com/a/25147464
type: Question
answer count: 8
upvote count: 63
has comment: http://stackoverflow.com/comment/39146958

ios
tags question: http://stackoverflow.com/q/25230122
tags question: http://stackoverflow.com/q/25131839
tags question: http://stackoverflow.com/q/25115505
tags question: http://stackoverflow.com/q/25078590
tags question: http://stackoverflow.com/q/25195193
tags question: http://stackoverflow.com/q/25166238
tags question: http://stackoverflow.com/q/25210456
type: Tag
tags question: http://stackoverflow.com/q/25187403
tags question: http://stackoverflow.com/q/25174594
tags question: http://stackoverflow.com/q/25130726
tags question: http://stackoverflow.com/q/25219472
tags question: http://stackoverflow.com/q/25161579
tags question: http://stackoverflow.com/q/25097115
tags question: http://stackoverflow.com/q/25174582
tags question: http://stackoverflow.com/q/25094803
tag name: ios
tags question: http://stackoverflow.com/q/25077672
tags question: http://stackoverflow.com/q/25199372
tags question: http://stackoverflow.com/q/25198903
tags question: http://stackoverflow.com/q/25182943
tags question: http://stackoverflow.com/q/25151915
tags question: http://stackoverflow.com/q/25163497
tags question: http://stackoverflow.com/q/25160414
tags question: http://stackoverflow.com/q/25114339
tags question: http://stackoverflow.com/q/25113957
tags question: http://stackoverflow.com/q/25070113
tags question: http://stackoverflow.com/q/25228194
tags question: http://stackoverflow.com/q/25120749
tags question: http://stackoverflow.com/q/25169285
tags question: http://stackoverflow.com/q/25217508
tags question: http://stackoverflow.com/q/25176878
tags question: http://stackoverflow.com/q/25091123
tags question: http://stackoverflow.com/q/25121780
tags question: http://stackoverflow.com/q/25173806
tags question: http://stackoverflow.com/q/25095333
tags question: http://stackoverflow.com/q/25071105
tags question: http://stackoverflow.com/q/25115671

http://stackoverflow.com/q/25087358
type: Question
tagged with: ember.js
has comment: http://stackoverflow.com/comment/39060802
tagged with: ember-controllers
has comment: http://stackoverflow.com/comment/39043881
has title: emberjs-1.7.0-beta.4 can't access another controller's content using needs api
linked to: http://stackoverflow.com/q/25007423
has comment: http://stackoverflow.com/comment/39060773
upvote count: 1
duplicate of: http://stackoverflow.com/q/25007423
tagged with: javascript
type: UnansweredQuestion
tagged with: ember-router
has comment: http://stackoverflow.com/comment/39068107
has body: I am trying to use the needs api to get access the content of the PagesController from my IndexController. But it is not working, the only way I have gotten it to work is to add an IndexRoute and load it through the model hook. Is there a way to use controller needs api to access the content of another controller. Here is the JSBIN: http://jsbin.com/gubuvuhi/1/edit The PagesControllers: App.PagesController = Ember.ArrayController.extend({}); The IndexControler: App.IndexController = Ember.ArrayController.extend({ needs: 'pages', fetchPages: Em.computed.alias("controllers.pages.content"), }); The PagesRoute: App.PagesRoute = Ember.Route.extend({ model: function(){ return this.store.find('page'); } }); This index_template doesn't render fetchPages: But when I add an IndexRoute and change the IndexTemplate to this, it works & renders the right content: This is the IndexRoute, note that App.IndexRoute = Em.Route.extend({ model: function(){ return this.store.find('page'); } }); You will see that this.store.find('pages') is repeated in both IndexRoute and PagesRoute, I want to avoid this by using needs api to get PagesController's content from the IndexController. Is there a way to do this. Here is the JSBIN: http://jsbin.com/gubuvuhi/1/edit
linked to: http://stackoverflow.com/q/24560266
downvote count: 0
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/39046554
favorite count: 0

http://stackoverflow.com/comment/39053020
type: QuestionComment
has text: Is the rest of your code ever removing any of the DOM objects involved in these animations?
comment on: http://stackoverflow.com/q/25097074
score: 0
type: Comment

http://stackoverflow.com/comment/39053655
has text: I respect your judgement, but I don't intend to know what error he gets as I think he is capable of fixing the errors, just that he cannot see the error messages because it is an AJAX call and he is new to jQuery. Thus I am certain that by going directly to connectdb.php will answer "what I'm doing wrong. can someone help me?"
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25097418
type: Comment

http://stackoverflow.com/a/25170127
type: Answer
has body: This question is going to be closed, but let me take a moment to teach you how to think. You have a function replace which takes two parameters. You should want to look up what type the parameters should be. If you google "javascript replace", you'll see a link to MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace On this page, you'll see that the first parameter is regexp|substring. In that explanation, there is a link to the types RegExp and String. You should be able to recognize that /[^\w\s]/gi is not a string and therefore must be a RegExp. You can follow the link to the page on RegExp (Regular Expressions) and be enlightened. Learning how to think about problems will not only help you ask better SO questions, it will also help you be a better programmer.
downvote count: 0
answers question: http://stackoverflow.com/q/25169979
score: 3
upvote count: 3

http://stackoverflow.com/comment/39260688
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25208554
score: 0
has text: Yes, try it and tell me if you solve your problem

http://stackoverflow.com/comment/39065995
comment on: http://stackoverflow.com/a/25103920
has text: I don't seem to fully understand this yet, could you pass me some well written tutorial talking about it? I've been reading many tuts through the web btw.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25198191
tagged with: javascript
tagged with: jquery
has body: I have created a survey using LimeSurvey tool. For some customization, I have to implement the following task. Screenshot: Here, when the user clicks on the Next and if any of the questions are not answered, I want to inform the user that they have missed to answer. So when they click on Next, I would like to see a confirm box (Javascript) , which displays a message saying you have missed. Ther will be "It is Okay, proceed to next page" button and " I will stay here and answer" button. "It is Okay, proceed to next page" button should do the same functionality of the "Next" button. " I will stay here and answer" button will let the users stay in the same page. I know it is possible using Javascript, I am not sure how to implement this specific task. I just know that the ID of the Next button is "movenextbtn". But how will I check whether a question has not been answered when clicking Next button and also using the confirm box how will I proceed to next page or stay in the same page. Any help would be much much appreciated. Thanks in advance.
score: 0
tagged with: limesurvey
has comment: http://stackoverflow.com/comment/39242554
has comment: http://stackoverflow.com/comment/39241045
possible better answer: http://stackoverflow.com/a/25200570
has comment: http://stackoverflow.com/comment/39242278
has answer: http://stackoverflow.com/a/25200570
has comment: http://stackoverflow.com/comment/39242583
has answer: http://stackoverflow.com/a/25217859
linked to: http://stackoverflow.com/q/14957604
tagged with: php
type: AnsweredQuestion
has title: PHP/HTML form and Javascript confirm box
has comment: http://stackoverflow.com/comment/39241312
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25217859

http://stackoverflow.com/comment/39066492
score: 0
has text: I could be wrong but doesn't ES6 Map support non-string keys? i.e. `theMap.set(arr1, "test")`. Still, you could use JSON.stringify(arr1) or create a "real" hash function that converts a string into a number...
type: QuestionComment
comment on: http://stackoverflow.com/q/25104442
type: Comment

http://stackoverflow.com/comment/39175562
has text: You've included the wrong plugin. The **jQuery Form Validator** is not the **jQuery Validate** plugin.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25162447

http://stackoverflow.com/a/25177384
score: 2
has body: Replace onmousedown with onsubmit, and remove onclick="javascript:submitForm();" from your submit button.
upvote count: 2
has comment: http://stackoverflow.com/comment/39204003
has comment: http://stackoverflow.com/comment/39203797
answers question: http://stackoverflow.com/q/25177366
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39258961
type: Comment
comment on: http://stackoverflow.com/a/25207691
has text: That's a whole microsecond I didn't have before!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39039024
score: 0
type: Comment
type: QuestionComment
has text: What web server and framework are you using?
comment on: http://stackoverflow.com/q/25088917

http://stackoverflow.com/comment/39050555
comment on: http://stackoverflow.com/q/25095869
score: 1
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/4944750/how-to-subtract-date-time-in-javascript

http://stackoverflow.com/comment/39145503
type: Comment
type: QuestionComment
has text: Yes, I think that's best here. Check out [saving lists of data](https://www.firebase.com/docs/web/guide/saving-data.html#section-push) and also [AngularFire 0.8](https://www.firebase.com/docs/web/bindings/angular/guide.html), which provides array support built-in.
comment on: http://stackoverflow.com/q/25143225
score: 0

http://stackoverflow.com/comment/39198153
type: Comment
type: QuestionComment
has text: First of all, why you want to do that?
comment on: http://stackoverflow.com/q/25175173
score: 0

http://stackoverflow.com/comment/39089595
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25116710
type: Comment
has text: Can u able to get me a alternate suggestion or code for me

http://stackoverflow.com/comment/104199636
score: 0
has text: Note: using jQuery means loading the jQuery library first, instead for something so simple just use pure js. Include the js script and css rules required for the preloader in the head of the html doc. This will ensure a faster load.
type: Comment
comment on: http://stackoverflow.com/a/25219740
type: AnswerComment

http://stackoverflow.com/q/25221971
type: Question
has answer: http://stackoverflow.com/a/25222706
answer count: 2
accepted answer: http://stackoverflow.com/a/25222706
has comment: http://stackoverflow.com/comment/39286051
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25223027
has comment: http://stackoverflow.com/comment/39286779
has comment: http://stackoverflow.com/comment/39286346
linked to: http://stackoverflow.com/q/13216115
upvote count: 7
downvote count: 1
has title: How to use orderBy and filter with ng-repeat, using an object (instead of array)?
tagged with: angularjs-ng-repeat
tagged with: angularjs
score: 6
has body: I have data "like" this: $scope.persons = { "ID123": { name_de: "Andre", name_en: "Anrew", age: 30, description: "He is the father of xyz and . . .", . . . }, "IDabc": { name_de: "Markus", name_en: "Mark", age: 20, . . . }, "IDxyz": { name_de: "Isaak", name_en: "Isaac", age: 23, . . . } . . . } and i have an input/ng-repeat: &lt;input ng-model="query" placeholder="Suche . . ."&gt; &lt;ul&gt; &lt;li ng-repeat="p in persons | orderBy:'name_de' | filter:query"&gt; Some output here . . . &lt;/li&gt; &lt;/ul&gt; Now is the question how can i order and filter this? It worked with an Array of persons, but i need the "ID's" so the object is necessary!? I am looking also for a way to filter the object by N-properties e.g for name_de AND name_en (so it will show ID123 if i search for Andre and also if i search for Andrew) BUT ignoring the text of "description" (first i had the problem that the filter checks ALL properties)
has answer: http://stackoverflow.com/a/25223027
has comment: http://stackoverflow.com/comment/39285972
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39286175

http://stackoverflow.com/q/25094019
type: Question
has answer: http://stackoverflow.com/a/25094158
tagged with: javascript
tagged with: show-hide
answer count: 6
has answer: http://stackoverflow.com/a/25094059
has answer: http://stackoverflow.com/a/25094091
has title: hide/show html div with javascript
has body: my question hasn't already been asked because i don't want to know how i can hide/show a div element in html, but i would like to know why my method doesn't works. My javascript functions are executed even though i used "onclick" event. show&hide show hide text to show this is my css class: .hiddendiv { display:none; } .visiblediv { display:block; }
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25094089
accepted answer: http://stackoverflow.com/a/25094089
favorite count: 0
has comment: http://stackoverflow.com/comment/39054938
tagged with: css
has comment: http://stackoverflow.com/comment/39047302
has answer: http://stackoverflow.com/a/25094102
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25094059
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25094066

http://stackoverflow.com/a/25080124
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25079934
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: In Angular you use the ng-model directive in order to create a two-way data binding between your model (i.e. a JS variable) and the view (i.e. the &lt;div&gt;). Basically, this means that whenever you change the data in the view (through an input, for instance), the change will be reflected in your JS variable. See below: HTML: &lt;html ng-app="myApp"&gt; &lt;div ng-controller="MyCtrl"&gt; &lt;div&gt;{{myVariable}}&lt;/div&gt; &lt;input type="text" ng-model="myVariable" /&gt; &lt;/div&gt; &lt;/html&gt; JS: /* App global module */ var myApp = angular.module('myApp'); /* Define controller to process data from your view */ myApp.controller('MyCtrl', function($scope) { $scope.myVariable = "initialValue"; // this is the variable that corresponds to text inserted in your input }); Here, myVariable will have "initialValue" as an initial value. Any further changes to the input will overwrite the value of this variable. Also notice that {{myVariable}} injects the variable the data into your div. When you change the value in the input, the div text will be changed as well.
answers question: http://stackoverflow.com/q/25079934
score: 5

http://stackoverflow.com/a/25105642
type: Answer
answers question: http://stackoverflow.com/q/25105590
has body: By inserting a ? in the URL, you are making jQuery issue a request using the JSONP technique instead of XMLHttpRequest. To do this: Assign your load handler function to a global variable. You should generate a unique name for this. (e.g. var f_name = "jsonp" + ++unique_function_count; window[f_name] = function () { ... }). Replace the question mark in your URI with the function name Create a script element var script = document.createElement('script'); Set the URI as the source of the script (script.src = uri;) Load the script (document.body.appendChild(script);)
score: 0

http://stackoverflow.com/comment/39187538
score: 0
comment on: http://stackoverflow.com/q/25169285
type: QuestionComment
type: Comment
has text: I'm basically wondering if Safari's JS API exposes a way to launch a native select list (in iOS) with custom options without the need to have a select element in the DOM.

http://stackoverflow.com/a/25201862
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25201532
type: Answer
has comment: http://stackoverflow.com/comment/39273660
score: 1
has comment: http://stackoverflow.com/comment/39247691
upvote count: 1
has comment: http://stackoverflow.com/comment/39247670
has body: yeah below is approach to use step1:prevent zip file direct access order allow,deny deny from all step2: &lt;?php function output_file($file, $name, $mime_type='') { if(!is_readable($file)) die('File not found or inaccessible!'); $size = filesize($file); $name = rawurldecode($name); $known_mime_types=array( "htm" =&gt; "text/html", "exe" =&gt; "application/octet-stream", "zip" =&gt; "application/zip", "doc" =&gt; "application/msword", "jpg" =&gt; "image/jpg", "php" =&gt; "text/plain", "xls" =&gt; "application/vnd.ms-excel", "ppt" =&gt; "application/vnd.ms-powerpoint", "gif" =&gt; "image/gif", "pdf" =&gt; "application/pdf", "txt" =&gt; "text/plain", "html"=&gt; "text/html", "png" =&gt; "image/png", "jpeg"=&gt; "image/jpg" ); if($mime_type==''){ $file_extension = strtolower(substr(strrchr($file,"."),1)); if(array_key_exists($file_extension, $known_mime_types)){ $mime_type=$known_mime_types[$file_extension]; } else { $mime_type="application/force-download"; }; }; //turn off output buffering to decrease cpu usage @ob_end_clean(); // required for IE, otherwise Content-Disposition may be ignored if(ini_get('zlib.output_compression')) ini_set('zlib.output_compression', 'Off'); header('Content-Type: ' . $mime_type); header('Content-Disposition: attachment; filename="'.$name.'"'); header("Content-Transfer-Encoding: binary"); header('Accept-Ranges: bytes'); // multipart-download and download resuming support if(isset($_SERVER['HTTP_RANGE'])) { list($a, $range) = explode("=",$_SERVER['HTTP_RANGE'],2); list($range) = explode(",",$range,2); list($range, $range_end) = explode("-", $range); $range=intval($range); if(!$range_end) { $range_end=$size-1; } else { $range_end=intval($range_end); } $new_length = $range_end-$range+1; header("HTTP/1.1 206 Partial Content"); header("Content-Length: $new_length"); header("Content-Range: bytes $range-$range_end/$size"); } else { $new_length=$size; header("Content-Length: ".$size); } /* Will output the file itself */ $chunksize = 1*(1024*1024)…
downvote count: 0
has comment: http://stackoverflow.com/comment/39247591
has comment: http://stackoverflow.com/comment/39248504
accepted answer of: http://stackoverflow.com/q/25201532

http://stackoverflow.com/q/25092849
type: Question
has answer: http://stackoverflow.com/a/25093030
score: 1
answer count: 2
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25093030
has body: I'm trying to dynamically create 100 li's and append a "template" of html inside of each one. On top of that, I want to dynamically increment the id="Increment" span element by 1 inside that template like... 1, 2, 3 ---> 100 Desired Effect: http://jsfiddle.net/LQp5y/ Current Work: http://jsfiddle.net/QyWS7/ HTML Markup: HTML Template: 1 Buy Javascript (currently) var toAdd = document.createDocumentFragment(); for(var i=1; i < 101; i++){ var newLi = document.createElement('li'); newLi.id = 'Product'+i; newLi.className = 'item'; newLi.innerHTML = 'Product '+i; toAdd.appendChild(newLi); } document.getElementById('currentStore').appendChild(toAdd); Can someone show me the proper way to do this? Thanks in advance!
tagged with: templates
has answer: http://stackoverflow.com/a/25092914
has title: How to append html template inside a for loop in Javascript?
accepted answer: http://stackoverflow.com/a/25092914
tagged with: append
type: AnsweredQuestion
downvote count: 0
tagged with: innerhtml

http://stackoverflow.com/comment/39217186
comment on: http://stackoverflow.com/a/25183758
type: AnswerComment
score: 0
type: Comment
has text: My problem has been solved by surrounding the unwatch with `$timeout`with a null delay, this is explained here : http://stackoverflow.com/questions/779379/why-is-settimeoutfn-0-sometimes-useful#comment14183689_779785

http://stackoverflow.com/comment/39298712
comment on: http://stackoverflow.com/q/25228754
score: 0
type: Comment
type: QuestionComment
has text: That approach can work but is **wrong**!. You turn your object to string in your webmethod which in turns does the same thing again (string to jsonstring). So instead of getting the object directly from ajax (which does the deserialization by default) you need to do it again. So double-serialization + double-deserialization...... You can use it in your homework but don't use for professional apps..

http://stackoverflow.com/q/25080591
favorite count: 0
type: UnansweredQuestion
has title: Cocos2d-js EditBox zOrder not working
has comment: http://stackoverflow.com/comment/39370563
score: 1
upvote count: 1
tagged with: cocos2d-js
type: Question
has body: I have an EditBox on my layer. var ebox = new cc.EditBox(cc.p(200, 30)); ebox.setPosition(size.width / 2 - 50, size.height / 2); ebox.setPlaceHolder("Password"); ebox.setInputFlag(cc.EDITBOX_INPUT_FLAG_PASSWORD); ebox.setDelegate(this); ebox.setFontColor({"r": 0, "g": 0, "b": 0}); ebox.setFontSize(20); ebox.initWithBackgroundColor(cc.size(200, 30), {"r": 0, "g": 255, "b": 0}); ebox.init(); this.addChild(ebox, 1); //this - is a main layer then I have to display some kind of overlay over the main layer this.getParent().addChild(overlayLayer, 100); overlayLayer - layer filled with color The thing is that editbox stays always above the overlay. Why isn't zOrder working with EditBox??
has answer: http://stackoverflow.com/a/25278870
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: cocos2d-html5
has comment: http://stackoverflow.com/comment/39257342

http://stackoverflow.com/a/25194115
has comment: http://stackoverflow.com/comment/39444509
has body: I see one issue right away, since you're using the $.getJSON method the response is already converted to a JSON object when it's passed into your callback function. Remove the $.parseJSON call and process the response parameter as is and it should work provided the rest of logic is sound. Another item I noticed is your code to insert the drop down options into the table. You're using the jQuery text function which basically replaces the target containers contents each iteration through the loop. Try using the append method instead like so : $('#targetId').append(newHtml);
has comment: http://stackoverflow.com/comment/39467855
has comment: http://stackoverflow.com/comment/39482899
has comment: http://stackoverflow.com/comment/39460230
has comment: http://stackoverflow.com/comment/39276584
has comment: http://stackoverflow.com/comment/39375697
has comment: http://stackoverflow.com/comment/39462768
has comment: http://stackoverflow.com/comment/39483028
score: 0
has comment: http://stackoverflow.com/comment/39252648
has comment: http://stackoverflow.com/comment/39465988
has comment: http://stackoverflow.com/comment/39463503
has comment: http://stackoverflow.com/comment/39239813
answers question: http://stackoverflow.com/q/25189141
has comment: http://stackoverflow.com/comment/39474470
type: Answer
has comment: http://stackoverflow.com/comment/39483103

http://stackoverflow.com/a/25229788
type: Answer
has body: Try making sure, $ is defined at the time it's called. Putting this snippet if( typeof $ == "undefined" ){ $ = jQuery; } before Your JS will do the work or You.
answers question: http://stackoverflow.com/q/25229509
score: 0

http://stackoverflow.com/comment/39136433
type: Comment
score: 0
type: AnswerComment
has text: @knittl ahh carry on then. I'll just delete my stupid comment.
comment on: http://stackoverflow.com/a/25132334

http://stackoverflow.com/a/25126329
downvote count: 0
answers question: http://stackoverflow.com/q/25126284
has body: The easiest way to solve this would be to pass the handlers by reference: faqQuestion.click(showAnswer); faqClone.click(hideAnswer); Now this inside of showAnswer and hideAnswer will be the clicked element.
has comment: http://stackoverflow.com/comment/39107682
type: Answer
has comment: http://stackoverflow.com/comment/39107938
score: 7
accepted answer of: http://stackoverflow.com/q/25126284
upvote count: 7
type: AcceptedAnswer

http://stackoverflow.com/a/25212640
has comment: http://stackoverflow.com/comment/40420887
has body: I don't recognize that "start" object that your communicating with. It may be a Flash to JavaScript interface maybe? Typically a SCORM content API or 'wrapper' will locate the LMS API, and provide a series of friendly methods like go, stop, start, end, quit and then setting values. Raw SCORM 1.2 would be locating the LMS API - var result = API.LMSSetValue('cmi.core.lesson_location', '2'); // should return 'true' // or var bookmark = API.LMSGetValue('cmi.core.lesson_location', '2'); GL
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40421421
score: 2
has comment: http://stackoverflow.com/comment/40421302
answers question: http://stackoverflow.com/q/25205528
downvote count: 0

http://stackoverflow.com/comment/135692141
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/37759224
type: Comment
has text: Heads up: Maybe I'm seeing things, but when when Chrome dev tools is open, this fullscreen listener does not behave. With dev tools closed, I get expected correct behaviour. Context: In my web app, for testing I provide the user a button to open the app in fullscreen and visually, in template, I show state of both `document.fullscreenElement` and my own state tracking (e.g. a variable `enableFullscreen`). I get correct behaviour where both states match (ie "true true") when Chrome dev tools is closed, however with dev tools open, I get incorrect behaviour (ie "true false").

http://stackoverflow.com/q/25170621
has title: How to include a JS script to a part of the page?
has comment: http://stackoverflow.com/comment/39190289
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Noob needs help! Is it possible to include a script within a part of the page? The trouble is theat one part of the form needs JQuery chained and the other needs regular JQuery. Here's the code: $result=$result." Выберите тематику: Стадион Школа Бассейн Выберите раздел: Новости Статьи Новости Статьи Новости Статьи Выберите категорию: Мировые новости Новости РФ Новости города Наши новости Полезное Юмор "; $result=$result." Заголовок новости: &nbsp <submit type='button' value='Save'> "; I know that what I've done is wrong anyway because I'm trying to connect 3 different types of JQuery. SO that's why I'm here - to find out the proper way to to it correct. Thank you P.S.> I've looked through the search, but haven't found anything that suits my needs.
has answer: http://stackoverflow.com/a/25170769
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39190198
linked to: http://stackoverflow.com/q/1566595
score: 0
type: Question
accepted answer: http://stackoverflow.com/a/25170769

http://stackoverflow.com/comment/94937637
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/54051461
has text: Welcome to Stack Overflow! While this code may help with the question, it is better to include some context, explaining how it works and when to use it. Code-only answers tend to be less useful in the long run. See [How do I write a good answer?](https://stackoverflow.com/help/how-to-answer) for some more info.
score: 0

http://stackoverflow.com/comment/39252108
has text: It's because of the id change your jquery click handler to a class instead of an id
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25204265

http://stackoverflow.com/q/25228944
possible better answer: http://stackoverflow.com/a/25228978
tagged with: javascript
score: 0
answer count: 2
has body: I have a form with dynamic checkboxes based on MySQL data. On submit the DIV refreshes without blinking with JavaScript. I'm trying to send the form data to PHP for updating the MySQL but I constantly run into one error or another due to my lack of JavaScript knowledge. My current attempt (see below) gives the "TypeError: document.multipix_form.pix is undefined" error in FireBug. function multipicupdate(php_file, purpose, where) { var request = getXMLHTTP(); // call the function for the XMLHttpRequest instance var a = document.getElementById("optone").value ; var b = document.getElementById("table").value ; var boxes = document.multipix_form.pix.length txt = "" for (i = 0; i &lt; boxes; i++) { if (document.multipix_form.pix[i].checked) { txt = txt + document.multipix_form.pix[i].value + " " } } var the_data = 'purpose='+purpose+'&amp;var1='+a+'&amp;var2='+b+'&amp;var3='+txt; request.open("POST", php_file, true); // set the request request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); request.send(the_data); // calls the send() method with datas as parameter request.onreadystatechange = function() { if (request.readyState == 4) { document.getElementById(where).innerHTML = request.responseText; } } } The form name is multipix_form. The three form inputs are optone (select), table (select), and pix[] (checkbox). The pix[] is dynamic as I said before. It is the passing of the checkbox data from JavaScript to php that has me stumped. My form submit is : &lt;input type="button" onClick="multipicupdate('php/ajaxprocess.php', 'multipix', 'message_profile'); return false;" value="Save changes to this photo"&gt; The ajaxprocess.php will take the form data and update MySQL.
tagged with: jquery
has title: Checkboxes in Form to javascript to php
accepted answer: http://stackoverflow.com/a/25228999
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25228978
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25228999

http://stackoverflow.com/a/25098153
has comment: http://stackoverflow.com/comment/54171032
has comment: http://stackoverflow.com/comment/123052627
has comment: http://stackoverflow.com/comment/51499948
has body: Same-origin policy You can't access an &lt;iframe&gt; with different origin using JavaScript, it would be a huge security flaw if you could do it. For the same-origin policy browsers block scripts trying to access a frame with a different origin. Origin is considered different if at least one of the following parts of the address isn't maintained: protocol://hostname:port/... Protocol, hostname and port must be the same of your domain if you want to access a frame. NOTE: though mostly unused nowadays, Internet Explorer is known to not strictly follow this rule, see here for details. Examples Here's what would happen trying to access the following URLs from http://www.example.com/home/index.html URL RESULT http://www.example.com/home/other.html -&gt; Success http://www.example.com/dir/inner/another.php -&gt; Success http://www.example.com:80 -&gt; Success (default port for HTTP) http://www.example.com:2251 -&gt; Failure: different port http://data.example.com/dir/other.html -&gt; Failure: different hostname https://www.example.com/home/index.html:80 -&gt; Failure: different protocol ftp://www.example.com:21 -&gt; Failure: different protocol &amp; port https://google.com/search?q=james+bond -&gt; Failure: different protocol, port &amp; hostname Workaround Even though same-origin policy blocks scripts from accessing the content of sites with a different origin, if you own both the pages, you can work around this problem using window.postMessage and its relative message event to send messages between the two pages, like this: In your main page: const frame = document.getElementById('your-frame-id'); frame.contentWindow.postMessage(/*any variable or object here*/, 'https://your-second-site.example'); The second argument to postMessage() can be '*' to indicate no preference about the origin of the destination. A target origin should always be provided when possible, to avoid disclosing the data you send to any other site. In your &lt;iframe&gt; (contained in the main page…
has comment: http://stackoverflow.com/comment/105320862
has comment: http://stackoverflow.com/comment/116161938
has comment: http://stackoverflow.com/comment/87774441
downvote count: 2
has comment: http://stackoverflow.com/comment/129782773
has comment: http://stackoverflow.com/comment/44280825
has comment: http://stackoverflow.com/comment/102792549
has comment: http://stackoverflow.com/comment/54176194
has comment: http://stackoverflow.com/comment/134840949
has comment: http://stackoverflow.com/comment/87948546
score: 1196
has comment: http://stackoverflow.com/comment/84950413
has comment: http://stackoverflow.com/comment/59722316
has comment: http://stackoverflow.com/comment/62219675
has comment: http://stackoverflow.com/comment/87774067
has comment: http://stackoverflow.com/comment/129782744
has comment: http://stackoverflow.com/comment/138346058
has comment: http://stackoverflow.com/comment/84951015
has comment: http://stackoverflow.com/comment/70959057
has comment: http://stackoverflow.com/comment/75140921
has comment: http://stackoverflow.com/comment/59722565
answers question: http://stackoverflow.com/q/25098021
has comment: http://stackoverflow.com/comment/75141118
accepted answer of: http://stackoverflow.com/q/25098021
has comment: http://stackoverflow.com/comment/74355937
type: AcceptedAnswer
upvote count: 1198
has comment: http://stackoverflow.com/comment/74341330
has comment: http://stackoverflow.com/comment/87951580
has comment: http://stackoverflow.com/comment/71798555
has comment: http://stackoverflow.com/comment/63534477
has comment: http://stackoverflow.com/comment/119553095
type: Answer
has comment: http://stackoverflow.com/comment/102791644
has comment: http://stackoverflow.com/comment/84950955

http://stackoverflow.com/comment/39032975
score: 0
type: Comment
has text: On `li` anchor, I was thinking that your first code should work for any li that's clicked, right? doesn't matter really where.
type: AnswerComment
comment on: http://stackoverflow.com/a/25085498

http://stackoverflow.com/a/25134970
type: Answer
answers question: http://stackoverflow.com/q/25129377
has body: Hey buddy CSS doesn't have such kinda functionality. However you can use CSS selectors with jQuery.
score: 0

http://stackoverflow.com/a/25193640
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
has body: If your inline function being passed into y is being called asynchronously, i will be equal to data.length when it is called. To avoid this, you can simply use the array forEach method like so: var data = [44,23]; var line = []; data.forEach(function(dataItem, i) { line[i] = d3.svg.line() .interpolate("monotone") .y(function(d) { return dataItem; }); });
type: Answer
answers question: http://stackoverflow.com/q/25193509
accepted answer of: http://stackoverflow.com/q/25193509

http://stackoverflow.com/comment/39051066
has text: What could `document.getElementById('dump').id="dump"` possibly do?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25096106
type: Comment

http://stackoverflow.com/comment/39005422
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25071566
has text: thats DO the TRICK!! Thanks a lot!

http://stackoverflow.com/q/25107634
tagged with: firefox
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39073276
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/39072840
answer count: 0
type: UnansweredQuestion
type: Question
has title: Can't change height and width of SVG in Firefox when layered on Canvas
has body: Goal: An SVG layered on top of a Canvas, both of them changing their size when a PDF is rendered to the canvas. Problem: The canvas resizes correctly and the PDF displays, but the SVG always has width of zero and height of zero, when examined in the inspector. Note: This all worked when I was rendering a JPG directly into the element containing the SVG, but when I switched to rendering a PDF as an image I had to use a Canvas. HTML: &lt;body&gt; &lt;canvas id="pdfcanvas"&gt;&lt;/canvas&gt; &lt;svg id="overlay"&gt;&lt;/svg&gt; &lt;input type='file' multiple='false', onchange='loadPDF(this)'&gt;&lt;/input&gt; &lt;/body&gt; CSS: #pdfcanvas { position:relative; z-index:1; } #overlay { position:relative; z-index:2; } The javascript correctly opens the PDF and renders it in the canvas, but no matter what I try when I look at the SVG in the element inspector it has width and height of zero. I've tried setting it's width and height to 100%. I've tried explicitly setting its dimensions the same time that I set the canvas dimensions, i.e.: var viewport = page.getViewport(scale); var canvas = document.getElementById('pdfcanvas'); canvas.height = viewport.height; canvas.width = viewport.width; var overlay = document.getElementById('overlay'); overlay.height = viewport.height; overlay.width = viewport.width; I've tried putting the svg before the canvas, nesting it inside the canvas...no effect.
has comment: http://stackoverflow.com/comment/39072534
tagged with: layer

http://stackoverflow.com/comment/39172413
type: AnswerComment
has text: Good answer, but don't forget to mention why are you suggesting `.on()` instead of `.live()`. We both know, but it's good to keep as part of the answer.
type: Comment
comment on: http://stackoverflow.com/a/25161544
score: 1

http://stackoverflow.com/q/25206095
tagged with: vlc
type: UnansweredQuestion
score: 0
has title: ember.js and x-vlc-plugin
has body: I'm trying to embed x-vlc-plugin into my ember.js code. HTML: template: Ember.Handlebars.compile( */ * VLC Player Audio Tag */ ' ' ) Controller: player2: null, playMusic: function() { this.set('player2', $('#audioX')[0]); this.player2.playlist.play(); }, Error: Uncaught TypeError: Cannot read property 'play' of undefined Why, if simple HTML page (witohut ember.js) works fine? test
type: Question
has answer: http://stackoverflow.com/a/25212153
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js

http://stackoverflow.com/q/25113698
type: UnansweredQuestion
tagged with: phoria.js
type: Question
has answer: http://stackoverflow.com/a/31137535
answer count: 1
downvote count: 0
has title: Moving the entities in Phoria.js
tagged with: javascript
favorite count: 0
has body: I am trying to make a game in which ball gets bounced and fall into a bin. The position of the bin to appear is random. Is there a way I can move my ball entity to jump and land based on the dynamic coordinates of bin. If suppose I know the direction and distance of the bin, how can I make the ball to move such that it appears that ball falling into the bin. In Three.js, this was achieved by changing position.x, position.y and position.z. How to achieve this in phoria.js? Also is there a way to increase the rendering speed?
tagged with: three.js
score: 2
upvote count: 2

http://stackoverflow.com/a/25107879
has body: I'd use javax.xml.xpath. See XPath Tutorial - Example 6: Values of attributes can be used as selection criteria. Note also that there is not necessarily a (single) element's class name. id is unique in a Document whereas class is not. So it should rather read elements' class name. (Subtle, but important. :-) In other words: there is not necessarily just one Element returned when searching for a given class.
type: Answer
answers question: http://stackoverflow.com/q/25107554
score: 0

http://stackoverflow.com/a/25252061
score: 1
upvote count: 1
has body: I hammered out a workable solution to this. The selected text range can be in one of four states when I start: startContainer in a span endContainer in a span no no yes no no yes yes yes And I'm able to surround each of these by an h1 by applying one of the four operations below: don't change start or end container; apply h1 as is set end to after focusNode parent set start to before anchorNode parent set end to after focusNode parent and set start to before anchorNode parent So I go down through these four operations, applying each one to my range, and after each I see if canSurround() returns true. When it does I stop and do the surround. The code is: case "RTE_h1_icon" : newNode = document.createElement("h1"); var sel = rangy.getSelection(); anchorParent = sel.anchorNode.parentNode; focusParent = sel.focusNode.parentNode; range = sel.getRangeAt(0); if(range.canSurroundContents()) { // no modification range.surroundContents(newNode); break; } range1 = range; range1.setEndAfter(focusParent); // adjust end if(range1.canSurroundContents()) { range1.surroundContents(newNode); break; } range2 = range; range2.setStartBefore(anchorParent); // adjust start if(range2.canSurroundContents()) { range2.surroundContents(newNode); break; } range3 = range; range3.setStartBefore(anchorParent); // adjust start range3.setEndAfter(focusParent); // and end if(range3.canSurroundContents()) { range3.surroundContents(newNode); break; } break; If anyone has a better solution or sees problems with what I'm doing I'd be glad to hear from you. Thanks
answers question: http://stackoverflow.com/q/25221555
downvote count: 0
type: Answer

http://stackoverflow.com/q/25094765
has title: JSON and JavaScript integration when formatting a SPARQL query in HTML
tagged with: sparql
upvote count: 3
answer count: 1
has answer: http://stackoverflow.com/a/25128079
has body: I have an HTML + SPARQL + JSON + JavaScript program that works correctly, shown here: http://ontomatica.com/public/test/clavius.html Here is the SPARQL + JSON + JavaScript code: function retrieveData() { var query = "PREFIX : <http://dbpedia.org/resource/> PREFIX dbp: <http://dbpedia.org/ontology/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dbpprop: <http://dbpedia.org/property/> SELECT ?person ?b_date ?d_date ?abstract ?thumbnail WHERE { ?person rdf:type dbp:Person ; dbp:birthDate ?b_date ; dbp:deathDate ?d_date ; dbp:abstract ?abstract . OPTIONAL { ?person dbp:thumbnail ?thumbnail } FILTER ( ?b_date >= '1488-01-01'^^xsd:date && ?b_date < '1600-01-01'^^xsd:date && ?d_date < '1650-01-01'^^xsd:date ) FILTER ( langMatches(lang(?abstract), 'EN')) } ORDER BY ?person ?b_date"; var url = 'http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=' + encodeURIComponent(query) + '&output=json'; $.ajax({ url: url, dataType: "json", success: function (data) { $('#results').show(); $('#raw_output').text(JSON.stringify(data, null, 3)); handle_json(data); }, error: function(e) {} }); } function handle_json(json) { $('#output_div').text(""); $.each( json['results']['bindings'], function(index, value) { var html = ""; name = value['person']['value'].replace("http://dbpedia.org/resource/", ""); name = decodeURIComponent(name.replace(/_/g, " ")); html += " " + name + ": (" + value['b_date']['value'] + " - " + value['d_date']['value'] + ") "; if (value['thumbnail'] != null) html += " "; else html += " "; html += " " + value['abstract']['value'] + " "; $('#output_div').append(html); } ); } However, a new version of the program does not work correctly. Here are the components. The modified SPARQL query works correctly: PREFIX : <http://dbpedia.org/resource/>PREFIX dbp: <http://dbpedia.org/ontology/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX dbpprop: <http://dbpedia.org/property/>SELECT ?food ?abstract ?thumbnail ?caption WHERE…
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39048585
has comment: http://stackoverflow.com/comment/39108691
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25128079
favorite count: 0
type: Question
score: 3

yii
tags question: http://stackoverflow.com/q/25082279
tag name: yii
type: Tag
tags question: http://stackoverflow.com/q/25126392
tags question: http://stackoverflow.com/q/25139591
tags question: http://stackoverflow.com/q/25124796
tags question: http://stackoverflow.com/q/25096116

http://stackoverflow.com/a/25125877
type: Answer
answers question: http://stackoverflow.com/q/25125455
score: 0
has comment: http://stackoverflow.com/comment/39107722
has body: I have seen something similar done in three different ways. I don't follow your use case so I am unsure which may work well for you. Here are the three ways I know of to accomplish something similar. Use a Custom Directive to get the information and display it in the same way. If the listing is different between the pages this may not make sense. Create a Service which incapsulates the logic and state for the information which needs to be used across controllers. This works well if the important factor is the logic and state of the information and the display may be different. Use Observers to communicate information between controllers. I find this to be a frustrating route because it is hard to test. It does work well when there is an even which occurs often and needs to trigger multiple actions, but I do not recommend this route. Posting some code with your question may help. Thank you.

http://stackoverflow.com/comment/39065822
type: Comment
comment on: http://stackoverflow.com/a/25104164
has text: how to do that @ninetwozero?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39107463
has text: You can also use the `.change()` event.
comment on: http://stackoverflow.com/a/25126205
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25164048
answers question: http://stackoverflow.com/q/25163906
upvote count: 2
type: AcceptedAnswer
has body: If you were looking for a jQuery solution this should suffice. Use .map() var arrayDisposals = $('input[type="checkbox"][name*="Del"]:visible').map(function(){ return this.id+ "|" + this.checked }).get(); Use attribute selector to find checkboxes and where the name contains "Del" and :visible to check if it is not hidden. DEMO
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25163906
downvote count: 0

http://stackoverflow.com/q/25073102
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25073427
favorite count: 0
score: -3
accepted answer: http://stackoverflow.com/a/25074386
tagged with: css
type: AnsweredQuestion
upvote count: 0
has title: Resize text simultaneously while resizing textarea
has comment: http://stackoverflow.com/comment/39007978
has answer: http://stackoverflow.com/a/25074386
has comment: http://stackoverflow.com/comment/39008082
has answer: http://stackoverflow.com/a/25073427
type: Question
tagged with: javascript
has body: How to resize text simultaneously while resizing the textarea. Below is my code. Below is my jQuery. I guess the issue is to do with the click function been seperated? Not sure though. I'd like some advice in fixing this please. JsFiddle: (did not allow to post the JsFidde so here it is http: // jsfiddle.net / mr_eirenaios/Tr92Q/8/) $("#aTx").click(function () { $("#DVtx").append(' Type Here '); }); var diagonalScl; var txSiz; $(function () { $("#DVtx").resizable({ alsoResize: '#aText', create: function (event, ui) { diagonalScl = diagonalSwItms(); txSiz = parseInt($("#aText").css("font-size")); }, resize: function (e, ui) { var diagonalSclNw = diagonalSwItms(); var ratio = diagonalSclNw / diagonalScl; $("#aText").css("font-size", txSiz + ratio * 3); } }); }); function diagonalSwItms() { var contentWidth = $("#aText").width(); var contentHeght = $("#aText").height(); return contentWidth * contentWidth + contentHeght * contentHeght; }
tagged with: jquery
has comment: http://stackoverflow.com/comment/39010943
answer count: 2
downvote count: 3

http://stackoverflow.com/comment/39038405
type: QuestionComment
comment on: http://stackoverflow.com/q/25089024
type: Comment
has text: EDDITED: In create_db I'm using call back function!
score: 0

http://stackoverflow.com/q/25152020
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39157908
has answer: http://stackoverflow.com/a/25152033
upvote count: 1
downvote count: 1
type: Question
tagged with: javascript
score: 0
answer count: 1
has body: Can I have something like this?
has title: Can I code inside script if src is not found?

http://stackoverflow.com/comment/39109925
type: AnswerComment
comment on: http://stackoverflow.com/a/25115289
type: Comment
has text: @Genome314 You never know. :) Glad to see it helped you.
score: 0

http://stackoverflow.com/comment/39079568
type: AnswerComment
score: 0
type: Comment
has text: Yes I did want the slide-out panel to be vertically aligned to the viewport, you are spot on. :) Thank you for pointing out other things wrong with my code, I am relatively new to all of this so it's nice to see what I do wrong, best practices, etc.
comment on: http://stackoverflow.com/a/25111292

http://stackoverflow.com/comment/39030217
has text: Something can't be "totally functional" and yet "not work" for you.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25084780

http://stackoverflow.com/comment/39024907
type: Comment
comment on: http://stackoverflow.com/a/25080169
score: 0
type: AnswerComment
has text: Sounded very plausible, and thanks, but it still doesn't work. The controller is not called.

http://stackoverflow.com/q/25104137
has comment: http://stackoverflow.com/comment/39066251
has body: I have a services page that links to an appointment page with a form and I would like the service selected to change in the dropdown to the correct service chosen. The only solution to a similar question I could find was this answer below. However it does not appear to work when the form is on a separate page. When I copied the form onto the same page and use an anchor to the bottom of the page it will change the field however when using the link to the other page it does not. I am assuming this is due to the fact that it is on another page however I cannot locate much in regards to this situation. I have included copies from my code of this, I believe I have included the relevant snippets from each section. Change dropdown option with jQuery/Javascript on link click Declaring Scripts On Both Pages Head: Code From HTML Link on Service Page: Code From JS: var $select = $('#package'); $('a[href="BookAppointment.html"]').click(function () { $select.val( $(this).data('select') ); }); Code From Appointment Form (More Options Not listed): Exterior Wash Bronze Thanks in advance for any help with this.
has title: Changing form select field with a link clicked on a different page
has comment: http://stackoverflow.com/comment/39066095
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39066539
has comment: http://stackoverflow.com/comment/39066071
type: AnsweredQuestion
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/39066055
has answer: http://stackoverflow.com/a/25104720
tagged with: javascript
tagged with: forms
accepted answer: http://stackoverflow.com/a/25104720
score: 2
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/39066673
tagged with: jquery
linked to: http://stackoverflow.com/q/14737479
favorite count: 0

http://stackoverflow.com/q/25122977
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39101201
has body: What I'm trying to achieve is using a single element, by onclick, is add and remove 2 class names on 2 independent elements simultaneously. Here is my element I'm using to trigger the js/jquery. Then once clicked turn these elements from this (menu_hide & lockscreen_on): to this (menu_show & lockscreen_off): Jquery/JS document.getElementById('#myElementId').addEventListener('click', function() { .removeClass('menu_hide lockscreen_on').addClass('menu_show lockscreen_off'); }, false); document.getElementById('#myElementId').addEventListener('click', function() { .removeClass('menu_show lockscreen_off').addClass('menu_hide lockscreen_on'); }, false); Open to better practices too as I'm trying to achieve unnoticeable page loading.
accepted answer: http://stackoverflow.com/a/25123077
score: 0
tagged with: element
has comment: http://stackoverflow.com/comment/39102104
tagged with: class-names
has title: Add/Remove multiple classes on multiple elements simultaneously
type: AnsweredQuestion
tagged with: onclick
has comment: http://stackoverflow.com/comment/39101224
possible better answer: http://stackoverflow.com/a/25123242
has comment: http://stackoverflow.com/comment/39101356
has answer: http://stackoverflow.com/a/25123242
linked to: http://stackoverflow.com/q/8575772
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25123077

http://stackoverflow.com/q/25149483
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25149610
accepted answer: http://stackoverflow.com/a/25149610
favorite count: 0
has body: I have parents and children. As you'd expect, a Parent 'hasMany' Child objects. I am able to create a new Parent just fine, but I can not get new Child objects to show up on my template. According to the Chrome and Firefox Ember debug tool, it looks like the Child objects are being created in the store correctly. But the new children never appear in the template. I believe I've followed the Ember docs to the letter, and yet I can not get my code to work. I've created the following jsbin to demonstrate my situation. http://emberjs.jsbin.com/zodorule How do I create new many-related objects in Ember?
tagged with: ember.js
type: AnsweredQuestion
type: Question
upvote count: 4
tagged with: ember-data
tagged with: javascript
score: 4
has title: How to create an object in a one to many relationship

http://stackoverflow.com/a/25151147
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Just for completeness, Ember works just fine without Ember Data. You can use POJOs with Ember if you don't feel like using Ember Data. Additionally you need to use async instead of asynch. For async records using links is a totally appropriate way to handle the relationships. App.Gathering = DS.Model.extend({ name: DS.attr('string'), events: DS.hasMany('event', { async: true }) }); App.Event = DS.Model.extend({ name: DS.attr('string'), startDate: DS.attr('string'), endDate: DS.attr('string'), gathering: DS.belongsTo('gathering', { async: true }) }); This is totally opinion at this point, but I might do something like this if I were querying for gathering with the id 1. To query this.store.find('gathering', 1); JSON response { gathering: { id: 1, name: 'foo', links: { events: '/events?gathering_id=1' } } } When you access the events relationship it would call '/events?gathering_id=1' Example: http://emberjs.jsbin.com/OxIDiVU/906/edit
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25150817
score: 1
answers question: http://stackoverflow.com/q/25150817

http://stackoverflow.com/comment/39151569
type: AnswerComment
comment on: http://stackoverflow.com/a/25149749
type: Comment
has text: > With the `+`; `no trailing commas,,` becomes `no trailing comma*s*`. Geez, this thread's got a problem with the plural of comma
score: 0

http://stackoverflow.com/comment/39254798
type: QuestionComment
comment on: http://stackoverflow.com/q/25205563
has text: thanks for the comment Eshan but j08691 spotted the error, pretty bad mistake - only using notepad to edit the script to hard to pick these things up, good spot!
score: 0
type: Comment

http://stackoverflow.com/a/25084832
type: Answer
has comment: http://stackoverflow.com/comment/100558229
has comment: http://stackoverflow.com/comment/46434401
accepted answer of: http://stackoverflow.com/q/25080121
answers question: http://stackoverflow.com/q/25080121
score: 16
has body: I would actually use both methods you've discussed: check the content-legnth header, and watch the data stream to make sure it doesn't exceed your limit. To do this I'd first make a HEAD request to the URL to see if the content-length header is available. If it's larger than your limit, you can stop right there. If it doesn't exist or it's smaller than your limit, make the actual GET request. Since a HEAD request will only return the headers and no actual content, this will help weed out large files with valid content-lengths quickly. Next, make the actual GET request and watch your incoming data size to make sure that it doesn't exceed your limit (this can be done with the request module; see below). You'll want to do this regardless of if the HEAD request found a content-length header, as a sanity check (the server could be lying about the content-length). Something like this: var maxSize = 10485760; request({ url: url, method: "HEAD" }, function(err, headRes) { var size = headRes.headers['content-length']; if (size &gt; maxSize) { console.log('Resource size exceeds limit (' + size + ')'); } else { var file = fs.createWriteStream(filename), size = 0; var res = request({ url: url }); res.on('data', function(data) { size += data.length; if (size &gt; maxSize) { console.log('Resource stream exceeded limit (' + size + ')'); res.abort(); // Abort the response (close and cleanup the stream) fs.unlink(filename); // Delete the file we were downloading the data to } }).pipe(file); } }); The trick to watching the incoming data size using the request module is to bind to the data event on the response (like you were thinking about doing using the http module) before you start piping it to your file stream. If the data size exceeds your maximum file size, call the response's abort() method.
type: AcceptedAnswer
downvote count: 0
upvote count: 16
has comment: http://stackoverflow.com/comment/46435356

http://stackoverflow.com/q/25115611
has comment: http://stackoverflow.com/comment/39096084
score: 0
has comment: http://stackoverflow.com/comment/39092976
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39088434
type: UnansweredQuestion
tagged with: node.js
tagged with: loading
answer count: 0
has body: When I am running from the cmd its showing that Connected to MongoDB but when I am running in the localhost its showing that CANNOT GET. I dont know why. var express = require('express'), filter = express(), server = require('http').createServer(filter), io = require('socket.io').listen(server), mongoose = require('mongoose'); server.listen(7550, '127.0.0.1'); console.log('Server running at http://127.0.0.1:7550/'); mongoose.connect('mongodb://localhost/filter_CheckBoxSchema', function(err){ if(err){ console.log('What happened!!!'); } else{ console.log('Connected to mongodb!'); } }); var filter_CheckBoxSchema = mongoose.Schema({ category : { name: String, type: Boolean, default: false }, created: {type: Date, default: Date.now} }); var Filter = mongoose.model('Filter', filter_CheckBoxSchema); filter.post('example.html', function(req, res){ new Filter({ name: req.body.name, type: req.body.gender, }).save(function(err, doc){ if(err) res.send('Successfully not inserted...'); else res.send('Successfully inserted!!!'); }); }); Please Help Thanks in advance.
has comment: http://stackoverflow.com/comment/39093035
has title: the HTML page is not displaying
has comment: http://stackoverflow.com/comment/39087647
type: Question
tagged with: mongodb
tagged with: javascript

http://stackoverflow.com/comment/39123023
comment on: http://stackoverflow.com/q/25134538
type: Comment
score: 1
has text: @urbz — No. That's if you are posting JSON which the OP most definitely is not (because `serialize` doesn't return JSON).
type: QuestionComment

http://stackoverflow.com/comment/39176880
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25163726
type: AnswerComment
has text: What about a specific route within Ember.route, instead of a transition to that route, i need a reload to that route.

http://stackoverflow.com/comment/39184833
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25167794
type: AnswerComment
has text: i added return false; to the script still not working

http://stackoverflow.com/comment/39239551
comment on: http://stackoverflow.com/a/25197206
type: AnswerComment
type: Comment
has text: `getElementById` can have only one argument.. what is this man? :)
score: 1

http://stackoverflow.com/a/31879528
has body: &lt;span style="width:100px;display:inline-block;"&gt; {{get_symbol_name(trade.symbol_id)}} &lt;br /&gt; Inleg: &amp;euro;{{trade.amount_open}} &lt;/span&gt; your function like this $scope.get_symbol_name=function(id){ return id; }
score: 0
answers question: http://stackoverflow.com/q/25160772
type: Answer

http://stackoverflow.com/comment/39184734
type: Comment
comment on: http://stackoverflow.com/q/25165573
score: 0
type: QuestionComment
has text: @Barmar - I've copied the data from the database to a text editor, and it contains characters like "•". I thought these were html tags, but they are not. I was able to use utf8_encode to get the field in the correct format, and now json_encode works.

http://stackoverflow.com/q/25200962
possible better answer: http://stackoverflow.com/a/25201070
has answer: http://stackoverflow.com/a/25201070
has answer: http://stackoverflow.com/a/25201081
has body: I'm new to the concept of nesting a function within another function and I don't understand the need for returning a function instead of returning the value I want straightaway.. Appreciate any help in clearing my confusion! 1st method (What I would have instinctively written, but turned out to be wrong): function wrapValue(n) { var localVariable = n; return localVariable; } var wrap1 = wrapValue(1); var wrap2 = wrapValue(2); console.log(wrap1()); console.log(wrap2()); // → Uncaught TypeError: number is not a function I tried a simpler version of method 1 which works (method 1.1): function wrapValue(n) { var localVariable = n; return localVariable; } console.log(wrapValue(6)); // → 6 2nd method (the correct method): function wrapValue(n) { var localVariable = n; return function() { return localVariable; }; } var wrap1 = wrapValue(1); var wrap2 = wrapValue(2); console.log(wrap1()); console.log(wrap2()); // → 1 // → 2 Why does method 1 not work when method 1.1 works? And why the need for method 2? Thanks for the help!
tagged with: javascript
answer count: 5
type: AnsweredQuestion
has title: When defining a function, why do I need to return a function instead of returning the value I want straightaway?
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39245927
has answer: http://stackoverflow.com/a/25201115
favorite count: 0
accepted answer: http://stackoverflow.com/a/25201081
type: Question
has comment: http://stackoverflow.com/comment/39245979
has answer: http://stackoverflow.com/a/25201134
upvote count: 1
has answer: http://stackoverflow.com/a/25201191

http://stackoverflow.com/comment/39132188
comment on: http://stackoverflow.com/a/25139554
score: 0
has text: Yup, i know. I didn't downvote either though. I just upvoted Vatev's answer since that is the most elegant (and correct) solution in this case :-)
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25170322
score: 0
has comment: http://stackoverflow.com/comment/39189925
has comment: http://stackoverflow.com/comment/39189568
has comment: http://stackoverflow.com/comment/39189975
answers question: http://stackoverflow.com/q/25169974
has comment: http://stackoverflow.com/comment/39190053
has comment: http://stackoverflow.com/comment/39190023
has body: I think the best way to do this is with a plain old HTML form and a little bit of jQuery to help toggle what is visible/not visible. Basically, a 'toggle-trigger' class is added to the elements that trigger other content areas. Each toggle-trigger needs to know what toggle area to show/hide, so a data-toggle-area is added to this as well. An example: This is question one. Yes No This is question one subquestion for YES. This is question one subquestion for NO.
type: Answer
has comment: http://stackoverflow.com/comment/39189948
has comment: http://stackoverflow.com/comment/39190094

http://stackoverflow.com/a/25129406
accepted answer of: http://stackoverflow.com/q/25129080
score: 5
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25129080
type: Answer
has body: You can use .filter() to perform more complex query: $('#mytable td').filter(function() { return ($(this).parent().attr('attr-y') &gt; 3 &amp;&amp; $(this).parent().attr('attr-y') &lt; 5) &amp;&amp; ($(this).attr('attr-x') == 4) }) .css('background-color', 'aqua'); Example: http://jsfiddle.net/8wH4M/1/
upvote count: 5

http://stackoverflow.com/q/25152702
has answer: http://stackoverflow.com/a/25478863
accepted answer: http://stackoverflow.com/a/25478863
tagged with: css
has body: I searched everywhere but I could not find the same problem. Maybe I did a bad search. Sorry. Here is the issue, I call below function from classic js, the first time it is fired it is ok, completing, but the second and subsequent tries just fail, I think that FADEOUT is not being fired, since I have that DIV staying on the page. Please advise how can I overcome this issue. var Achtung = function(msg){ var achtung = $(' '+msg+'x '); $(achtung) .css('position', 'fixed') .css('top', '5px') .css('display', 'none') .css('align','center') .css('width', '100%') .css('margin-left', 'auto') .css('margin-right', 'auto') $('body').append(achtung); $(achtung).fadeIn(1500); var hideTimer = setInterval(hideAchtung, 3000); $('#achtung .close').click(function(){hideAchtung();}); } var hideAchtung = function(){ $('#achtung').fadeOut(500); } and I am calling function from inside a javascript Achtung('Message here...');
has comment: http://stackoverflow.com/comment/39157148
has comment: http://stackoverflow.com/comment/39156614
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/39156689
has comment: http://stackoverflow.com/comment/39156476
has comment: http://stackoverflow.com/comment/39157345
has title: second ajax request ignored
tagged with: javascript
has comment: http://stackoverflow.com/comment/39156906
score: 0
possible better answer: http://stackoverflow.com/a/25152901
answer count: 2
has answer: http://stackoverflow.com/a/25152901
has comment: http://stackoverflow.com/comment/39157258
tagged with: ajax

http://stackoverflow.com/a/25191943
type: Answer
upvote count: 1
downvote count: 1
has body: If the JS file is used across multiple pages, it is better to have it in a separate file for caching purposes. If it is only used in a single file, a script tag would be slightly faster because it would save an HTTP request.
answers question: http://stackoverflow.com/q/25191855
has comment: http://stackoverflow.com/comment/39229695
score: 0

http://stackoverflow.com/comment/39005869
has text: I'm not entirely sure the _MDN_ here is correct; the handler uses `this` and not `el`
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25071687

http://stackoverflow.com/q/25178744
has body: I am rendering select options as follows: &lt;select ng-model="curUserId" ng-options="u.id as u.name for u in users"&gt;&lt;/select&gt; In Controller code: $scope.users = [{"id":1, "name":"abc"}, {"id":2, "name":"def"}, ...] $scope.curUserId = 2; //Selected User This loads select box with user def as selected user as ng-model holds curUserId value. I need to do the same in input box where I should show selectedUser, one way is to assign a scope variable to input box and then in controller iterate through users list and get selected user. i.e. for(var i=0;i&lt;$scope.users.length){ if($scope.users[i] == $scope.curUserId) { $scope.selUser = $scope.users[i].name; break; } } Is there any other way I can get selUser in AngularJS instead of iterating through list. Thanks!
answer count: 1
tagged with: angularjs
has title: Render specific element in input from a list - AngularJS
accepted answer: http://stackoverflow.com/a/25178807
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: angularjs-scope
score: 0
has answer: http://stackoverflow.com/a/25178807

http://stackoverflow.com/q/25209664
score: 1
has body: i want to create a input form for date like this (exemple ) that gives to user the possibilte to insert just nembers and it gives him that form (___/.___/._________)
duplicate of: http://stackoverflow.com/q/12578507
upvote count: 2
linked to: http://stackoverflow.com/q/12578507
downvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25209762
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25209762
tagged with: css
has comment: http://stackoverflow.com/comment/39262422
has comment: http://stackoverflow.com/comment/39262403
type: AnsweredQuestion
has title: css and javascript input form (for date )
type: Question

http://stackoverflow.com/q/25189903
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/39226223
accepted answer: http://stackoverflow.com/a/25191507
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25190576
type: Question
has answer: http://stackoverflow.com/a/25190390
has body: I'm trying to display some XML data in a jsp file. I'm using EL to get the data below: &lt;xml id="xmlData"&gt; &lt;c:out value="${xmlform.myXmlData}" escapeXml="false"/&gt; &lt;/xml&gt; How can I get reference to this xml document using javascript? var xmlDoc = document.getElementById("xmlData"); //reference to the xml element var xmlData = xmlDoc.[how to reference xmlDoc to get data?] var fields = xmlData.documentElement.selectNodes("field"); for (var i=-; i&lt;fields.length;etc...
tagged with: javascript
has answer: http://stackoverflow.com/a/25191507
possible better answer: http://stackoverflow.com/a/25190390
has title: Displaying XML data with Javascript

http://stackoverflow.com/comment/39209187
has text: Nah! `responseText` will propably be null / empty or undefined. The reason is that `$.ajax` will return an `XMLHttpRequest` object upon call. Howver, the `responseText` won't be filled with the server response until ajax request is fully processed and adding `async` property will freeze the browser temporarily (consider a bit long request)
type: Comment
comment on: http://stackoverflow.com/a/25181522
score: 0
type: AnswerComment

http://stackoverflow.com/a/25070455
has comment: http://stackoverflow.com/comment/39003472
has comment: http://stackoverflow.com/comment/39003660
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/39003534
has comment: http://stackoverflow.com/comment/39014673
has body: You wanna do somethign like this: var post_ids = new Array(); var i = 0; var val; $.getJSON("/client-ajax/last-ten-posts.php", function(data){ $.each(data, function(k, val) { post_ids.push(val.id); }); $.getJSON("/client-ajax/last-ten-posts.php?post-id=" + post_ids[0], function(result){ alert(result.title+""); $("#postContainer").empty(); $("#postContainer").append(" " + result.title + " " + result.content + " Posted by " + result.firstname + " " + result.surname + " at 08:52 GMT+00 on the 10-06-2014 "); }); }); So that the second getJSON call happens after the first one is finished.
has comment: http://stackoverflow.com/comment/39003464
has comment: http://stackoverflow.com/comment/39003419
answers question: http://stackoverflow.com/q/25070403

http://stackoverflow.com/comment/39049990
has text: other than that, I thought that making 2 divs dependent would be fairly simple and very practical piece of code to have.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25095384
type: Comment

http://stackoverflow.com/q/25204782
type: UnansweredQuestion
has body: How can I sort the x-axis (dimension) in the dc.js example by the computed value of the dimension instead of by the name of the dimension itself? For example, consider the dc.js example for an Ordinal Bar Chart at: https://github.com/dc-js/dc.js/blob/master/web/examples/ord.html How can I sort the x-axis in descending order of fruit counts? Here is what I have tried: (jsfiddle: http://jsfiddle.net/gautam/re9r9kk7/ ) var counts = [ {name: "apple", cnt: 10}, {name: "orange", cnt: 15}, {name: "banana", cnt: 12}, {name: "grapefruit", cnt: 2}, {name: "grapefruit", cnt: 4} ]; var ndx = crossfilter(counts), fruitDimension = ndx.dimension(function(d) {return d.name;}), sumGroup = fruitDimension.group().reduceSum(function(d) {return d.cnt;}); chart .width(768) .height(380) .x(d3.scale.ordinal()) .xUnits(dc.units.ordinal) .brushOn(false) .xAxisLabel("Fruit") .yAxisLabel("Quantity Sold") .dimension(fruitDimension) .barPadding(0.1) .outerPadding(0.05) .group(sumGroup);
score: 7
upvote count: 7
has title: Sorting (ordering) the bars in a bar chart by the bar values with dc.js
type: Question
tagged with: crossfilter
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/25296738
tagged with: dc.js
answer count: 2
tagged with: bar-chart
downvote count: 0
has answer: http://stackoverflow.com/a/26387481
favorite count: 0
has comment: http://stackoverflow.com/comment/64175743

http://stackoverflow.com/q/25110066
has comment: http://stackoverflow.com/comment/39077272
answer count: 1
has comment: http://stackoverflow.com/comment/39077306
has comment: http://stackoverflow.com/comment/39077273
has title: javascript: can object literally replace array?
has answer: http://stackoverflow.com/a/25110106
type: UnansweredQuestion
has body: Say I just want a variable to hold a bunch of information, and the order is not important. For example, i have a variable players that hold all the information of players in a game. If I use an object to hold all the information, isn't it better than using an array to do so in every possible way? var players = [{ name: 'john', age: '10' }, { name: 'lily', age: '11' }]; versus var players = { john: { name: 'john', age: '10' }, lily: { name: 'lily', age: '11' } }; If I count the number of players, or to access/edit a player's information directly, isn't using object better than array in every possible way? If so, can object literally replace array in any non-ordered situation?
type: Question
tagged with: object
has comment: http://stackoverflow.com/comment/39077231
tagged with: arrays
tagged with: javascript
tagged with: data-structures
has comment: http://stackoverflow.com/comment/39077346
score: 0

http://stackoverflow.com/a/41532657
answers question: http://stackoverflow.com/q/25187926
score: 0
has body: If you are using an Input box, you must set the "multiple" property with its value as "true". For example, &lt;script&gt; $(document).ready(function () { var arr = [{ id: 100, text: 'Lorem Ipsum 1' }, { id: 200, text: 'Lorem Ipsum 2'}]; $('#inputID').select2({ data: arr, width: 200, multiple: true }); }); &lt;/script&gt;
type: Answer

http://stackoverflow.com/comment/39180484
has text: ok thanks! This url redirect that i want to do comes right after a POST request..so I guess I have no choice but to do so
type: AnswerComment
comment on: http://stackoverflow.com/a/25165569
type: Comment
score: 0

http://stackoverflow.com/comment/39196942
type: AnswerComment
type: Comment
score: 0
has text: placed the right semicolons and added the quotations. but nothing changed.
comment on: http://stackoverflow.com/a/25174319

http://stackoverflow.com/a/25160407
score: 1
has comment: http://stackoverflow.com/comment/132418709
has comment: http://stackoverflow.com/comment/39172192
has comment: http://stackoverflow.com/comment/39177605
type: Answer
has comment: http://stackoverflow.com/comment/39177674
upvote count: 1
has comment: http://stackoverflow.com/comment/39171628
has body: Some points, when you said I tried myAudio.playbackRate = 0.5; we are talking about Web Audio API ? if yes, listen again the pitch as well as the duration of the sample will be affected. if no, probably that are you using a native html5 function, if you want keep the original speed and change the pitch one way is after change the speed you apply some type of interpolation try linear interpolation with same factor used to stretch your audio. If you need change speed and pitch just apply interpolation without change the speed (in original sound), this can be equivalent to play your audio in a different sample rate Web Audio API can do it. The code pitchshift.js is a port of the code from Stephan Bernsee to javascript (this change the pitch and keep the speed untouchable), you need call this function at every chunk audio, so first you need do an function that decode your audio file in short int or float.
downvote count: 0
answers question: http://stackoverflow.com/q/25157513

http://stackoverflow.com/comment/39054872
comment on: http://stackoverflow.com/a/25096085
score: 0
type: Comment
has text: Nice point. So the docuemnt.activeElement.value is not updated till after keyup
type: AnswerComment

http://stackoverflow.com/comment/39213198
type: Comment
comment on: http://stackoverflow.com/a/25183289
has text: modified your view so its just a button instead of a submit? Click Me!
score: 0
type: AnswerComment

http://stackoverflow.com/a/25212142
score: 1
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25211896
answers question: http://stackoverflow.com/q/25211896
type: AcceptedAnswer
downvote count: 0
has body: It looks like you could use the PHP loop inside the "columns" option in your javascript, if I'm following the format correctly. Something like this (untested obviously)? "columns": [ &lt;?php foreach($keys as $key): ?&gt; {"data": "&lt;?php echo $key ?&gt;"}, &lt;?php endforeach; ?&gt; ],

http://stackoverflow.com/q/25115671
tagged with: http://stackoverflow.com/tag/html
has body: How to make photos that are loaded from the site in containers scaled in height and width in my IOS app? In my application some of the photos are stretched (second one from the start), how to fix it?
tagged with: css
possible better answer: http://stackoverflow.com/a/25115694
has answer: http://stackoverflow.com/a/25116271
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25115694
has title: scaled iOS app images on container
score: 1
has answer: http://stackoverflow.com/a/25115739
accepted answer: http://stackoverflow.com/a/25115739
type: Question
upvote count: 1
tagged with: ios
downvote count: 0
tagged with: javascript
favorite count: 0
answer count: 3

http://stackoverflow.com/a/65156214
upvote count: 1
score: 1
downvote count: 0
type: Answer
has body: I tried all the above answers posted ,none of them seems to work in my case finally,i wrote this . This will hide any active modal on your screen and show the only clicked modal $('[data-toggle="modal"]').on('click', function() { $('.modal').not($(this).data('target')).modal('hide'); });
answers question: http://stackoverflow.com/q/25098967

http://stackoverflow.com/comment/39238473
score: 0
type: AnswerComment
has text: Then why it not working if I adding `ng-checked="employee.active"` ? If I am using the above method for saving the edit form all values remain on the page, but I am loosing the scope for radio selection
type: Comment
comment on: http://stackoverflow.com/a/25196801

source-maps
type: Tag
tag name: source-maps
tags question: http://stackoverflow.com/q/25078753

http://stackoverflow.com/q/25132704
tagged with: javascript
score: -1
downvote count: 2
has body: I am recently taking a course about scraping a website using Python. The website URL is "http://www.kiva.org/lend/742129". It is a charity websites. The contents I want to scrape is about the contributors to this project. And I am sure it used some JS technology which I don't know how it works. I tried to analyze the html source page but I only find that when I click on the More button the whole page source just changed. So I can scrape the content unless I clicked the JS link. But I just don't know how to simulate a web browser inside the python. By asking the tutor in my class, I am told whether to use a module called request or another one called mechanize but none of this do the trick for me. I tired to use the module called selenium but it is just so complicated and I got lost.. Is there anyone who can kindly give me some suggestions about how to make it works. I am really a beginner for websites as well as web scraping. And I have no idea at all how to analyze the html and to get the contributors' list out.
upvote count: 1
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: python
has title: How to scrape some contents on a website which was hidden using JS in Python?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25132955
tagged with: selenium
tagged with: web-scraping
type: Question
has answer: http://stackoverflow.com/a/25132955

hidden
tags question: http://stackoverflow.com/q/25131212
tags question: http://stackoverflow.com/q/25094498
tag name: hidden
type: Tag
tags question: http://stackoverflow.com/q/25120904

extjs5
tags question: http://stackoverflow.com/q/25198722
tags question: http://stackoverflow.com/q/25178241
tags question: http://stackoverflow.com/q/25199278
tags question: http://stackoverflow.com/q/25142111
tags question: http://stackoverflow.com/q/25083982
type: Tag
tags question: http://stackoverflow.com/q/25161698
tag name: extjs5
tags question: http://stackoverflow.com/q/25200529

http://stackoverflow.com/comment/39214886
type: QuestionComment
type: Comment
has text: @epascarello Ultimately this will be a local html (and JS) file that will be bundled in an Android app. The file will be loaded via file protocol into the apps browser component so I need a way for the AJAX call to work in that scenario.
comment on: http://stackoverflow.com/q/25183614
score: 0

http://stackoverflow.com/q/25124790
has answer: http://stackoverflow.com/a/25124852
has comment: http://stackoverflow.com/comment/39111066
has title: Can properties be created in Javascript any where?
has comment: http://stackoverflow.com/comment/39105406
has comment: http://stackoverflow.com/comment/39106607
has comment: http://stackoverflow.com/comment/39104827
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25124852
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: If I have an array in JavaScript that starts with var stars = [] and I create a star (code below). I found this code online and am working my way through it so that I can see how it works and to modify it. Is the this.stars = stars; just creating another internal property for this particular class? var stars = []; for(var i=0; i&lt;this.stars; i++) { stars[i] = new Star(Math.random() * this.width, Math.random() * this.height, Math.random() * 3+1, (Math.random() * (this.maxVelocity - this.minVelocity)) + this.minVelocity); } this.stars = stars; // &lt;-- creating internal property Because I do not see it here in the definition of the class. So I am not certain if it is just created on the spot or if it could be declared in this definition. Code Here: function Starfield() { this.fps = 30; this.canvas = null; this.width = 0; this.width = 0; this.minVelocity = 15; this.maxVelocity = 30; this.stars = 9000; this.intervalId = 0; } // The main function - initialises the starfield. Starfield.prototype.initialise = function(div) { var self = this; //sets it self to current object // Store the div this.containerDiv = div; self.width = window.innerWidth; self.height = window.innerHeight; window.onresize = function(event) { self.width = window.innerWidth; self.height = window.innerHeight; self.canvas.width = self.width; self.canvas.height = self.height; self.draw(); } // Create the canvas. var canvas = document.createElement('canvas'); div.appendChild(canvas); this.canvas = canvas; this.canvas.width = this.width; this.canvas.height = this.height; }; Starfield.prototype.start = function() { // Create the stars. var stars = []; //creates an array that can be used for anything but in this case a star field //this.stars is a property in the class that contains a number of the stars for(var i=0; i&lt;this.stars; i++) { stars[i] = new Star(Math.random() * this.width, Math.random() * this.height, Math.random() * 3+1, (Math.random() * (this.maxVelocity - this.minVelocity)) + this.minVel…
has comment: http://stackoverflow.com/comment/39105379
type: Question
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25124873
has answer: http://stackoverflow.com/a/25124873

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/25103915
type: Tag

http://stackoverflow.com/q/25191599
has comment: http://stackoverflow.com/comment/39230191
tagged with: javascript
tagged with: scoping
score: 0
has comment: http://stackoverflow.com/comment/39306946
has comment: http://stackoverflow.com/comment/39306879
has answer: http://stackoverflow.com/a/25192833
has body: I'm running into a variety of issues with race conditions and scoping issues with my web application, using require.js for managing dependencies. I've been attempting to clean up and optimise the codebase, and introduce r.js as a mechanism for controlling the huge number of requests being generated on page loads (loading dependencies). Question: What are the consequences of failing to declare Parameters explicitly within either a module definition like this: define([ "jquery", "app/modules/validation", "jquery.chosen" ], function( $, Validation, // note missing parameter ) { //stuff here }); Or a require statement like this: require([ "jquery", "app/modules/validation", "jquery.chosen" ], function( $, Validation, Chosen ) { // the 'chosen' object here is actually referencing the object defined in the other module }); I'm finding numerous issues in my application with scoping and I'm wondering if the above might be to blame? It seems like failing to include a parameter allows it to leak scope? Is this possible? Edit I was trying to avoid this turning into a 'debug my require.js' configuration but here we go: My config.js requirejs.config({ paths: { jquery: 'jquery-shim', 'jquery.chosen':'chosen/chosen.jquery', 'jquery.validity': 'lib/jquery.validity' }, shim: { 'jquery.chosen': ["jquery"], 'jquery.validity': { deps: ["jquery"], exports: "jQuery.fn.validity" } } }); as you can see jQuery is currently aliased to the following - I think this might be the problem: //jquery-shim.js define([], function() { return window.jQuery; }); When I load require.js in my html it looks like this: As you can see jquery is being loaded outwith require.js - the reason for this is that when loaded with require.js, it does not bind to the DOMContentLoaded event, and hence all other code that binds to jQ.ready, never executes: &lt;script src="{{ asset('assets/js/jquery/dist/jquery.min.js') }}"&gt;&lt;/script&gt; &lt;script src="{{ asset('assets/js/requirejs/require.js') }}"&gt;&lt;/script&g…
type: UnansweredQuestion
tagged with: requirejs
type: Question
has comment: http://stackoverflow.com/comment/39229104
tagged with: amd
has title: Require.js Require/Define consequences of missing parameters
has answer: http://stackoverflow.com/a/25200377
answer count: 2

http://stackoverflow.com/comment/39234305
score: 0
has text: Have a look at this http://coenraets.org/blog/2014/04/facebook-phonegap-cordova-without-plugin/.
type: Comment
comment on: http://stackoverflow.com/q/25194610
type: QuestionComment

http://stackoverflow.com/a/25156141
has comment: http://stackoverflow.com/comment/39163515
downvote count: 1
has comment: http://stackoverflow.com/comment/39162691
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/39162832
has comment: http://stackoverflow.com/comment/39163002
answers question: http://stackoverflow.com/q/25156082
has body: Try this $('#table_Id tr td').mouseenter(function(){ var $this = $(this); setTimeout(function () { $this.parent('tr').addClass('blueBgColor'); }, 1000); });
type: Answer

http://stackoverflow.com/comment/39234316
type: QuestionComment
has text: As Se0ng11 said, you can't use IDs like that. You can use the table's [*rows collection*](http://www.w3.org/html/wg/drafts/html/master/tabular-data.html#dom-table-rows), and each row's [*cells collection*](http://www.w3.org/html/wg/drafts/html/master/tabular-data.html#dom-tr-cells) to get the elements you want, then parse the *textContent* or *innerHTML* as appropriate to get the values.
score: 0
comment on: http://stackoverflow.com/q/25194378
type: Comment

window
tags question: http://stackoverflow.com/q/25144930
tag name: window
type: Tag

http://stackoverflow.com/a/25207205
has comment: http://stackoverflow.com/comment/39333315
type: Answer
has comment: http://stackoverflow.com/comment/39322338
has body: You can use .setCapture to let your canvas continue to get mouse events even when the mouse is moved outside the canvas: https://developer.mozilla.org/en-US/docs/Web/API/Element.setCapture
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39266877
answers question: http://stackoverflow.com/q/25207019
upvote count: 2

http://stackoverflow.com/comment/39120022
comment on: http://stackoverflow.com/q/25132681
score: 0
type: Comment
type: QuestionComment
has text: @Barmar , I have edited my answer plz see that...

http://stackoverflow.com/comment/39100469
score: 0
type: Comment
has text: Ok try uploading a file and debug the code, can you provide me with the values of the array?
comment on: http://stackoverflow.com/a/25122459
type: AnswerComment

http://stackoverflow.com/a/25215747
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39276737
has comment: http://stackoverflow.com/comment/39276542
score: 0
has body: Demo js $('.heading + div').each(function () { $(this).nextUntil(".heading").andSelf().wrapAll('&lt;div class="content" /&gt;'); }); here it is with different IDs Demo js var ID = 0; $('.heading + div').each(function () { ID++; $(this).nextUntil(".heading").andSelf().wrapAll('&lt;div class="content" /&gt;').attr('id', 'id' + ID); }); Final Demo js $('.heading + div').each(function (index, element) { $(this).nextUntil(".heading").andSelf().wrapAll('&lt;div class="content" /&gt;'); $(element).parent().attr('id', 'id' + index); }); I am using the index and element so the id count starts from 0 Not to effect the last one Demo not to effect last js $('.heading:not(:last) + div').each(function (index, element) { $(this).nextUntil(".heading").andSelf().wrapAll('&lt;div class="content" /&gt;'); $(element).parent().attr('id', 'id' + index); });
has comment: http://stackoverflow.com/comment/39274122
has comment: http://stackoverflow.com/comment/39274680
has comment: http://stackoverflow.com/comment/39274064
has comment: http://stackoverflow.com/comment/39274046
answers question: http://stackoverflow.com/q/25215673
has comment: http://stackoverflow.com/comment/39276690
type: Answer
has comment: http://stackoverflow.com/comment/39276337

http://stackoverflow.com/q/25119495
tagged with: javascript
has answer: http://stackoverflow.com/a/25119583
accepted answer: http://stackoverflow.com/a/25119583
favorite count: 0
has comment: http://stackoverflow.com/comment/39094650
has body: I'm confused about this keyword in JS like below. Why this.this_ is undefined in line 3) ? Any simple exalain for that ? In line 2) this points to Window object - i was suprised, but it is acceptable for me - why is that ? The only working for me is to use this2_ variable, but i think that is not elegant. How to use this in good,elegant approach to always work and points to O object ? var a = function(callback){ callback('test'); }; var O = function(){ this.val = 'abc'; var this2_ = this; this.this_ = this; this.f = function(){ console.log(this); // (1) this -&gt; O object, that's OK a(function(){ console.log(this); // (2) this -&gt; Window object console.log(this.this_); // (3) this.this_ -&gt; undefined console.log(this2_); // (4) this2_ -&gt; O object }); } }; var o = new O(); o.f();
upvote count: 3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39094668
downvote count: 0
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/39094883
type: Question
score: 3
tagged with: oop
duplicate of: http://stackoverflow.com/q/3127429
linked to: http://stackoverflow.com/q/3127429
has title: "this" keyword in JS - I'm confused
answer count: 1

http://stackoverflow.com/comment/124143316
type: Comment
score: 2
comment on: http://stackoverflow.com/a/68104607
has text: @aqm you can replace `en-EN` with `en-GB` This [SO link](https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes) has a list of other locales and their short codes
type: AnswerComment

http://stackoverflow.com/comment/39299690
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25229469
score: 1
has text: the `function(tx,results)` is a Asynchronous callback. You cannot return from an Async call. `return numAct` will not work. Have a look over [here](http://stackoverflow.com/questions/3903155/synchronous-query-to-web-sql-database#) for returning/using values from an Async call.

http://stackoverflow.com/comment/39213369
score: 0
type: AnswerComment
type: Comment
has text: @Neeldz What server are you using? Jetty, Tomcat? Do you have a context path set?
comment on: http://stackoverflow.com/a/25183460

http://stackoverflow.com/q/25191189
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: Audio5js is a html5 with flash compaitibility for older browsers. Here is the link for the source code and the developer website Github: https://github.com/zohararad/audio5js I have used angular example of the player I have create a plunk : http://plnkr.co/edit/Ma1zzsze1R31p3QZOyW8?p=preview &lt;script src="https://code.angularjs.org/1.2.9/angular.min.js"&gt;&lt;/script&gt; &lt;script src="https://rawgithub.com/zohararad/audio5js/master/audio5.js"&gt;&lt;/script&gt; &lt;!--include ngAudio5.js after audio5.js--&gt; &lt;script src="ngAudio5.js"&gt;&lt;/script&gt; &lt;script&gt; //inject Audio5 service into our app var app = angular.module('myapp',['Audio5']); //Inject the AudioService singleton var PlayCtrl = function ($scope, AudioService) { //bind AudioService to scope $scope.player = AudioService; //Load the song, every event, class method and Instance attribute from audio5js are accessible from the template $scope.player.load('http://danosongs.com/music/danosongs.com-orb-of-envisage.mp3'); //example of event binding $scope.player.on('timeupdate',function(){ $scope.$apply(); }) } &lt;/script&gt; The weird thing is it is working on all the browsers except for chrome on mac. The version of chrome: Version 36.0.1985.125 version of MAC OS: OS X 10.9.4 Please see the plunk and let me know if there is any issue
score: 1
upvote count: 1
tagged with: google-chrome
type: Question
has title: Audio5js player not working for Chrome on Mac
has answer: http://stackoverflow.com/a/25213244
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25213244
has comment: http://stackoverflow.com/comment/39268540
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39230024

http://stackoverflow.com/a/25121192
score: 0
has comment: http://stackoverflow.com/comment/39098099
has body: You gave no specifics as to what you want appended where, so here's just some simple code that shows how to get each item in your array, and append the data. Here's what you need to do: in a jQuery each, parse the data, then pass it into the callback. It then becomes as simple as you'd expect. $.each(data, function(index, value) { var option = $("&lt;option&gt;") .text(value.name["1"]) .val(value.name["2"]); $("#mySelect").append(option); }); I created an option (as per your request), and used some of the data to fill in the text and value for it. The same exact way can then be used to create a hidden field for the file. http://jsfiddle.net/7cp2j/1/
has comment: http://stackoverflow.com/comment/39098290
type: Answer
has comment: http://stackoverflow.com/comment/39098201
answers question: http://stackoverflow.com/q/25120068
has comment: http://stackoverflow.com/comment/39098165
has comment: http://stackoverflow.com/comment/39098257
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39098051

http://stackoverflow.com/comment/39009328
type: QuestionComment
type: Comment
has text: In java script bind allows set the value of "this" to an specific object, reuse methods and curry a function. But In Java those are different concepts.
comment on: http://stackoverflow.com/q/25073707
score: 0

http://stackoverflow.com/q/25074450
has answer: http://stackoverflow.com/a/25075240
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25074536
type: UnansweredQuestion
has body: I'm trying to make a navigation using jQuery. I'm very new to jQuery so I'm getting a bit stuck here. Basically what I'm trying to do is have testbutton2 appear and hide when I mouse over/off testbutton1. I was able to get this to work with mouseenter/leave. The part I'm trying to add is to keep testbutton2 visible when I have the mouse over testbutton2 and to keep testbutton2 visible if I cursor back onto testbutton1 - so only fade in or out once. You'll see from my code exactly what I encountered and probably have a chuckle. CSS #testbutton1 { float:left; height:100px; width:100px; background:#69C; } #testbutton2 { float:left; height:100px; width:100px; background:#0C6; display:none; } HTML &lt;div id="testbutton1"&gt;&lt;/div&gt; &lt;div id="testbutton2"&gt;&lt;/div&gt; jQuery $("#testbutton1").on({ mouseenter: function() { $("#testbutton2").fadeIn(); }, mouseleave: function() { $("#testbutton2").fadeOut(); }, }); $("#testbutton2").on({ mouseenter: function() { $("#testbutton2").fadeIn(); }, mouseleave: function() { $("#testbutton2").fadeOut(); }, }); JSFiddle DEMO
tagged with: css
answer count: 4
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/25074755
has comment: http://stackoverflow.com/comment/39010581
type: Question
has comment: http://stackoverflow.com/comment/39010575
has comment: http://stackoverflow.com/comment/39010541
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25074680
tagged with: jquery
has title: DIV appear/disappear on mouse enter/leave

http://stackoverflow.com/a/25178759
downvote count: 0
score: 22
type: Answer
upvote count: 22
has body: If you update to Angular 1.3 you can use ng-model-options to update the model on blur. &lt;input type="text" name="dynamic_input" ng-required="field.isRequired" ng-model="field.name" ng-model-options="{ updateOn: 'blur' }" placeholder="{{field.placeholder}}" /&gt; fiddle However, if you can't update then there are plenty of ways to do this here.
answers question: http://stackoverflow.com/q/25178626

http://stackoverflow.com/q/25183907
has title: selected option value cannot be reset
accepted answer: http://stackoverflow.com/a/25184020
possible better answer: http://stackoverflow.com/a/25183981
score: 0
has answer: http://stackoverflow.com/a/25183981
type: AnsweredQuestion
has body: I'm having two select boxes on my mvc razor view which are styled using selectBoxIt plugin On changing #ddHour I want to reset #ddDay select(to set on first select choice) var selectedDay = $('#ddDay option:nth-child(1)').val(); I tried with $("#ddDay").selectBoxIt('refresh'); but it always returns same previously selected #ddDay option
tagged with: asp.net-mvc
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25184020
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/39179536
type: QuestionComment
has text: what are the steps that you took to build/create the phonegap app? Please provide details ( phonegap version, platform android/IOS/blackberry version)?
comment on: http://stackoverflow.com/q/25164927
score: 0
type: Comment

http://stackoverflow.com/comment/39102857
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25123716
has text: Which HTMLElement object has the `selected` property? What does `.getElementById("school_application_fls_center_name")` return? A `HTMLSelectElement` object?
type: Comment

http://stackoverflow.com/comment/39258498
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25207436
has text: It does the same thing; it deletes all of them.
score: 1

http://stackoverflow.com/q/25107538
upvote count: 1
has comment: http://stackoverflow.com/comment/39073797
has comment: http://stackoverflow.com/comment/39073346
answer count: 0
has comment: http://stackoverflow.com/comment/39075568
has body: angular module: controller: property=errMsg directive 1: condition 1: errMsg = "constant1" condition 2: errMsg = "const2" end directive1 directive 2: condition 1: errMsg = "constant1" condition 2: errMsg = "const2" end directive2 End: This is the high level structure. errMsg is the property to be accessed in the view and that property need to be updated with different constant within each directive. I was tried to access controller property inside the directive. but failed. Can someone help to overcome this problem.
downvote count: 1
type: Question
has title: Updating a controller property to updating at different locations in the module.(angular js)
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39072750
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/39105443
type: UnansweredQuestion

http://stackoverflow.com/comment/39219696
score: 0
has text: What is happening when I have new keyword and if i remove it? It works without new test()
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25186862

http://stackoverflow.com/comment/39307412
comment on: http://stackoverflow.com/a/25216529
has text: Could you post a link to one of those sites? I'd like to try it out for myself, since I'm developing an HTML5 game too. (I'll delete this request after you posted the link, since it's not helping to answer your question).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/139993001
type: Comment
comment on: http://stackoverflow.com/a/26987229
has text: I have the same issue. The PID is constantly increasing. Please help!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39185249
type: QuestionComment
has text: Can we get the update code for the dialog? Also, can we get the HTML that is generated? I'm going to go out on a limb and say that you probably are selecting multiple rows in your jQuery row selection. I would sugest using Angularjs for something like that, then you just need to modify the view model and everything gets updated accordingly
comment on: http://stackoverflow.com/q/25168112
score: 0
type: Comment

http://stackoverflow.com/q/25151814
has comment: http://stackoverflow.com/comment/39155514
upvote count: 2
has answer: http://stackoverflow.com/a/71417520
has body: HTML: Get track example Javascript: document.getElementById("entrack").addEventListener("load", function () { var myTrack = this.track; // get text track from track element var myCues = myTrack.cues; // get list of cues for (var i = 0; i < myCues.length; i++) { // append track label document.getElementById("display").innerHTML += (myCues[i].getCueAsHTML().textContent + " "); } }); I tried to make this page with an addEventListener(). When the track was loaded, cues list would be displayed on a "div" element. But I got into trouble, it only worked in Chrome while other browsers did't. No error occurred. Can anyone tell me what's wrong? JSFiddle Edited: If i have a button and listen for click event on it. Like this: document.getElementById("mybutton").addEventListener("click", function () { var myTrack = document.getElementById("entrack").track; // get text track from track element var myCues = myTrack.cues; // get list of cues for (var i = 0; i < myCues.length; i++) { // append track label document.getElementById("display").innerHTML += (myCues[i].getCueAsHTML().textContent + " "); } }, false); It worked on Firefox. So... what is the difference between 'click' and 'load' event?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25151839
has answer: http://stackoverflow.com/a/55100940
type: Question
has answer: http://stackoverflow.com/a/25152238
has title: Video Track Element only triggers load event on Google Chrome
has comment: http://stackoverflow.com/comment/39155281
tagged with: html5-video
has answer: http://stackoverflow.com/a/25154095
downvote count: 0
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/25152218
has comment: http://stackoverflow.com/comment/39155031
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
score: 2
has comment: http://stackoverflow.com/comment/39155159

http://stackoverflow.com/comment/39011082
type: Comment
has text: well, that's not properly syntax'd Javascript. did you get an error message?
comment on: http://stackoverflow.com/q/25074713
score: 0
type: QuestionComment

http://stackoverflow.com/a/25097418
answers question: http://stackoverflow.com/q/25097339
has body: go to connectdb.php directly e.g. http://www.example.com/connectdb.php, fix all the errors and make sure it is working first.
upvote count: 0
has comment: http://stackoverflow.com/comment/39053539
type: Answer
has comment: http://stackoverflow.com/comment/39053590
downvote count: 1
score: -1
has comment: http://stackoverflow.com/comment/39053655

http://stackoverflow.com/q/25207505
accepted answer: http://stackoverflow.com/a/25207526
tagged with: regex
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25207526
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25207527
tagged with: javascript
has answer: http://stackoverflow.com/a/25207603
has body: I've got a string. Let's say "This response happened in 90ms. Response finished". I need to be able to parse out the "90ms" from the string. The regex needs to match against an arbitrary number of numbers followed by an exact string match, in this case the string would be "ms". Any help would be greatly appreciated.
score: 0
has title: Regex to find number followed by exact string match
answer count: 3
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25207527

http://stackoverflow.com/comment/39269467
comment on: http://stackoverflow.com/q/25213044
has text: Try running jquery from a CDN - add this to your page head: ` `. It looks like you're trying to load something that isn't jquery.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39220419
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25187185
score: 0
has text: @tiago what errors are you getting? what's going wrong? you're not going to have someone to write code for you all the time. might as well learn to debug yourself.

http://stackoverflow.com/comment/39239660
type: Comment
has text: @BobMac The results appear as they should, they're just not the results I expected.
score: 0
comment on: http://stackoverflow.com/q/25185490
type: QuestionComment

http://stackoverflow.com/comment/43254004
type: QuestionComment
has text: If that api neither supports CORS nor JSONP (and you don't control this), you're out of luck. You will need to use a proxy.
type: Comment
comment on: http://stackoverflow.com/q/25224859
score: 0

http://stackoverflow.com/comment/39112770
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25128909
has text: this is ultimately what I was trying to wright myself. Obviously looping is the better solution but this shows me how I was misusing the .next() function. Thanks.

http://stackoverflow.com/q/25220962
linked to: http://stackoverflow.com/q/16063394
has comment: http://stackoverflow.com/comment/39283859
has answer: http://stackoverflow.com/a/25221032
upvote count: 3
has answer: http://stackoverflow.com/a/25225396
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
has comment: http://stackoverflow.com/comment/39283814
has body: I have the following: function Person() { console.log('person'); } function Player() { this.personConstructor(); } Player.prototype = Person.prototype; Player.prototype.constructor = Player; Player.prototype.personConstructor = Person.prototype.constructor; new Player(); The intent is to inherit from Person into Player then have that new child class call the parent's original constructor. However, this causes an infinite loop. What am I doing wrong and why is the loop happening?
type: Question
score: 3
has title: JavaScript class inheritance infinite loop
answer count: 2

http://stackoverflow.com/comment/39227743
has text: what is wrong with an ordinary ``?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25191028
score: 1

http://stackoverflow.com/comment/39287484
comment on: http://stackoverflow.com/a/25219579
score: 1
has text: As an aside, @flower and Sean, David Herman writes in his "Effective JavaScript" (a *very* nice read): *"[...] JavaScript function values contain more information than just the code required to execute when they're called. **They also internally store any variables they may refer to that are defined in their enclosing scopes.**"* So, given the test result, I'm still tempted to think that using the function variable doesn't improve performance in this example. But I'm not sure if the quote applies to [IIFE](http://en.wikipedia.org/wiki/Immediately-invoked_function_expression)s too.
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25149749
answers question: http://stackoverflow.com/q/25149616
type: Answer
has comment: http://stackoverflow.com/comment/39151569
score: 0
has body: // defines a JavaScript regular expression, used to match a pattern within a string. \,$ is the pattern In this case \, translates to ,. A backslash is used to escape special characters, but in this case, it's not necessary. An example where it would be necessary would be to remove trailing periods. If you tried to do that with /.$/ the period here has a different meaning; it is used as a wildcard to match [almost] any character (aside for some newlines). So in this case to match on "." (period character) you would have to escape the wildcard (/\.$/). When $ is placed at the end of the pattern, it means only look at the end of the string. This means that you can't mistakingly find a comma anywhere in the middle of the string (e.g., not after help in help, me,), only at the end (trailing). It also speeds of the regular expression search considerably. If you wanted to match on characters only at the beginning of the string, you would start off the pattern with a carat (^), for instance /^,/ would find a comma at the start of a string if one existed. It's also important to note that you're only removing one comma, whereas if you use the plus (+) after the comma, you'd be replacing one or more: /,+$/. Without the +; trailing commas,, becomes trailing commas, With the +; no trailing comma,, becomes no trailing comma

http://stackoverflow.com/q/25100983
has comment: http://stackoverflow.com/comment/39060515
has comment: http://stackoverflow.com/comment/39060209
favorite count: 0
tagged with: ajax
has title: AJAX Read JSON File Line By Line
has comment: http://stackoverflow.com/comment/39060298
has answer: http://stackoverflow.com/a/25101748
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39060347
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39060196
has comment: http://stackoverflow.com/comment/39060645
has comment: http://stackoverflow.com/comment/39060601
tagged with: http://stackoverflow.com/tag/json
score: -4
has comment: http://stackoverflow.com/comment/39060223
has comment: http://stackoverflow.com/comment/39060244
has comment: http://stackoverflow.com/comment/39141884
type: Question
accepted answer: http://stackoverflow.com/a/25101748
answer count: 2
has body: I've been playing around with AJAX, and I'm trying to read the PHP response line by line and parse that as JSON. Is there a way to parse the entire thing as a JSON array? Server-side in PHP: &lt;?php echo json_encode(array( "nick" =&gt; "mod", "id" =&gt; "admin", "msg" =&gt; "hi" )); echo json_encode(array( "nick" =&gt; "other", "id" =&gt; "1", "msg" =&gt; "hello" )); ?&gt; In JavaScript: $.ajax({ type: 'get', url: 'getInfo.php', dataType: 'json', success: function (data) { $('.div').html(''); //data.forEach(function (entry) { var name = data.nick; var id = data.id; var msg = data.msg; var html = $('.chat').html(); html += "&lt;h5&gt;" + name + " (" + id + ")&lt;/h5&gt;"; $('.div').html(html); //}); } });
has comment: http://stackoverflow.com/comment/39060259
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39060313
has comment: http://stackoverflow.com/comment/39060358
downvote count: 4
has comment: http://stackoverflow.com/comment/39060542
possible better answer: http://stackoverflow.com/a/25101865
has comment: http://stackoverflow.com/comment/39060510
has answer: http://stackoverflow.com/a/25101865

http://stackoverflow.com/comment/39129408
type: QuestionComment
comment on: http://stackoverflow.com/q/25138306
has text: A start would be to write a small routine to parse the date strings to create Date objects, then compare those.
score: 0
type: Comment

asp-classic
tags question: http://stackoverflow.com/q/25163144
tags question: http://stackoverflow.com/q/25226134
tags question: http://stackoverflow.com/q/25145722
tag name: asp-classic
type: Tag
tags question: http://stackoverflow.com/q/25169578

http://stackoverflow.com/comment/39192211
type: AnswerComment
comment on: http://stackoverflow.com/a/25171752
type: Comment
has text: Google says different `"redirect from iframe"`
score: 0

http://stackoverflow.com/a/25195539
upvote count: 5
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/39236255
answers question: http://stackoverflow.com/q/25195488
has body: You could pass as a callback. function loop(a, callback){ for(var i=0; i&lt;a; i++){ callback(i); } } loop(5, function(i) { document.write(i); });
score: 5
has comment: http://stackoverflow.com/comment/39236205

http://stackoverflow.com/comment/39188224
has text: Read the op: ``ng-repeat`` is not an option.
type: AnswerComment
comment on: http://stackoverflow.com/a/25169083
score: 0
type: Comment

http://stackoverflow.com/q/25151329
accepted answer: http://stackoverflow.com/a/25151418
answer count: 3
linked to: http://stackoverflow.com/q/17776940
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25151418
has body: Writing some JS and would love to enumerate specifically what I'm importing from other files in the main body of my JS script. Is there an equivalent to C's extern declaration for JS? Thanks!
possible better answer: http://stackoverflow.com/a/25151424
type: Question
has answer: http://stackoverflow.com/a/25151424
tagged with: http://stackoverflow.com/tag/c
has answer: http://stackoverflow.com/a/25151426
score: 0
tagged with: javascript
has title: Equivalent of C extern declaration in JavaScript

http://stackoverflow.com/comment/39006509
has text: is it possible to do the same thing with a css rule? ex: $element.css( margin-[align], def ); ?
comment on: http://stackoverflow.com/a/25072168
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/39062240
score: 0
type: AnswerComment
type: Comment
has text: Further to this, I'm wondering if because the Google Maps intializes prior to everything else on the page, the values would in fact be null until the script could run to pull the PHP values, but I would expect it to then update once it actually got them read in or have I got this all messed up
comment on: http://stackoverflow.com/a/25101905

http://stackoverflow.com/q/25196392
type: Question
tagged with: slideup
tagged with: javascript
tagged with: jquery
has body: I wanted to create a slide up panel like Simple Sidebar, but it needs to slide up from the bottom and should be adjustable to 2 heights and self adjusting content on the top which should make the division scrollable. I have designed the code based on the Simple Sidebar, but for me it doesn't work the way it is needed, it overlays over the text instead of compressing the height. Stage 1 (when h is clicked) Stage 2 (when h1 is clicked) HTML .... H H1 Click JS $(function(){ $("#down-toggle").click(function(e) { e.preventDefault(); $("#down-wrapper").toggleClass("toggled"); }); $("#down-toggle1").click(function(e) { e.preventDefault(); $("#down-wrapper").toggleClass("toggled1"); }); }) I couldn't write my CSS, all stuff could be found in the plnkr link http://plnkr.co/edit/uX5qqQgVBZKEgARBeG23?p=preview
score: 0
has title: Bottom Slide Panel - jQuery & CSS3
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25224514
accepted answer: http://stackoverflow.com/a/25224514

http://stackoverflow.com/a/25228667
has body: This is not possible IMO - Worklight does not provide nor can it provide such functionality in a reliable and consistent manner. You have a request and you have a response. You can't reliably know when will the request be received by the server and then by the backend and back. It depends on various factors (payload size, network speed, ...). I don't think you could accomplish this w/out overly complicating things. Maybe what you could do is "cheat" and say that a request = 0% and a response = 100%, and so as long as there is no response (either success or failure) then display a running number or some such. And when a response is received in the application, jump to 100%. It's not reliable because it could jump to 100% right away, and it could potentially even cross 100% if you are changing numbers very fast but it takes an even longer amount of time to receive the response... So I think a spinner indicator (= WL.BusyIndicator or alike) is a better approach. Additionally, you should question your scenario, for example: how to make it faster and more efficient.
answers question: http://stackoverflow.com/q/25228535
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25228535
type: Answer
upvote count: 1
score: 1
downvote count: 0

http://stackoverflow.com/a/25100873
has body: For a simple $http get of 1 file I would probably just do it in the controller, but if you want to use a factory you want to return the $http.get('file.json') and then use success to wait for the promise to resolve. Looks like this plnkr For an API I would use a $resource - video about resource setup
type: Answer
answers question: http://stackoverflow.com/q/25100731
score: 0

http://stackoverflow.com/comment/39052797
has text: Seems to me that the problem is inside backbone router. Could you test the same thing but without push state?
comment on: http://stackoverflow.com/q/25083474
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39041967
has text: You're wrong in this case @cvializ. `methodHandler` is an object, and when you call `methodHandler['a-key']()` the `this` keyword will be set to `methodHandler`. It won't do anything in the global scope.
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/25090605
type: Comment

http://stackoverflow.com/comment/41302377
type: Comment
has text: Never mind. I think I figured it out. Just for your reference, in case it ever happens to you, add a font-size:0!important; to your #outerImageContainer and it should work. thank you
score: 3
type: AnswerComment
comment on: http://stackoverflow.com/a/25240262

http://stackoverflow.com/a/25162855
has comment: http://stackoverflow.com/comment/39175379
type: Answer
has comment: http://stackoverflow.com/comment/39175688
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39175632
has comment: http://stackoverflow.com/comment/39175321
has comment: http://stackoverflow.com/comment/39175443
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25162746
has body: You can put HTML content into infowindows. You don't specify what you want to link to, however you could do something like: var locations = [ ['Bondi Beach', -33.890542, 151.274856, 4, 'http://bondi.com'], ['Coogee Beach', -33.923036, 151.259052, 5, 'http://coogee.com'], ['Cronulla Beach', -34.028249, 151.157507, 3, 'http://cronulla.com'], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2, 'http://manly.com'], ['Maroubra Beach', -33.950198, 151.259302, 1, 'http://maroubra.com'] ]; ... infowindow.setContent('&lt;a href="' + locations[i][4] + '"&gt;' + locations[i][0] + '&lt;/a&gt;');
accepted answer of: http://stackoverflow.com/q/25162746

http://stackoverflow.com/a/25120569
has body: Using underscore _.findWhere(arrayFocal, {name: name})
type: Answer
has comment: http://stackoverflow.com/comment/39099983
has comment: http://stackoverflow.com/comment/39097040
has comment: http://stackoverflow.com/comment/39097092
score: 0
answers question: http://stackoverflow.com/q/25120435

http://stackoverflow.com/comment/39095894
comment on: http://stackoverflow.com/a/25118870
score: 0
has text: Hey please replace Jquery reference with this " " I have sent you a HTML page as well on your email only update is Jquery Reference
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25150644
tagged with: arrays
possible better answer: http://stackoverflow.com/a/25150802
has answer: http://stackoverflow.com/a/25150771
accepted answer: http://stackoverflow.com/a/25150771
has answer: http://stackoverflow.com/a/25150802
has comment: http://stackoverflow.com/comment/39152949
has comment: http://stackoverflow.com/comment/39153031
tagged with: php
has comment: http://stackoverflow.com/comment/39153539
has body: I want to add these images from my server to an JavaScript array so I can work with them. The example below should alert the number of images in the folder. At the moment there is two images in there and this script alerts me twice saying I've the length of the array is one. Obviously I want one alert saying two. &lt;?php include("mysqlconnect.php"); $select_query = "SELECT `ImagesPath` FROM `offerstbl` ORDER by `ImagesId` DESC"; $sql = mysql_query($select_query) or die(mysql_error()); while($row = mysql_fetch_array($sql,MYSQL_BOTH)) { ?&gt; &lt;script&gt; var images = new Array("&lt;?php echo $row["ImagesPath"]; ?&gt;"); alert(images.length);
type: AnsweredQuestion
has title: Turning PHP selection to JavaScript array for manipulation
tagged with: javascript
has comment: http://stackoverflow.com/comment/39152989
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39152936

http://stackoverflow.com/comment/39153823
type: Comment
score: 0
type: AnswerComment
has text: 2 milliseconds is too short. Try higher values like 2000.
comment on: http://stackoverflow.com/a/25151039

http://stackoverflow.com/q/25080128
upvote count: 1
tagged with: css
has comment: http://stackoverflow.com/comment/39021401
tagged with: overflow
answer count: 0
score: 1
has comment: http://stackoverflow.com/comment/39022346
has body: Here's my problem: I've got a wrapper element and a draggable child element within it. I need the parent element to expand in size (or atleast get the size data) when overflow occurs. I've used the overflow event but this only triggers at the start / end, not at the resize. I know that i can get the data if i place the getSizeInfo function in the drag / mousemove function but this isn't what i want. Code (full version on fiddle): function getScrollInfo($element){ var text = 'scrollHeight: ' + $element[0].scrollHeight + '&lt;br/&gt;'; text += ' Height: ' + $element.height() + '&lt;br/&gt;'; text += ' scrollTop: ' + $element.scrollTop() + '&lt;br/&gt;'; info.html(text); return{ height:$element[0].scrollHeight} }; content.on('resize overflow', getScrollInfo(content)); Question: I need to get width/ height of an element when overflow + resize occurs (if possible) and also keep the scroll position at the end of the bar. Note: I know that jQuery can do all this but i've decided to create a custom method for dragging elements because it needed more control over the process. FIDDLE: http://jsfiddle.net/f8w8v/2/
type: Question
tagged with: javascript
tagged with: resize
has title: Javascript : Capture width / height on overflow
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/39021868
type: UnansweredQuestion

http://stackoverflow.com/q/25123313
tagged with: browser-feature-detection
tagged with: cross-browser
favorite count: 0
upvote count: 5
type: UnansweredQuestion
tagged with: iframe
has title: Detect if browser supports data uri scheme with iframes
has answer: http://stackoverflow.com/a/31289745
has body: Internet Explorer does not support the data uri scheme for iframe urls (see http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx). Other browsers do. As browser detection is loaded with testing and future-proofing problems, I want to use feature detection to work around this issue. So: how can I detect whether or not a browser supports the data uri scheme for iframes?
downvote count: 0
type: Question
answer count: 2
score: 5
tagged with: data-uri-scheme
tagged with: javascript
has comment: http://stackoverflow.com/comment/39102022
has comment: http://stackoverflow.com/comment/39912790
has answer: http://stackoverflow.com/a/25123344

drupal
type: Tag
tags question: http://stackoverflow.com/q/25180768
tags question: http://stackoverflow.com/q/25190040
tag name: drupal
tags question: http://stackoverflow.com/q/25145058

http://stackoverflow.com/a/25154948
score: 1
has body: You could try something like this: function parse(text) { return text.replace(/[a-z]+\[\d+\]/g,function(exp){return eval(exp);}); } JSFiddle It simply takes the input and replaces parts of it that look like array[index] with whatever eval does with it. This solution does not seem like a good idea to me and I agree that there should be some standard way of doing it (better), but I just can't think of another way of doing it. Edit: It would probably be more reliable if you could mark the JS code in the XML somehow before it is sent to the client like &lt;center&gt;&lt;input type='checkbox' value=" + BEGINJS&gt;row[2]&lt;ENDJS + " /&gt; then your regex wouldn't have to guess wildly at what the JS code will look like.
has comment: http://stackoverflow.com/comment/39160783
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/39160947
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25154009
answers question: http://stackoverflow.com/q/25154009
type: AcceptedAnswer

http://stackoverflow.com/comment/39166854
type: Comment
has text: @IvanIvanov are you writing a general expression parser for which this is just one particular case?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25157966

http://stackoverflow.com/q/25190226
has body: I have a bit of a problem. I need to get the contents of a page, but it must be requested from the client machine (with client ip - essentially). And I need to access the content string on either server or client side. The page is from a different domain than the page the user's initially on. Whichever language or technology to be used, doesn't matter. Thanks!
tagged with: javascript
tagged with: httprequest
score: 0
tagged with: cross-domain
tagged with: client-server
answer count: 1
linked to: http://stackoverflow.com/q/25353835
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25359601
has title: Get cross domain client-side request page contents
type: Question
has comment: http://stackoverflow.com/comment/39227096
has comment: http://stackoverflow.com/comment/39228317

http://stackoverflow.com/comment/39271056
comment on: http://stackoverflow.com/q/25212810
has text: Are the input and output data really arrays of *double wrapped* objects, or is this just a quirk of handraulic serialization? It would be more conventional to see simple arrays of objects.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39223948
type: QuestionComment
comment on: http://stackoverflow.com/q/25189044
type: Comment
has text: show your code what you tried?
score: 0

http://stackoverflow.com/q/25070517
has answer: http://stackoverflow.com/a/25070682
type: Question
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25070682
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
has title: Trying to modify a show/hide script so first div opens on page load (Django project)
has body: I'm working on a blog feed and have a script that currently opens up a div and displays it's (the div's) content onclick; however, I would like the first div in the feed to open when the page loads and right now I'm struggling to figure it out. I'm a serious django and javascript/jQuery noobie, so any help that can be offered with this is greatly appreciated. Currently everything else works. The page loads the feed, all of the divs are closed and when selected they open up. base.html &lt;article id="entry-{{ object.pk }}" {% if continue_reading %} onclick="toggleArticleActive('entry-{{ object.pk }}', true);" {% endif %}&gt; ...blog post content &lt;/article&gt; tools.js function toggleArticleActive(article_dom_id, is_active) { if (is_active) { // deactivate all that are active $('.article-active').each(function(index, value) { toggleArticleActive($(this).attr('id'), false); }); } var a = $('#' + article_dom_id); a.attr("class", is_active ? "article-active" : ""); if (is_active) { a.find(".show-when-article-active").show(); // can animate, e.g. show('slow') a.find(".show-when-article-not-active").hide(); // Load questions about this entry in the main div $('#div_activity').load('/f/?entry=' + article_dom_id.replace('entry-','') ); } else { a.find(".show-when-article-active").hide(); a.find(".show-when-article-not-active").show(); } }
tagged with: django
type: AnsweredQuestion

http://stackoverflow.com/comment/39300330
has text: @Ondkloss, when I do this to get rid of [1] from my data set, var data = output.replace("[1]", ""); I get undefined is not a data type error, any ideas?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25228767
type: QuestionComment

http://stackoverflow.com/q/25102107
has body: How to update mysql ,show div element and hide element when finished countdown with this code ? When finished count i want to hide OK and show time out and update Mysql too fiddle OK time out
tagged with: javascript
upvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25102472
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: -1
type: UnansweredQuestion
has title: How to update mysql and show div element when finished countdown with this code?
tagged with: mysql
downvote count: 1
type: Question

http://stackoverflow.com/q/25204073
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
accepted answer: http://stackoverflow.com/a/25204176
type: AnsweredQuestion
has body: I just stuck on a problem when trying to select an attribute of a rect object within a svg. This is the rectangle I want to get a value from: &lt;rect id="2" x="13.761467889908257" y="50" width="49.31192660550459" height="50" fill="rgb(43,0,0)"&gt;&lt;/rect&gt; in order to calculate the x-position of another rectangle I need the x-value. I tried some different ideas like: svg.selectAll("rect") .select("id",2); // 1st version .select("id","2"); // 2nd version .select("#2"); // found in another d3 tutorial -&gt; not working for me and a lot more. Is there any way to do this? // If you need more of my code just write it in a comment I wasnt sure how much to write in order to NOT write too much
type: Question
tagged with: selection
possible better answer: http://stackoverflow.com/a/25204206
has comment: http://stackoverflow.com/comment/55309237
has title: d3 get rect attribute by id
has answer: http://stackoverflow.com/a/25204206
tagged with: javascript
has answer: http://stackoverflow.com/a/25204176
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/70579

http://stackoverflow.com/q/25077554
has comment: http://stackoverflow.com/comment/39016724
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25077607
has comment: http://stackoverflow.com/comment/39018600
has comment: http://stackoverflow.com/comment/39078374
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25077701
downvote count: 0
tagged with: angularjs-scope
type: Question
has answer: http://stackoverflow.com/a/25077667
accepted answer: http://stackoverflow.com/a/25077667
has answer: http://stackoverflow.com/a/25077607
tagged with: javascript
tagged with: jquery
has body: I am developing a mobile application. I encountered a problem while trying to relay messages in the view that was returned from the server after an ajax call. The idea is to display the message in the view after the user clicks on a "Refresh" button. The binding is not working exactly as I hope. It is not showing the user the current message but the one received from a previous click of the refresh button. Thus, the first time the user clicks the button after the view is loaded, nothing happens... I can't figure out why the view update is not instantaneous but rather only changes when the user clicks again. Here is a simplified version of my code: HTML: &lt;span ng-model="rec"&gt;{{rec}}&lt;/span&gt; &lt;button ng-click="getNew()"&gt; Refresh &lt;/button&gt; JavaScript: $scope.rec = window.localStorage.getItem('content'); $scope.getNew = function() { $.ajax({ ... success: function(result, textStatus, xhr) { ... window.localStorage.setItem('content', result.content); $scope.rec = window.localStorage.getItem('content'); } }, error: function(xhr, textStatus, errorThrown) { ... } }); }; I know that the ajax call is successful every time since the view is updated, but one step late of when it should be. Thanks for the help in advance!
tagged with: ajax
upvote count: 2
has title: AngularJS binding response from server not updating in view
answer count: 3

http://stackoverflow.com/q/25197067
tagged with: validation
has title: Why IE 9 not supporting JavaScript function?
tagged with: jquery
has answer: http://stackoverflow.com/a/25197312
possible better answer: http://stackoverflow.com/a/25197654
has comment: http://stackoverflow.com/comment/39238903
has answer: http://stackoverflow.com/a/25197654
accepted answer: http://stackoverflow.com/a/25197312
has comment: http://stackoverflow.com/comment/39238900
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39238838
has comment: http://stackoverflow.com/comment/39238868
has body: I'm trying to make a function for checking file size and extension on run time, I have done it and working properly on all browser except ie 9. Can anyone let me know where the problem? Javascript &lt;script type='text/javascript'&gt; function showFileSize() { var input, file; // (Can't use `typeof FileReader === "function"` because apparently // it comes back as "object" on some browsers. So just see if it's there // at all.) if (!window.FileReader) { bodyAppend("p", "The file API isn't supported on this browser yet."); return; } input = document.getElementById('fileinput'); if (!input.files[0]) { bodyAppend("p", "Please select a file before clicking 'Load'"); } else { file = input.files[0]; var sFileName = file.name; var sFileExtension = sFileName.split('.')[sFileName.split('.').length - 1].toLowerCase(); bodyAppend("p", "File Type " + sFileExtension + " is " + file.size + " bytes in size"); } } function bodyAppend(tagName, innerHTML) { var elm; elm = document.createElement(tagName); elm.innerHTML = innerHTML; document.body.appendChild(elm); } &lt;/script&gt; HTML &lt;form action='#' onsubmit="return false;"&gt; &lt;input type='file' id='fileinput'&gt; &lt;input type='button' id='btnLoad' value='Save' onclick='showFileSize();'&gt; &lt;/form&gt;
type: Question
tagged with: function
tagged with: internet-explorer-9
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/39238972

http://stackoverflow.com/a/25186443
score: 2
downvote count: 0
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25186191
has body: Add this property to your div: overflow:auto; You can also specify horizontal or vertical scroll, like this: overflow-y:auto; overflow-x:auto; Hope this help you.

http://stackoverflow.com/q/25128420
has body: I am sure there is something that I am missing from this code, I just can not figure out what it is. Here is the main page: &lt;script&gt; function wwCallback(e) { document.write(e.data); } function wwError(e) { alert(e.data) } $(document).ready(function () { var worker = new Worker("sync.js"); worker.onmessage = wwCallback; worker.onerror = wwError; worker.postMessage({ 'cmd': 'downloadUser', 'url': 'server.php' }); console.log("WW Started"); }); &lt;/script&gt; Server.php simply echoes a JSON string and I have verified that it is both valid and working using normal ajax requests. Here is my web workers code: function getData(url) { var req = new XMLHttpRequest(); //expect json req.open('GET', url); req.send(null); req.onreadystatechange = function () { if (req.readyState == 4) { if (req.status == 200) { self.postMessage(req.responseText); } } } } self.addEventListener('message', function (e) { var data = e.data; switch (data.cmd) { case 'downloadUser': getData(data.url); } self.close(); }, false); Could anyone point me in the right direction?
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/25149909
favorite count: 0
has comment: http://stackoverflow.com/comment/39111737
has answer: http://stackoverflow.com/a/25149909
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Web Workers and JSON
tagged with: javascript
has comment: http://stackoverflow.com/comment/39111683
tagged with: web-worker
score: 0

http://stackoverflow.com/a/25218669
score: 1
has comment: http://stackoverflow.com/comment/39313159
upvote count: 1
has comment: http://stackoverflow.com/comment/39279600
type: Answer
has body: You need to make a few changes to your code.. As a first step, you will need to add in some middleware for the Express framework to handle post data - something like: var app=express(); var bodyParser = require('body-parser') app.use( bodyParser.urlencoded() ); Starting with the html page, your input fields need to be wrapped in a form - otherwise they won't be / can't be posted to anything when you click Submit. Verify Then, add a new method in your server.js to handle a post request to the /login url, in which you would then be able to read the submitted values & do something appropriate with them. app.post('/login', function(sReq, sRes) { var username = sReq.body.username; var password = sReq.body.password; if (username=='myusername' && password == 'mypassword') { // do something here with a valid login } else { // user or password doesn't match } }); Have a look at How to retrieve POST query parameters? for some more hints. This example doesn't do anything around comparing submitted values to the database or encrypting passwords, but might help you get started with submitting post data and accessing it in Node. It's also not something you should ever do in something you're planning on using in a production setting - passwords should be encrypted, and you'd need a lot of other stuff around handling session state. By far the best option is to find and use some pre-built authentication middleware - and configure it to suit your needs.
downvote count: 0
answers question: http://stackoverflow.com/q/25218505
has comment: http://stackoverflow.com/comment/39279539

http://stackoverflow.com/comment/39042192
score: 0
type: Comment
type: QuestionComment
has text: I have checked firebug console and I am not getting any error. But I will keep your words in mind and will attempt to get you more codes here.
comment on: http://stackoverflow.com/q/25090585

http://stackoverflow.com/comment/39014499
has text: @user3884316 - what exactly is your question? I don't understand what you want help with or what you're trying to accomplish. Your current code creates an array of the title strings. What do you want in the array. You can't put a global variable into an array. You can put the contents of a global variable into an array which is what you are already doing. I have no idea what your `views[0]` example is about. I thought you were saying that is what you are trying to achieve. If so, then were do the `name` and `items` properties in that come from?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25070029
type: AnswerComment

http://stackoverflow.com/q/25214742
accepted answer: http://stackoverflow.com/a/27136128
has body: I have 2 Samsung Smart TVs with the following model and firmware (from TV Menu->Support->Contact Samsung screen) 2013: Model Code: UN32F5500 Software Vesrion: T-MST12AKUC-1121.3 2014: Model Code: UN40H6350 Software Vesrion: T-MST14AKUC-1115.3 The first problem (reproduced on both TVs, 2013 &amp; 2014) is the timezone is detection is wrong. The following code: &lt;script type='text/javascript' src='./$MANAGER_WIDGET/Common/af/../webapi/1.0/deviceapis.js'&gt;&lt;/script&gt; // ... var timezone = deviceapis.tv.info.getTimeZone(); window.alert('Timezone=' + timezone.timezone + ', dst=' + timezone.dst); outputs the following: Timezone=2, dst=0 This is PL_TV_TIMEZONE_EASTERN whereas I'm in the PST timezone, i.e. the following output is expected (5 is PL_TV_TIMEZONE_PACIFIC, and daylight savings time is active now): Timezone=5, dst=1 The most weird thing is that I'm not able to change the TV's timezone and DST setting. If I go to the TV's Menu->System->Time->Clock, then the 'DST' and 'Time Zone' settings are disabled (grayed out) even if the 'Clock Mode' setting is set to 'Manual'. The second problem is specific for the 2014 TV, it's not reproduced on the 2013 TV. The Date's getUTCHours() method returns wrong result not taking into account Daylight Saving Time Shift. That is, the following code: var now = new Date(); window.alert('now: ' + now + '; getUTCHours()=' + now.getUTCHours()); produces the following output: now: Fri Aug 08 2014 18:12:52 GMT-0800 (GMT), getUTCHours()=2 whereas the following is expected (as on my 2013 TV): now: Fri Aug 08 2014 18:12:52 GMT-0700 (PDT); getUTCHours()=1 The current time (Fri Aug 08 2014 18:12:52) is correct but the DST offset is not taken into account in the returned GMT time's hour. Also, timezone code in the parenthesis is wrong (GMT instead of PDT or rather, taking into account timezone error described above, EDT or EST). I observed this problem just recently, I think it appeared after I made Software Update for the 2014 TV. I'd rat…
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/39272571
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/39272521
favorite count: 0
has answer: http://stackoverflow.com/a/33086142
tagged with: timezone
tagged with: dst
has title: Timezone and DST problems on the latest 2014 Samsung Smart TV firmware
has answer: http://stackoverflow.com/a/27136128
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25215368
tagged with: samsung-smart-tv
has answer: http://stackoverflow.com/a/25215368
upvote count: 1
type: Question

kineticjs
tags question: http://stackoverflow.com/q/25183808
tags question: http://stackoverflow.com/q/25108433
type: Tag
tags question: http://stackoverflow.com/q/25122387
tags question: http://stackoverflow.com/q/25198336
tags question: http://stackoverflow.com/q/25133949
tag name: kineticjs
tags question: http://stackoverflow.com/q/25091404
tags question: http://stackoverflow.com/q/25195091
tags question: http://stackoverflow.com/q/25217595
tags question: http://stackoverflow.com/q/25090578
tags question: http://stackoverflow.com/q/25081166
tags question: http://stackoverflow.com/q/25159022
tags question: http://stackoverflow.com/q/25114078
tags question: http://stackoverflow.com/q/25182263
tags question: http://stackoverflow.com/q/25128838

http://stackoverflow.com/q/25124162
has title: Update multiple documents / add keys and its values in to a new array
answer count: 1
has body: I have collection named inventory where I have multiple documents that has values for each doc { "apples": 2 ,"oranges": 3, "carrots": 5 } { "apples": 4, "oranges": 6, "carrots": 9 } How do I update push all fruits in to a single array on multiple documents like so: { "fruits": { "apples":2 ,"oranges":3 }, "carrots": 5 }
tagged with: mongodb-query
has answer: http://stackoverflow.com/a/25130444
accepted answer: http://stackoverflow.com/a/25130444
type: AnsweredQuestion
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/39106399
score: 0
tagged with: mongodb
has comment: http://stackoverflow.com/comment/39123062

http://stackoverflow.com/comment/39148814
score: 4
type: Comment
type: QuestionComment
has text: The simple fact of willing to print a username with a context inside a static function is a design flaw.
comment on: http://stackoverflow.com/q/25148354

http://stackoverflow.com/comment/39021528
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25080132
score: 0
has text: how do I set the z-index of `aTextDV` as the top most level?

http://stackoverflow.com/a/25082701
score: 0
has body: i would suggest you to use jquery, because the dom handling is easier and it's also the proper way to separate javascript from html if you wanted to use jquery, a better way than using parent().parent() ist to get all parents and filter them. $(function() { $(".myTable a").click(function(){ $(this).parents('tr').remove(); }); }); and change your html like this: Apple x Ball x you can test it on the fiddle: http://jsfiddle.net/SP2X9/
type: Answer
answers question: http://stackoverflow.com/q/25082421

http://stackoverflow.com/q/25085121
tagged with: javascript
score: 3
answer count: 1
downvote count: 0
favorite count: 0
tagged with: kendo-ui
type: UnansweredQuestion
has title: Adding Request Headers to the XmlHttpRequest with Kendo UI Upload control
upvote count: 3
has comment: http://stackoverflow.com/comment/39034995
has body: I'm trying to use the code provided by Telerik to add request headers to the XHR, but I'm getting the following error. "0x800a139e - JavaScript runtime error: InvalidStateError" Here is the code $(document).ready(function () { $("#file").kendoUpload({ multiple: false, async: { saveUrl: "save", }, upload: onUpload, }); }); function onUpload(e) { var xhr = e.XMLHttpRequest; if (xhr) { xhr.addEventListener("readystatechange", function (e) { if (xhr.readyState == 1 /* OPENED */) { xhr.setRequestHeader("X-Foo", "Bar"); } }); } }
type: Question
has answer: http://stackoverflow.com/a/36032767

http://stackoverflow.com/comment/39150529
score: 0
type: QuestionComment
has text: I would agree, this is entirely opinion-based. I'm just thinking I can't be the only person with this problem and am curious how others are approaching it
type: Comment
comment on: http://stackoverflow.com/q/25147656

http://stackoverflow.com/a/25197263
has comment: http://stackoverflow.com/comment/39239656
has comment: http://stackoverflow.com/comment/39239569
type: AcceptedAnswer
upvote count: 3
has comment: http://stackoverflow.com/comment/39239743
accepted answer of: http://stackoverflow.com/q/25197065
type: Answer
answers question: http://stackoverflow.com/q/25197065
has body: Once you change the duplicate id's to common classes, You can try something like this $('select').change(function () { $("option:disabled").prop("disabled",false); // reset the previously disabled options var $selectedQ = $(this).find("option:selected"); // selected option var commonClass= $selectedQ.attr("class"); // common class shared by the matching options $("."+commonClass).not($selectedQ).prop("disabled","disabled"); // disable the matching options other than the selected one }); Updated Fiddle (This won't work if there are more than one, different classes for the options, i'd use a common value or data attribute instead like) $('select').change(function () { $("option:disabled").prop("disabled", false); var $selectedQ = $(this).find("option:selected") var value = $selectedQ.val(); $("option[value='" + value + "']").not($selectedQ).prop("disabled", "disabled"); }); Demo Update (as per comments) $('select').change(function () { var prevMatches = $(this).data("prevMatches"); if (prevMatches) prevMatches.prop("disabled", false) var $selectedQ = $(this).find("option:selected") var value = $selectedQ.val(); var $matches = $("option[value='" + value + "']").not($selectedQ); $matches.prop("disabled", "disabled"); $(this).data("prevMatches", $matches); }); Demo
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/39240678

http://stackoverflow.com/comment/39027560
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25083529
has text: Thank you, I figured it out before your post, but I marked your question correct, thank you very much

http://stackoverflow.com/a/25206579
type: Answer
downvote count: 0
score: 1
has body: You can try to solve this with CSS. Set overflow: hidden on the container div. This will hide any content that overflows the container, so use with care.
accepted answer of: http://stackoverflow.com/q/25206264
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25206264

http://stackoverflow.com/comment/39088336
has text: possible duplicate of [Can I use multiple versions of jQuery on the same page?](http://stackoverflow.com/questions/1566595/can-i-use-multiple-versions-of-jquery-on-the-same-page)
score: 0
comment on: http://stackoverflow.com/q/25115861
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39193259
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25144985
has text: Updated. Is this even possible?

http://stackoverflow.com/comment/39229709
comment on: http://stackoverflow.com/q/25191740
type: Comment
type: QuestionComment
has text: @Barmar I believe so but I would like to be more sure about that. I hope someone can answer this cause in Google I could not find any thing.
score: 0

http://stackoverflow.com/q/25168735
type: Question
has answer: http://stackoverflow.com/a/25169103
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39186332
accepted answer: http://stackoverflow.com/a/25169098
score: 0
possible better answer: http://stackoverflow.com/a/25169056
answer count: 3
has answer: http://stackoverflow.com/a/25169056
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25169098
has comment: http://stackoverflow.com/comment/39186761
has comment: http://stackoverflow.com/comment/39186803
has comment: http://stackoverflow.com/comment/39186775
has comment: http://stackoverflow.com/comment/39186841
has body: I have a hidden div with the details of a thumbnail that is visible on the page. When you click on the thumbnail, it should fadein or slideup the div with details. I have set with jquery incremented ID's to each ".portfolio-item-details" to identify each one and then have set with jquery the same ID's to the href of the thumbnail. content content Since this is done dynamically, how can I with jquery fadeIn or slideUp the ".portfolio-item-details" if the href is equal to the ID. Basically thumbnail with "#portfolio1" should slide up the div with "#portfolio1" on click. This is my jquery code which to add the IDs and HREF is working perfectly but not working to slideUp or fadeIn the div with the same ID. $(document).ready(function () { var i=0; $(".portfolio-item-details").each(function(){ i++; var newID="portfolio"+i; $(this).attr("id",newID); $(this).val(i); }); var i=0; $(".open-portfolio-item-details").each(function(){ i++; var newReadMoreHREF="#portfolio"+i; $(this).attr("href",newReadMoreHREF); $(this).val(i); if ($(".portfolio-item-details").attr("id") == "newReadMoreHREF") { $(this).fadeIn(); } }); }); SOLUTION Thanks to Austin's code, I was able to modify it to work with mine. Check here: http://jsfiddle.net/jdoimeadios23/xpsrLyLz/
tagged with: css
has comment: http://stackoverflow.com/comment/39187265
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39186398
has comment: http://stackoverflow.com/comment/39186723
has title: If href equals id of another div do function
has comment: http://stackoverflow.com/comment/39186988

http://stackoverflow.com/comment/39128085
has text: Not sort of, that IS a function, but that is jQuery.
type: QuestionComment
comment on: http://stackoverflow.com/q/25137548
score: 1
type: Comment

http://stackoverflow.com/a/36734097
has comment: http://stackoverflow.com/comment/75560214
type: Answer
has comment: http://stackoverflow.com/comment/74137540
answers question: http://stackoverflow.com/q/25135926
score: 3
has body: Go for size attribute of node. Example nodes:{shape:'image',size:20} Reference: http://visjs.org/docs/network/nodes.html
downvote count: 0
upvote count: 3

http://stackoverflow.com/q/25184210
has comment: http://stackoverflow.com/comment/39214524
tagged with: javascript
type: UnansweredQuestion
downvote count: 0
tagged with: jquery
score: 7
favorite count: 0
tagged with: ajax
has body: In my server I am returning a JSON object in the format of jsTree : {"id":"value", "text":"value", "parent":"value"} I am getting it in my view through an Ajax call. Console.log shows me the details but jsTree gives me the error: Uncaught TypeError: Cannot read property 'children' of undefined View: $.ajax({ url: "/category", dataType: 'json', type: 'GET', success: function (res) { $.each(res, function (i, obj) { products.push([obj.id, obj.parent, obj.text]); $('#jstree_demo_div').jstree({ 'core': { 'data': [{ "id": obj.id, "parent": obj.parent != 0 ? obj.parent : "#", "text": obj.text }] } }); console.log(obj.parent != 0 ? obj.parent : "#"); }); } });
type: Question
tagged with: jstree-search
has answer: http://stackoverflow.com/a/25192222
upvote count: 7
has title: jstree : Uncaught TypeError: Cannot read property 'children' of undefined
answer count: 1
tagged with: jstree

http://stackoverflow.com/q/25134598
has body: The "fn" console.log comes up before than console.log of the two variables. My function is that: function test1(var1, var2, fn){ console.log(var1, var2); fn(); } function test2(var3){ console.log(var3 + " it's here"); } Call: test1(123, "Hello!", test2("Look") );
tagged with: parameter-passing
has comment: http://stackoverflow.com/comment/39123016
has comment: http://stackoverflow.com/comment/39122534
has comment: http://stackoverflow.com/comment/39122776
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25134647
has comment: http://stackoverflow.com/comment/39122805
score: 1
has comment: http://stackoverflow.com/comment/39123766
has comment: http://stackoverflow.com/comment/39122630
has answer: http://stackoverflow.com/a/25134647
has title: Why Javascript load into a function "functions as parameters" before than variables?
has comment: http://stackoverflow.com/comment/39122772
type: Question
has comment: http://stackoverflow.com/comment/39123109
has comment: http://stackoverflow.com/comment/39122970
tagged with: function
upvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/39123035
has comment: http://stackoverflow.com/comment/39122894
has comment: http://stackoverflow.com/comment/39122978
has comment: http://stackoverflow.com/comment/39123653
downvote count: 4
has answer: http://stackoverflow.com/a/25134652
answer count: 3
has answer: http://stackoverflow.com/a/43599093
has comment: http://stackoverflow.com/comment/39122954
has comment: http://stackoverflow.com/comment/39122584
has comment: http://stackoverflow.com/comment/39122598
has comment: http://stackoverflow.com/comment/39123840
has comment: http://stackoverflow.com/comment/39122599
has comment: http://stackoverflow.com/comment/39123186
accepted answer: http://stackoverflow.com/a/25134652
has comment: http://stackoverflow.com/comment/39122778
favorite count: 0

http://stackoverflow.com/comment/39228647
score: 2
comment on: http://stackoverflow.com/q/25191520
type: QuestionComment
has text: Nope. your async.each iterator isn't executing the "done" argument and doesn't have a callback (making it relatively pointless)
type: Comment

http://stackoverflow.com/comment/39603887
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25073918
has text: Yes, I've struggled with this too...

coffeescript
tags question: http://stackoverflow.com/q/25182461
tags question: http://stackoverflow.com/q/25178416
tags question: http://stackoverflow.com/q/25161714
tags question: http://stackoverflow.com/q/25073788
tags question: http://stackoverflow.com/q/25080047
tags question: http://stackoverflow.com/q/25099140
tags question: http://stackoverflow.com/q/25125730
tags question: http://stackoverflow.com/q/25162842
tags question: http://stackoverflow.com/q/25085051
tags question: http://stackoverflow.com/q/25226043
type: Tag
tags question: http://stackoverflow.com/q/25229388
tags question: http://stackoverflow.com/q/25198169
tags question: http://stackoverflow.com/q/25131958
tags question: http://stackoverflow.com/q/25220277
tag name: coffeescript
tags question: http://stackoverflow.com/q/25127613
tags question: http://stackoverflow.com/q/25177713
tags question: http://stackoverflow.com/q/25104572
tags question: http://stackoverflow.com/q/25086625
tags question: http://stackoverflow.com/q/25207188
tags question: http://stackoverflow.com/q/25145187
tags question: http://stackoverflow.com/q/25109656
tags question: http://stackoverflow.com/q/25122978
tags question: http://stackoverflow.com/q/25099887
tags question: http://stackoverflow.com/q/25080824
tags question: http://stackoverflow.com/q/25177179
tags question: http://stackoverflow.com/q/25165305
tags question: http://stackoverflow.com/q/25181441
tags question: http://stackoverflow.com/q/25153939

http://stackoverflow.com/q/25187508
answer count: 0
downvote count: 0
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/39226038
type: Question
has comment: http://stackoverflow.com/comment/39257656
has title: Ext js overriding a config property
upvote count: 1
tagged with: javascript
favorite count: 0
tagged with: sencha-touch
tagged with: extjs
has comment: http://stackoverflow.com/comment/39234568
has body: I have a ext-js component definition like below.. Ext.define("Demo.widgets.nav", { extend: 'Ext.dataview.List', xtype: 'nav', id:'nav', requires: ['Ext.dataview.List'], config : { autoHide: false, maxWidth: 265, lastSelect:null, itemSelection:null, . . ... } Basically this component was defined in one of our custom framework which we use it as a platform to build the application. We don't have any control on it. We found a bug in one of the config property "autoHide". It should be true but defined as false in it. I am trying override that component to change that config property like below. Ext.define( 'demo.widgets.nav', { override: 'demo.widgets.nav', config : { autoHide: true } }); while overriding, Is it just enough to mention the property we need or do we need to copy all the properties of config in the original component. Till now I did overwrite only the functions for which I either copy whole function source with modifications or use callOverridden() to call original function. I just confused in overwriting the config properties.

http://stackoverflow.com/q/25101980
has body: I want to apply the more css class directly to inline style tag dynamically, I tried like below not working (In my situation I can't able to create a class) It is working for tag but not work for ----- ----- ----- -----
tagged with: jquery
has answer: http://stackoverflow.com/a/25102090
type: Question
has answer: http://stackoverflow.com/a/25102268
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39062167
has answer: http://stackoverflow.com/a/25102106
tagged with: css
linked to: http://stackoverflow.com/q/2692770
has title: apply many class into inline style html
has comment: http://stackoverflow.com/comment/39062360
score: 0
has comment: http://stackoverflow.com/comment/39062142
possible better answer: http://stackoverflow.com/a/25102100
accepted answer: http://stackoverflow.com/a/25102090
has answer: http://stackoverflow.com/a/25102100
tagged with: javascript
linked to: http://stackoverflow.com/q/1033156
answer count: 4
has comment: http://stackoverflow.com/comment/39062118
type: AnsweredQuestion

http://stackoverflow.com/comment/39048213
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25094345
has text: Could you please update your question so that it shows us the complete code. Thank you.
type: Comment

http://stackoverflow.com/comment/39185820
has text: Thanks, this has given me a lot of direction -- see my edit. Still testing and playing around with the algorithm
comment on: http://stackoverflow.com/a/25106854
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25123278
has comment: http://stackoverflow.com/comment/39103978
has body: I have a map over which I place KML overlays from a couple of weather sources. I also show the API weather clouds and local forecasts. It works pretty well, except for one weird problem. When using Chrome, and I originally call up the map, I see the map and the clouds, but not the local forecasts and KML overlays. There appears to be a section of the overlays missing. If I pan all the way around the world by dragging the map to the right, and come back to my original location, I see everything. History has been cleared and settings checked. Just not getting that one section of data to be displayed in Chrome, unless I pan around. It all seems to work fine on Firefox (I'm a Linux user, so no IE testing at the moment). Here's the page: http://www.vallartayachtclub.org/weather-and-tides/842-storm-track-and-general-weather-2 Code is here: &lt;script src="https://maps.googleapis.com/maps/api/js?v=3&amp;amp;libraries=weather"&gt; &lt;/script&gt; &lt;script&gt; function initialize() { var myLatlng = new google.maps.LatLng(20.693307,-112.293924); var mapOptions = { zoom: 5, center: myLatlng, panControl: false, mapTypeId: google.maps.MapTypeId.SATELLITE, zoomControlOptions: { position: google.maps.ControlPosition.LEFT_CENTER } }; var map = new google.maps.Map(document.getElementById('map-canvas'),mapOptions); var kmlLayer = new google.maps.KmlLayer({ url: 'http://my.sfwmd.gov/sfwmd/common/images/weather/plots/storm_all.kml', suppressInfoWindows: false, map: map, preserveViewport: true }); kmlLayer.setMap(map); var kmlLayer = new google.maps.KmlLayer({ url: 'http://www.nhc.noaa.gov/gis/kml/nhc_active.kml', suppressInfoWindows: false, map: map, preserveViewport: true }); kmlLayer.setMap(map); var cloudLayer = new google.maps.weather.CloudLayer(); cloudLayer.setMap(map); var weatherLayer = new google.maps.weather.WeatherLayer({ temperatureUnits: google.maps.weather.TemperatureUnit.FAHRENHEIT }); weatherLayer.setMap(map); } google.maps.event.addDomListener(window, 'load', initial…
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39104179
has title: Google maps API kml overlay sections not showing in Chrome unless I go all the way around the world
tagged with: javascript
has comment: http://stackoverflow.com/comment/39139217
tagged with: google-maps-api-3
type: Question
score: 0
tagged with: kml

http://stackoverflow.com/q/25182072
type: Question
has comment: http://stackoverflow.com/comment/42223470
has comment: http://stackoverflow.com/comment/42223061
has answer: http://stackoverflow.com/a/25182204
upvote count: 1
has title: ExtJS: Duplicate class name 'Ext.form.trigger.Spinner' specified, must be a non-empty string
tagged with: javascript
type: UnansweredQuestion
tagged with: extjs
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has body: I have a problem sometimes appears on the console [W] [Ext.define] Duplicate class name 'Ext.form.trigger.Spinner' specified, must be a non-empty string Click + F5 Ctrl softkey disappears again just shake F5 appears and stops be updated grid. How to keep track of these moments? Thx. P.S. Text was translated by Google translator

http://stackoverflow.com/comment/39055630
has text: btw, I googled for the reactive extensions and I am getting the impression that they are more similar to a Promise library and not a language extension introducing async syntax. Promises help deal with the callback nesting and with the exception handling but they arent as neat as the syntax extensions. The for loop is still annoying to code and you still need to translate code from the synchronous style to the promise style.
comment on: http://stackoverflow.com/a/25098230
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25191842
linked to: http://stackoverflow.com/q/25069510
has comment: http://stackoverflow.com/comment/39248981
type: Question
has title: Closure to set element classes in Javascript with setTimeout
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25192092
type: UnansweredQuestion
has body: I am trying to animate through CSS properties by adding "start" and "end" classNames through javascript. I have defined a bunch of these classes in CSS (for instance starting with opacity: 0 and ending with opacity: 1 I am trying to loop through all of the elements, set a start className on an element, then an end className on the element to trigger the transition. The problem is if I do that how I normally would, by the time the function finishes there would be no actual className change. Using setTimeout with even no delay is one way to get around this, as was mentioned here but that method does not work in this instance because of my looping. I am using a closure. Here is my JS code: var animation = (function () { var a = {}; a.divIndex = -1; a.imgIndex = startHolders.length; a.animIndex = -1; a.divs = startHolders; a.run = function () { if (++a.divIndex === a.divs.length) a.divIndex = 0; if (++a.animIndex === animations.length) a.animIndex = 0; if (++a.imgIndex === imageElements.length) a.imgIndex = 0; imageElements[a.imgIndex].className = animations[a.animIndex]['start']; setTimeout(function() { imageElements[a.imgIndex].className = animations[a.animIndex]['end']; }, 0); startHolders[a.divIndex].appendChild(imageElements[a.imgIndex]); }; setInterval(a.run, 1000); return a; })(); What I really wanted was to be able to set all those indexes to 0 and use this instead of a (just some placeholder object) but I couldn't do this with the setTimeout because of how it changes the value of this. Another problem here is that if I put the if(++a.index) at the bottom of the code, by the time setTimeout runs the value ofa.index` has changed (I believe) Does anybody know of a workaround here or just a better way?

http://stackoverflow.com/q/25130117
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25130200
type: Question
score: 3
tagged with: indexeddb
has title: Indexeddb adds a new value instead of updating an existing value
has body: When attempting to update a record within indexeddb using the put method, it appears that a new value is created rather than a change. According to MDN this is the method to update a record, yet I'm not having the expected result. Any ideas? Here is my code example. /* @keys initalisation */ extension.onupgradeneeded = function (event) { database = event.target.result; if (!database.objectStoreNames.contains('profile')) { var _profile = database.createObjectStore('profile', { autoIncrement: true }); _profile.createIndex('default', 'default', { unique: true }); _profile.createIndex('username', 'username', { unique: true }); _profile.transaction.oncomplete = function (_oncompleteEvent) { app.database.store(database, 'profile', { default: true, username: 'my name', image: 'images/svg/menu.svg' }); }; } var app = { database: { update: function (_database, _datakeys, _key, _value, _function) { /* @pass database object, array / string, string, object, callback */ var _updateRequest = _database.transaction(_datakeys, "readwrite").objectStore(_key).put(_value); _updateRequest.onerror = function (event) { try { _function.error(event); } catch(err) { console.log('An error was encountered', event.target.error.name); } }; _updateRequest.onsuccess = function (event) { try { _function.success(event); } catch (error) { _function(event); } }; } } }; /* @how I call the function */ app.database.update(database, 'profile', 'profile', {default: false, username: 'hello world', image: 'http://imagepath.com' }, { error: function () { alert('failed'); }, success: function (returnedData) { console.log(returnedData); } );
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25130200
tagged with: storage

http://stackoverflow.com/q/25219799
answer count: 1
has body: I know that success.phtml is the file where I should put the code I want to execute, but I received from CJ this file which is not an html, its a php class. Question is very simple: I would like to know how can I integrate this file into the success.phtml after an order has been received.? Thank you class CommissionJunction extends Mage_Core_Helper_Data { /** * Get SKU, quantity, price and discount amount for each product in a given order * @param object $order * @return array */ private function _getOrderProductsList($order) { $orderItems = $order-&gt;getAllItems(); $purchasedSkus = array(); $count_orderItems = count($orderItems); for($i = 0; $i &lt; $count_orderItems; $i++) { $purchasedSkus[$i] = array( 'ITEM' =&gt; $orderItems[$i]['sku'], 'QTY' =&gt; number_format($orderItems[$i]['qty_ordered'],0), // no decimals 'AMT' =&gt; number_format($orderItems[$i]['price'],2) // 2 decimal places 'DCNT' =&gt; number_format(abs($orderItems[$i]['discount_amount']),2) */ ); } return $purchasedSkus; } /** * Get the Universal Data (JSON) Object for Commission Junction. * This object contains the order details passed on to Commission Junction for reporting purposes * on the Checkout Success / Order Confirmation page. * Notes: * - CID, TYPE AND CURRENCY are hard coded * @param string $orderId * @return JSON object Universal Data Object for Commission Junction $json_masterTmsUdp */ public function getCommissionJunctionUdo($orderId) { $order = Mage::getModel('sales/order')-&gt;loadByIncrementId($orderId); $udo = array(); $udo['CID'] = 'XXXX'; $udo['TYPE'] = 'XXXX'; $udo['CURRENCY'] = 'USD'; $udo['OID'] = $orderId; $udo['DISCOUNT'] = number_format(abs($order-&gt;discount_amount),2); $order_coupon_code = $order-&gt;coupon_code; if(!is_null($order_coupon_code) &amp;&amp; !empty($order_coupon_code)) { $udo['COUPON'] = $order_coupon_code; } $udo['PRODUCTLIST'] = self::_getOrderProductsList($order); if(Mage::getModel('core/cookie')-&gt;get('aff_commissionjunction') == 'cjafflx') { $udo['F…
downvote count: 0
accepted answer: http://stackoverflow.com/a/25219918
favorite count: 0
has comment: http://stackoverflow.com/comment/39281548
tagged with: php
score: 2
type: AnsweredQuestion
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25219918
has title: How to integrate dynamically JS code in success page in magento
has comment: http://stackoverflow.com/comment/39281528
tagged with: magento
tagged with: zend-framework
tagged with: javascript
has comment: http://stackoverflow.com/comment/39281603
linked to: http://stackoverflow.com/q/25221090

http://stackoverflow.com/comment/39046013
type: Comment
has text: What do you want to do with the instance? They are meant to be injected into controllers.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25093270

http://stackoverflow.com/q/25117045
accepted answer: http://stackoverflow.com/a/25117408
has title: JQuery Get element without one of it's children?
favorite count: 0
tagged with: removechild
tagged with: dom-manipulation
downvote count: 2
type: AnsweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25117408
type: Question
tagged with: javascript
tagged with: jquery
score: -1
has body: is it possible to do this in JQuery: Test test HELOOOO If I have the above code stored in variable (eg: var content), is there any function to call that returns me the original content without some specific element? Something like var content = content.remove('.test') Test test and this should be the returned value?
answer count: 1

http://stackoverflow.com/a/25145299
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Although I can't specifically answer why the second doesn't work, I can attempt to answer why the first does work. Through variable hoisting the JavaScript interpretor changes the first one to look like this var foo; foo = foo || {}; so it works and the second doesn't because by the time it runs the second line, foo is declared as undefined.
answers question: http://stackoverflow.com/q/25145242

http://stackoverflow.com/q/25082539
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25082635
score: -2
has title: Moving jquery code to external file not working
has answer: http://stackoverflow.com/a/25082654
accepted answer: http://stackoverflow.com/a/25083529
has comment: http://stackoverflow.com/comment/39027312
has comment: http://stackoverflow.com/comment/39025570
has comment: http://stackoverflow.com/comment/39025662
has body: I am trying to move jquery code from internal html file to external file and link it in the head of html file, the site is working inside html but when I move the code to external file the link is not working. HTML head code:
downvote count: 6
has comment: http://stackoverflow.com/comment/39026860
has comment: http://stackoverflow.com/comment/39025547
answer count: 5
has answer: http://stackoverflow.com/a/25082995
upvote count: 4
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25083529
has answer: http://stackoverflow.com/a/25083524
tagged with: javascript
has comment: http://stackoverflow.com/comment/39025557
tagged with: jquery
has answer: http://stackoverflow.com/a/25082635
favorite count: 0
type: Question

http://stackoverflow.com/comment/39101356
type: QuestionComment
comment on: http://stackoverflow.com/q/25122977
has text: Thanks. Just as fyi... I'm totally a JS/Jquery novice. In other practice suchas CSS etc... I get using unique ID, but since I was trying to trigger the same thing, I didn't know if the ID had to be attached to all items being triggered. For sake of better question and practice I'll revise that.
score: 0
type: Comment

http://stackoverflow.com/q/25102541
tagged with: javascript
has body: I have a slider in my code. Right now if I click on the slider an alert will pop up. But I want to pop up that alert only if the slider is moved or its value has been changed compared to previous movement. Is it possible. Here is my code. Price rangeA:
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25102554
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25102554
tagged with: jquery-ui
has title: How to determine if the slider is moved(or its value has changed)

http://stackoverflow.com/comment/39169404
score: 11
comment on: http://stackoverflow.com/q/25159999
has text: You should **never** use the same ID for multiple elements.. The ID is unique. Use a class instead...
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25181762
type: Answer
has body: You say you want "one or more" whitespace characters between the "x", but you have used the ? quantifier which means "zero or one". Thus, because you've also marked the "x" as optional, it will match any two-or-more digit number: Your first [\d]{1,} will match against 0 then your second one will match on 1. Note that you do not need to enclose single atoms into a character range: [\d] can be more simply written as \d. Also {1,} -- meaning "one or more" -- is more easily encoded as +. As you want "one or more" whitespace character on either side of the "x", I would go with: \d+(?:(?:\s+x\s+)|\s+)\d+ Note that (?: ... ) is a "non-capture group", so these bits won't form part of your match array. However, I don't think you want "one or more" whitespace character, as that won't match your first example. Instead, try this: \d+(?:(?:\s*x\s*)|\s+)\d+ Where the * quantifier means "zero-or-more".
answers question: http://stackoverflow.com/q/25181350
score: 0

http://stackoverflow.com/a/51548949
answers question: http://stackoverflow.com/q/25150590
score: 0
has body: I got the same error, but the issue was I had a LineString with two identical coordinates. "geometry" : { "type" : "LineString", "coordinates" : [ [ 143.345763, -33.840952 ], [ 143.345763, -33.840952 ] ] } I had to make this into a Point for it to be valid "geometry" : { "type" : "Point", "coordinates" : [ 143.345763, -33.840952 ] }
type: Answer

http://stackoverflow.com/comment/39119184
type: QuestionComment
has text: Caweren, it would be your server's job to figure out if 9999999999 points could have really been earned by the player.
comment on: http://stackoverflow.com/q/25132598
score: 0
type: Comment

http://stackoverflow.com/comment/39207762
score: 0
type: Comment
has text: i don't think so. It is not allowing numbers and other special symbols
type: AnswerComment
comment on: http://stackoverflow.com/a/25180396

http://stackoverflow.com/a/25072945
answers question: http://stackoverflow.com/q/25072874
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25072874
has body: Please check that the html elements on which you are adding the events are there on the page when dom is ready as you have applied code on dom ready. You might be setting the html through some other source like ajax or something else which might occur after dom ready. Try adding the events on window load: $(window).on('load',function(){ //Your code to be put here });
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/25134307
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25134218
has body: The difference between the two is that in the first example you have a DIV that the chart is looking for i.e. Note that is has id="container" and your HighCharts code is looking for it: renderTo: 'container', You should just add the above DIV to your code where you want the chart to appear.
answers question: http://stackoverflow.com/q/25134218
upvote count: 2
has comment: http://stackoverflow.com/comment/39156635
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/39160453
type: Answer

http://stackoverflow.com/q/25078070
has title: Passing additional data through my JSON object,that is returned from the auto complete
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
answer count: 1
tagged with: asp.net-mvc-5
tagged with: autocomplete
tagged with: javascript
has answer: http://stackoverflow.com/a/25079840
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
has body: I am working on an asp.net MVC web application. I have the following action method, which will return Tag numbers as JSON to be displayed as an autocomplete results, :- public ActionResult AutoComplete(string term){ var ad = repository.FindServer(term, true).OrderBy(p => p.Technology.Tag).Select(a => new { label = a.Technology.Tag }).ToList(); return Json(ad, JsonRequestBehavior.AllowGet); } And my auto complete field is: Search But I want to be able to pass additional data such as the “Server Name & Data created” in addition to the current tag number, to be part of the returned json.But to do the auto complete based on the tag number. I am looking for something such as the auto complete result returned inside facebook . where if you type a name you will get the person networkinfo & Country, so that you can know which person we want to . Regards edit the action method is:- public ActionResult AutoComplete(string term){ var tech = repository.AllFindTechnolog(term).ToList(); var resources = repository.GetResources(tech.Select(a=>a.IT360ID.Value).ToArray(),false).ToList(); var query = from techItems in tech join resourcesItems in resources on techItems.IT360ID.Value equals resourcesItems.RESOURCEID // join based on db2ID select new { label = techItems.Tag, name= resourcesItems.RESOURCENAME }; return Json(query, JsonRequestBehavior.AllowGet); }
accepted answer: http://stackoverflow.com/a/25079840

http://stackoverflow.com/q/25164734
has title: Three.js OBJMTLLoader load maps from .mtl only in Safari
type: UnansweredQuestion
tagged with: three.js
has body: I've created a server with express.js and I'm trying to load a model: (new THREE.OBJMTLLoader()).load('/coffee/models/alexia.obj', '/coffee/models/alexia.mtl', function(object) { return scene.add(object); }); But this works only in Safari (my OS by the way - Mac OS X Mavericks). Chrome, Opera, Firefox don't load texture only black object. As I can see I'm not the only person who faced with this problem but I couldn't find out the answer.
answer count: 0
has comment: http://stackoverflow.com/comment/39183138
type: Question
has comment: http://stackoverflow.com/comment/39182409
score: 0
tagged with: javascript

http://stackoverflow.com/q/25169766
tagged with: css
has title: How to show the page when background image fully loaded?
upvote count: 2
has comment: http://stackoverflow.com/comment/39188508
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25169877
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/5057990
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/39188571
linked to: http://stackoverflow.com/q/10013769
favorite count: 0
possible better answer: http://stackoverflow.com/a/25169923
has answer: http://stackoverflow.com/a/25169923
accepted answer: http://stackoverflow.com/a/25169877
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39188790
has body: I have a background image and I want to use $(documnet).load() to set an event that shows the page whenever the image is fully loaded. How can I do that? My HTML code: Hello World

http://stackoverflow.com/comment/39180650
comment on: http://stackoverflow.com/q/25165219
type: Comment
has text: Also see [Do I Need An X Session To Run Firefox?](https://metacpan.org/pod/WWW::Mechanize::Firefox::FAQ#Do-I-Need-An-X-Session-To-Run-Firefox) in the `WWW::Mechanize::Firefox` FAQ.
score: 1
type: QuestionComment

http://stackoverflow.com/a/29493404
has body: There is a bit of tweaking needed on top of the post you provided. General idea to solve your issue is this one: We create a VivaGraph svg graphics (which will create an svg element in the dom) Into this svg graphic we create only once a clip path with relative coordinates When we create a node we refer to the clip path Code is: var graph = Viva.Graph.graph(); graph.addNode('a', { img : 'a.jpg' }); graph.addNode('b', { img : 'b.jpg' }); graph.addLink('a', 'b'); var graphics = Viva.Graph.View.svgGraphics(); // Create the clipPath node var clipPath = Viva.Graph.svg('clipPath').attr('id', 'clipCircle').attr('clipPathUnits', 'objectBoundingBox'); var circle = Viva.Graph.svg('circle').attr('r', .5).attr('cx', .5).attr('cy', .5); clipPath.appendChild(circle); // Add the clipPath to the svg root graphics.getSvgRoot().appendChild(clipPath); graphics.node(function(node) { return Viva.Graph.svg('image') .attr('width', 30) .attr('height', 30) // I refer to the same clip path for each node .attr('clip-path', 'url(#clipCircle)') .link(node.data.img); }) .placeNode(function(nodeUI, pos){ nodeUI.attr('x', pos.x - 15).attr('y', pos.y - 15); }); var renderer = Viva.Graph.View.renderer(graph, { graphics : graphics }); renderer.run(); The result in the dom will be like this: <g buffered-rendering="dynamic" transform="matrix(1, 0, 0,1,720,230.5)"> </g> Notice the clipPathUnits="objectBoundingBox", since it's the main trick for this solution.
type: AcceptedAnswer
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25192770
score: 1
answers question: http://stackoverflow.com/q/25192770
downvote count: 0

http://stackoverflow.com/comment/39165209
type: QuestionComment
comment on: http://stackoverflow.com/q/25156741
score: 0
has text: http://jsbin.com/yotalaqe/1/edit
type: Comment

http://stackoverflow.com/comment/39299549
has text: In order to get some userful answers, try to edit your question in order to reflect the real issue: scripts don't get included in your wordpress theme.
type: Comment
comment on: http://stackoverflow.com/q/25217128
score: 0
type: QuestionComment

http://stackoverflow.com/q/25107471
favorite count: 0
accepted answer: http://stackoverflow.com/a/25107560
has body: function submit() { console.log('Submit!'); } function foo(callback, param) { console.log(callback); // ... // callback(param); // &lt;-- Script fails here } &lt;input type="button" onclick="foo(submit)"&gt; Why isn't this working? function submit() { [native code] } foo.js:241 Uncaught TypeError: Illegal invocation
has comment: http://stackoverflow.com/comment/39072133
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/39072151
has title: Uncaught TypeError: Illegal invocation on callback
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25107560

http://stackoverflow.com/comment/39230874
has text: Do you expect it have `"incomplete"` value? [`this`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this) in your code doesn't refer to your model. This is not how JavaScript work.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25192676
type: QuestionComment

http://stackoverflow.com/a/25222620
accepted answer of: http://stackoverflow.com/q/25218664
type: AcceptedAnswer
downvote count: 0
has body: Maybe you could toggle the state of your submit button just by checking if the form is $invalid and inputs are $pristine. So, your inputs would be Save <-- ng-disabled="(userForm.$pristine || userForm.$invalid" --> See related Plunker here http://plnkr.co/edit/7pkRAn""
type: Answer
has comment: http://stackoverflow.com/comment/39298144
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25218664
has comment: http://stackoverflow.com/comment/39298166

http://stackoverflow.com/q/25104391
tagged with: coordinates
type: Question
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25104527
type: UnansweredQuestion
has body: I'm trying to open a dialog at client side. when opening a linkbutton to open a dialog (the link is at bottom of screen and obligate the user to scroll down the page)- a web-method is being called and returns the information to show in the dialog. The problem is- the scroll of page returns to the top. I have tried to save the coordinate before calling the web- method like this: ScreenTopCoordinate = document.documentElement.scrollTop; and when returning from the web-method (before opening the dialog): document.documentElement.scrollTop = ScreenTopCoordinate; and it works- but the user still sees a movement to the top of the page and then returning down. Is there a proper way to do this?
has title: maintain scroll position after calling a web-method
tagged with: screen
tagged with: webmethod

http://stackoverflow.com/q/25126351
answer count: 3
tagged with: datatables
has comment: http://stackoverflow.com/comment/39107784
has answer: http://stackoverflow.com/a/25126816
favorite count: 0
type: UnansweredQuestion
downvote count: 1
upvote count: 3
tagged with: datatables-1.10
type: Question
has title: Datatables: Count rows with specific text
has answer: http://stackoverflow.com/a/25127096
tagged with: css-selectors
score: 2
tagged with: javascript
tagged with: jquery
has body: I have a table with various columns and many rows. To simplify this, I just need to know how many rows are billable (in this case, column 2). In other words, how many rows in column 2 have the text "y"? Anyways, this is what I've tried so far: jQuery var billable = 0; // attempt 1 table.rows().eq(1)( function () { if(table.data() === 'y'){ //priceTotal+=parseInt(table.cell(row,0).data()); alert('This is the billable column, now count which equal "y".') billable++; } }); // attempt 2 column(2).data() === "y"){ alert('This is the billable column, now count which equal "y".') billable++; } http://jsfiddle.net/s827x/3/
has answer: http://stackoverflow.com/a/25133381

http://stackoverflow.com/comment/39112128
has text: No luck @Pheonixblade9
comment on: http://stackoverflow.com/q/25128575
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/137625262
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25151952
score: 0
has text: potentially a duplicate of https://stackoverflow.com/a/35381981/14266931

http://stackoverflow.com/comment/39298260
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25228680
has text: @Kamil ok removed the downvote.
type: AnswerComment

http://stackoverflow.com/a/25220674
has comment: http://stackoverflow.com/comment/40312476
downvote count: 0
answers question: http://stackoverflow.com/q/25220621
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40306461
has body: I would always check whether any of the existing packages solve your problem first. There seems to be quite a few meteorite packages on atmosphere you could try: https://atmospherejs.com/package/jbabel-pkg?q=i18n Even if none of them solves your problem 100%, I usually find it easier to extend one of these packages, given that they always provide something that seems useful and it is so easy to just fork them on github. That way you can also contribute back if you like.

http://stackoverflow.com/a/25209955
answers question: http://stackoverflow.com/q/25209861
upvote count: 1
downvote count: 0
type: Answer
has body: $ is a reference to jQuery. This works for me if jQuery is included: Get value $('#getTextBoxValue').on("click", function(){ var value = $("#textbox1").val(); alert('The Value in Textbox is '+value); }); JSFiddle example If you wanted to do it without jQuery, use document.getElementById("textbox1").value; and add the onclick either inline or via normal javascript also: document.getElementById("getTextBoxValue").onclick = function(){ var value = document.getElementById("textbox1").value; alert('The Value in Textbox is '+value); }; After you get that to work, just replace the alert with loadPdf(value); the var value is local to the onclick function, so has to be accessed inside of that function or made global.
score: 1

http://stackoverflow.com/comment/40233517
has text: Thanks for the clarification. It will probably work but does depend on your scripts. Is there a sample page/demo page I can test with a screen reader?
type: Comment
comment on: http://stackoverflow.com/a/25211433
score: 0
type: AnswerComment

http://stackoverflow.com/comment/39062764
type: QuestionComment
type: Comment
score: 1
has text: I very much doubt that you'll find anything to do this. The implications for every single piece of code which expects the day to start at midnight are huge.
comment on: http://stackoverflow.com/q/25102410

http://stackoverflow.com/q/25128413
has comment: http://stackoverflow.com/comment/39112085
has answer: http://stackoverflow.com/a/25128446
downvote count: 1
type: Question
tagged with: if-statement
score: -1
has title: Else-if syntax error?
has body: var to = ['user1', '@user2', 'user3@email.com'] The following codeset should keep 'user1' in the to array, remove the '@' from the start of '@user2', and move 'user3@email.com' to the toEmail array Right now, else if (toName[j] == '@') { is logging 'syntax error' var toEmail = []; var pushToEmail; for (i=0; i&lt;to.length; i++) { var pushToEmail = false; var toName = to[i]; for (j=0; j&lt;toName.length; j++) { if (toName[0] == '@') { toName[0] = toName[0].replace(/@/g, ''); // remove '@'' } console.log('toName[0] = ' + toName[0]); else if (toName[j] == '@') { pushToEmail = true; break; } } if (pushToEmail == true) { toEmail += to.splice(INDEX, 1)[i]; } }
has comment: http://stackoverflow.com/comment/39111650
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/25128446
has comment: http://stackoverflow.com/comment/39112260
upvote count: 0
tagged with: arrays
answer count: 1
tagged with: javascript
favorite count: 0
type: AnsweredQuestion

http://stackoverflow.com/q/25196155
tagged with: javascript
tagged with: jquery
tagged with: popover
has body: I need to count :checked checkboxes on popover content on bootstrap 3. The problem is when I change checkboxes and close popover it doesn't saved. I tried to reinstall/destroy popovers and change dynamically content option, but no results. I also tried to create empty array and count checked checkboxes by hands, push every new check to array, but no result again and it is very hard way. js: $(function () { $('.item').popover({ placement: 'bottom', html: true, content: function () { return $(this).find('.filters').html(); } }); $('#count').click(function() { var filter = $('.item input[type=checkbox]:checked').map(function () { return this.value; }).get(); $('#res').text(filter); }); }); html: click for popover Filter 1 Filter 2 Filter 3 count css: .filters { display: none; } .popover-content { width: 100px; } update: http://jsfiddle.net/sirjay/0vetvfpz/
has title: Bootstrap popover does not save ckeckboxes
downvote count: 0
answer count: 1
favorite count: 0
upvote count: 2
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25198111
score: 2
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
type: Question
accepted answer: http://stackoverflow.com/a/25198111

http://stackoverflow.com/a/25112976
has comment: http://stackoverflow.com/comment/39082554
has comment: http://stackoverflow.com/comment/39085185
has comment: http://stackoverflow.com/comment/39085321
has comment: http://stackoverflow.com/comment/39082634
type: Answer
has comment: http://stackoverflow.com/comment/39083272
has comment: http://stackoverflow.com/comment/39084528
upvote count: 1
has comment: http://stackoverflow.com/comment/39083507
score: 1
answers question: http://stackoverflow.com/q/25109620
has comment: http://stackoverflow.com/comment/39082581
has body: Here's a simple snippet that does XHR request, WITHOUT cookies. Don't worry about cross-origin as you are running from privelaged scope, meaning you aren't coding this in a website but as a firefox addon. var {Cu: utils, Cc: classes, Ci: instances} = Components; Cu.import('resource://gre/modules/Services.jsm'); function xhr(url, cb) { let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest); let handler = ev =&gt; { evf(m =&gt; xhr.removeEventListener(m, handler, !1)); switch (ev.type) { case 'load': if (xhr.status == 200) { cb(xhr.response); break; } default: Services.prompt.alert(null, 'XHR Error', 'Error Fetching Package: ' + xhr.statusText + ' [' + ev.type + ':' + xhr.status + ']'); break; } }; let evf = f =&gt; ['load', 'error', 'abort'].forEach(f); evf(m =&gt; xhr.addEventListener(m, handler, false)); xhr.mozBackgroundRequest = true; xhr.open('GET', url, true); xhr.channel.loadFlags |= Ci.nsIRequest.LOAD_ANONYMOUS | Ci.nsIRequest.LOAD_BYPASS_CACHE | Ci.nsIRequest.INHIBIT_PERSISTENT_CACHING; //xhr.responseType = "arraybuffer"; //dont set it, so it returns string, you dont want arraybuffer. you only want this if your url is to a zip file or some file you want to download and make a nsIArrayBufferInputStream out of it or something xhr.send(null); } Example usage of this snippet: var href = 'http://www.bing.com/' xhr(href, data =&gt; { Services.prompt.alert(null, 'XHR Success', data); });
has comment: http://stackoverflow.com/comment/39083247
has comment: http://stackoverflow.com/comment/39085146
has comment: http://stackoverflow.com/comment/39082603
downvote count: 0
has comment: http://stackoverflow.com/comment/39082663

http://stackoverflow.com/comment/39002971
comment on: http://stackoverflow.com/a/25069974
type: Comment
score: 1
has text: This also blocks the whole Browser/Tab and makes the site completly unresponsive. The only thing how you can break out of it is to close Browser/Tab. That is often not what someone ever wants.
type: AnswerComment

http://stackoverflow.com/q/25088406
tagged with: gulp
has title: Can't get external library with browserify and debowerify
favorite count: 0
tagged with: browserify
accepted answer: http://stackoverflow.com/a/25111348
linked to: http://stackoverflow.com/q/26216887
tagged with: angularjs
tagged with: package
type: AnsweredQuestion
upvote count: 9
has answer: http://stackoverflow.com/a/25111348
has body: I have a headache on my hands. Here's my current setup: bower to get vendor libraries (angular in this case) gulp task to run browserify debowerify to make the bower libraries compatible with browserify App.js (before browserify): 'use strict'; var angular = require("angular"); var Routes = require("./routes"); angular.module('MyAngularApp') .config(Routes); App.js (after browserify/in the bundle.js): var angular = require("./../ext/angular/angular.js"); var Routes = require("./routes"); angular.module('MyAngularApp') .config(Routes); So far so good, right? It seems like debowerify did it's job and replaced the angular with the relative path to the angular.js from bower. But when I debug the bundle.js in the browser command line, after executing the first two require lines (for angular and Routes), angular is an empty obj, but Routes is exactly the correct function that I setup in the export. Question: Why isn't angular being imported correctly using the require function? I put this into my package.json to get the debowerify working: "browserify": { "transform": [ "debowerify" ] },
score: 9
type: Question
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25215307
upvote count: 1
tagged with: zclip
score: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has title: zClip flash video doesn't extend over image in tag
answer count: 0
has body: I am using zClip to copy text when I click on an image. The flash video that the user is supposed to click on is too small. It doesn't extend over the whole image. I could edit jquery.zclip.js and set a static size, but I don't want to unless I have to. Area you have to click: http://i.imgur.com/cLfLCRb.png Image area: http://i.imgur.com/jKdKq6r.png HTML &lt;a data-copy-src="#code1" data-copy-msg="#msg1" href="#" class="copyMe"&gt; &lt;img src="http://i.imgur.com/q2BP7YR.png" /&gt; &lt;/a&gt; &lt;div id="code1" class="copySrc"&gt;copy this&lt;/div&gt; &lt;span id="msg1" class="copyMsg"&gt;&lt;/span&gt; JavaScript $(function() { $('.copyMe').zclip({ path: 'js/ZeroClipboard.swf', copy: function() { var copySrcSelector = $(this).data('copy-src'); return $(copySrcSelector).text(); }, afterCopy: function() { var copyMsgSelector = $(this).data('copy-msg'); $(copyMsgSelector).html("&amp;#x2714;"); } }); });
type: UnansweredQuestion

http://stackoverflow.com/comment/39147157
type: Comment
has text: @agis That's where I got stuck, sorry I couldn't be more helpful. It may be worth asking a new question and linking back to this one for context.
comment on: http://stackoverflow.com/a/25144956
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39250211
has text: Explaaaaaain. :) "The caret (`^`) indicates a negative match when in square brackets; thus, you are selecting anything that is *not* in the set."
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25203403

http://stackoverflow.com/q/25206272
answer count: 2
has answer: http://stackoverflow.com/a/30581036
downvote count: 0
tagged with: undefined
has comment: http://stackoverflow.com/comment/39259064
has comment: http://stackoverflow.com/comment/49231949
favorite count: 0
has comment: http://stackoverflow.com/comment/47343999
has answer: http://stackoverflow.com/a/31379989
has body: I'm trying to implement the Jssor slider into my page, but I keep coming up with that error in the title. My content is being dynamically created via Javascript, like so: var slide = app.createHTML('div', "", {'id':'inventorySlides'}, null); var div = document.getElementById('invDiv'); div.appendChild(slide); and then I procedurally generate cell divs in the same way and append them to slide. I've defined a function in my main controller as in the example on the basic usage page (http://www.jssor.com/development/basic-usage-no-jquery.html), and after all the content has been generated and appended, I call the function jssor_slider1_starter('inventorySlides'); But then I get the error message in the console. I've tried logging the inventorySlides div, and it definitely exists in the DOM, so I know it's not that. I tried searching for currentStyles, which turns out is just on IE and Opera, and I'm using Chrome. So is it something I'm doing wrong? Or is it Jssor that's misbehaving?
has comment: http://stackoverflow.com/comment/39256583
tagged with: jssor
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/30581036
has comment: http://stackoverflow.com/comment/39256089
possible better answer: http://stackoverflow.com/a/31379989
upvote count: 10
type: Question
has title: JSSOR - Cannot read type property 'currentStyle' of undefined
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/48861918

http://stackoverflow.com/comment/39063618
comment on: http://stackoverflow.com/a/25102818
score: 0
has text: if the second file 2.html, change it to 2.php
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25147312
answers question: http://stackoverflow.com/q/25147038
has comment: http://stackoverflow.com/comment/39187051
has body: It doesn't make sense that you will want to re-bind the click event and select2 on ajaxComplete. They should be a one-time binding, in which case, you can just do: $(document).ready(function(){ baseScripts(); function baseScripts() { $(".open-dialog").click(function (event) { event.preventDefault(); event.stopPropagation(); alert("Opening dialog"); href = $().buildUrl($(this).attr("href"), "&amp;isAjax=true"); $().createDialog(href, "Window Title"); return false; }); $("input:hidden.select").each(function () { var element = $(this); if (!($("#s2id_" + element.attr("id")).length)) { $(element).select2({ // select2 properties... }); } }); } });
has comment: http://stackoverflow.com/comment/39150362
score: 0
has comment: http://stackoverflow.com/comment/39187801
has comment: http://stackoverflow.com/comment/39146952
has comment: http://stackoverflow.com/comment/39183441
has comment: http://stackoverflow.com/comment/39169358
has comment: http://stackoverflow.com/comment/39180179
type: Answer

http://stackoverflow.com/q/25133049
has answer: http://stackoverflow.com/a/25136818
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/39119825
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/39120026
upvote count: 1
has comment: http://stackoverflow.com/comment/39119881
favorite count: 0
has comment: http://stackoverflow.com/comment/39119911
has answer: http://stackoverflow.com/a/25133102
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39121346
has title: JS file with imports
type: UnansweredQuestion
has body: I have a lot of imports in my html-files and I need those imports on every page.... So I don't want to copy all the imports every time, so I would like to have one file (e.g. .js file) to collect all the needed imports. With this I just have to import this file and it is easy to maintain. Is this possible? Thank YoU!
has answer: http://stackoverflow.com/a/25133692
type: Question

http://stackoverflow.com/q/25166818
answer count: 0
type: UnansweredQuestion
score: 0
has title: Customize Google Maps +/- Buttons JavaScript
has comment: http://stackoverflow.com/comment/39183646
type: Question
has comment: http://stackoverflow.com/comment/39183038
tagged with: google-maps
linked to: http://stackoverflow.com/q/7916555
tagged with: javascript
has body: Does anyone know of a simple way to restyle the Google Maps JavaScript API mobile =/- buttons? Here is a screenshot of what I am talking about: I am using the standard Google Maps v3 JavaScript API to load the maps. Any ideas?
tagged with: google-maps-api-3
duplicate of: http://stackoverflow.com/q/7916555
has comment: http://stackoverflow.com/comment/39183079
tagged with: css

http://stackoverflow.com/comment/39042585
comment on: http://stackoverflow.com/a/25091398
score: 0
type: AnswerComment
type: Comment
has text: 1) Have you taken a look at your browsers console? 2) Does the separate file only contain the above function or is there any other code?

http://stackoverflow.com/comment/39117694
type: AnswerComment
score: 0
has text: Yes, unfortunately I still see the issue. If I drag an item from bottom to top, one of the items remains blue while the dragged item is red. I would've liked the blue hovered state to disappear in this case.
type: Comment
comment on: http://stackoverflow.com/a/25109662

http://stackoverflow.com/q/25206342
accepted answer: http://stackoverflow.com/a/25206583
has body: I am using the following JS function to have hover tooltip effect. The function works excellent. Problem happens after loading certain area with ajax. I need to call this function to work on the data collected through ajax (Jquery). That is OK as well. Problem is while I close the area called through ajax, I see unexpected behavior at the base page. The previous tooltip effects now show bubble within self (image is given below). Any idea how to prevent this conflict? function tooltip(){ $('.master_tooltip').hover(function(){ // Hover over code var title = $(this).attr('title'); $(this).data('tipText', title).removeAttr('title'); $('&lt;p class="tooltip"&gt;&lt;/p&gt;') .text(title) .appendTo('body') .fadeIn('slow'); }, function() { // Hover out code $(this).attr('title', $(this).data('tipText')); $('.tooltip').remove(); }).mousemove(function(e) { var mousex = e.pageX + 20; //Get X coordinates var mousey = e.pageY + 10; //Get Y coordinates $('.tooltip') .css({ top: mousey, left: mousex }) }); }
has comment: http://stackoverflow.com/comment/39256480
score: 0
has comment: http://stackoverflow.com/comment/39256622
has comment: http://stackoverflow.com/comment/39256660
has title: repeat call of javascript function is creating conflict
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25206583
type: AnsweredQuestion
answer count: 1
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/39256523

http://stackoverflow.com/q/25194856
score: 1
type: Question
tagged with: mongodb
has body: Here's the thing: I created a node.js app and mongodb and deployed on Amazon EC2. By crashed I mean: It wasn't possible to access the app. Node.js Server -> Nginx, EC2 m3.large, PM2 module with cluster (2 vCPU) Mongodb Server -> EC2 t2.micro My problem: Yesterday, the app reached 600 concurrent connections, then it crashed. When I checked pm2 status, both CPUs app processing was 1.50gb Running pm2 restart all , 2minutes later everything was working again. Question(s): Where is the best point to start digging? Mongodb max connections ? Nginx ? Node.js app handling connections wrongly ? EC2 servers not enough CPU ? I really need some help here. Thanks !
has comment: http://stackoverflow.com/comment/39430738
downvote count: 0
tagged with: amazon-ec2
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/39268952
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/39235873
has title: How can i find where my node.js app crashes?
tagged with: node.js
tagged with: nginx

http://stackoverflow.com/comment/39237772
type: Comment
has text: @VishwaKumar It does not matter if the script loads in head or by the . All browsers need is having parsed Javascript objects which are then referenced elsewhere. In the case of AngularJS all we need is that the code for defining a service/controller being executed BEFORE the DOM is compiled. So I really doubt your haunch that this is because of script at the bottom. I recommend you for a moment to think that the problem is something else. Is it possible that you can create a plnkr.
type: AnswerComment
comment on: http://stackoverflow.com/a/25175718
score: 0

http://stackoverflow.com/comment/39099979
comment on: http://stackoverflow.com/a/25121616
has text: and 3) I am guessing you made this answer up based on my earlier comment, rather than from experience, as it is incomplete and will not work as-shown :) I have added a working answer using `trigger`. As-shown you are using a *delegated* event with `data` defining a jQuery selector!
score: 0
type: AnswerComment
type: Comment

function
tags question: http://stackoverflow.com/q/25117458
tags question: http://stackoverflow.com/q/25077775
tags question: http://stackoverflow.com/q/25112950
tags question: http://stackoverflow.com/q/25100707
tag name: function
tags question: http://stackoverflow.com/q/25102879
tags question: http://stackoverflow.com/q/25203766
tags question: http://stackoverflow.com/q/25208050
tags question: http://stackoverflow.com/q/25112521
tags question: http://stackoverflow.com/q/25187239
tags question: http://stackoverflow.com/q/25128129
tags question: http://stackoverflow.com/q/25123158
tags question: http://stackoverflow.com/q/25119503
tags question: http://stackoverflow.com/q/25103793
tags question: http://stackoverflow.com/q/25176690
tags question: http://stackoverflow.com/q/25203048
tags question: http://stackoverflow.com/q/25187927
tags question: http://stackoverflow.com/q/25229861
tags question: http://stackoverflow.com/q/25171696
tags question: http://stackoverflow.com/q/25213530
tags question: http://stackoverflow.com/q/25098580
tags question: http://stackoverflow.com/q/25223832
tags question: http://stackoverflow.com/q/25219442
tags question: http://stackoverflow.com/q/25092892
tags question: http://stackoverflow.com/q/25126754
type: Tag
tags question: http://stackoverflow.com/q/25221186
tags question: http://stackoverflow.com/q/25134598
tags question: http://stackoverflow.com/q/25097109
tags question: http://stackoverflow.com/q/25146193
tags question: http://stackoverflow.com/q/25171584
tags question: http://stackoverflow.com/q/25172995
tags question: http://stackoverflow.com/q/25077559
tags question: http://stackoverflow.com/q/25202082
tags question: http://stackoverflow.com/q/25193720
tags question: http://stackoverflow.com/q/25069879
tags question: http://stackoverflow.com/q/25228928
tags question: http://stackoverflow.com/q/25095353
tags question: http://stackoverflow.com/q/25097737
tags question: http://stackoverflow.com/q/25216111
tags question: http://stackoverflow.com/q/25208764
tags question: http://stackoverflow.com/q/25204952
tags question: http://stackoverflow.com/q/25197067

http://stackoverflow.com/q/25226504
has body: Would anyone happen to know why appending a text node to a div, in the manner shown below, seems to associate something other than the original div to the text node's parent? More importantly, is it possible in jQuery to somehow get back the original div from the text node (after the appending has happened)? I am using jquery 1.11.0, testing on firefox 31.0 and eclipse Kepler. Any help would be greatly appreciated. var div = $("&lt;div&gt;"), text = $(document.createTextNode("Hello there")); // Will need to detach later // to append elsewhere. $(document.body).append(div); // I thought this would make div the parent of text. div.append(text); // Apparently I was mistaken as this alerts "some other parent". if(text.parent() === div) alert("expected parent"); else alert("some other parent");
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25226528
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39293822
has title: Appended text node seems to have incorrect (possibly cloned?) parent in jQuery
linked to: http://stackoverflow.com/q/3176962
type: Question

http://stackoverflow.com/comment/39172672
type: Comment
comment on: http://stackoverflow.com/a/25161642
has text: i removed it only from the first td where first input was. i am trying to put in the second input which is in the next td.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39149884
has text: well perhaps it is like you want to have it? Anyway, if this is running inside another function I guess you should at least return the error code.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25148841

http://stackoverflow.com/q/25164665
tagged with: php
has title: Having trouble in in Json parsing and save value in database
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/39178591
tagged with: mysql
type: Question
downvote count: 4
has answer: http://stackoverflow.com/a/25164808
upvote count: 0
tagged with: javascript
has body: I am getting json response from my server like this . I want to save all this value in database via mysql-PHP . Please Help . {"fields":[{"label":"Do you have a website?","field_type":"website","required":false,"field_options":{},"cid":"c1"},{"label":"Security personnel #82?","field_type":"radio","required":true,"field_options":{"options":[{"label":"Yes","checked":false},{"label":"No","checked":false}],"include_other_option":true},"cid":"c10"},{"label":"Medical history","field_type":"file","required":true,"field_options":{},"cid":"c14"}]}
has comment: http://stackoverflow.com/comment/39178762
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -4

http://stackoverflow.com/comment/39099373
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25121863
has text: Why do you use Jquery and then you go back to standard DOM elements, keep using jquery objects your code will be clearer. For exemple don't write `$('.cell-news')[i].style.display = 'none'` but `$('.cell-news').eq(i).css("display","none");`

ionic-framework
tags question: http://stackoverflow.com/q/25080212
tags question: http://stackoverflow.com/q/25225231
type: Tag
tags question: http://stackoverflow.com/q/25118196
tags question: http://stackoverflow.com/q/25195477
tags question: http://stackoverflow.com/q/25130163
tags question: http://stackoverflow.com/q/25153461
tags question: http://stackoverflow.com/q/25177622
tags question: http://stackoverflow.com/q/25142974
tags question: http://stackoverflow.com/q/25205176
tags question: http://stackoverflow.com/q/25103883
tags question: http://stackoverflow.com/q/25163334
tags question: http://stackoverflow.com/q/25140898
tags question: http://stackoverflow.com/q/25102593
tags question: http://stackoverflow.com/q/25123593
tag name: ionic-framework

http://stackoverflow.com/q/25201231
has body: My bower.json: { "...." : "...." "name": "myproject", "dependencies": { "angular": "1.2.20", "bootstrap": "latest" } } I'd like to replace "latest" in bootstrap dependency by its actual version number. Is there any way to do that via bower command ? (not via a custom script)
tagged with: javascript
answer count: 1
downvote count: 0
has title: Bower: replace the latest dependency version by its actual number
has answer: http://stackoverflow.com/a/25207186
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39246683
upvote count: 1
tagged with: bower
score: 1
type: Question

http://stackoverflow.com/q/25191154
tagged with: typeahead
has comment: http://stackoverflow.com/comment/39228267
favorite count: 0
has comment: http://stackoverflow.com/comment/39231805
answer count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39231777
has comment: http://stackoverflow.com/comment/39228030
has body: so I'm trying to implement a typeahead functionality to my website but after trying all kinds of stuff I narrowed the problem to the fact that it doesn't respond to the typing in the field. This is my code now: And nothing happens. These are the scripts I have loaded: Anything I am missing? Thank you!
has comment: http://stackoverflow.com/comment/39228349
has title: Typeahead function doesn't work
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/39227928

http://stackoverflow.com/q/25100731
tagged with: angularjs
type: UnansweredQuestion
has title: how to read json file in angular?
has body: can you please tell how to how to read json file.I am able to read json file using controller .but there is way to read file from factory .When I use factory am getting null contend..why ? http://plnkr.co/edit/THdlp00GuSk1NS6rqe5k?p=preview app.controller("ctrl",['$scope',"$http",'mainInfo',function(s,$http,mainInfo){ s.students = []; s.guitarVariable = []; console.log(mainInfo); s.guitarVariable = mainInfo.content; /* $http.get('color.json').success (function(data){ s.guitarVariable = data; }).error(function(err){ alert(err); }); */ }]) Using this code in controller I am able to get data .But using factory I am getting null /* $http.get('color.json').success (function(data){ s.guitarVariable = data; }).error(function(err){ alert(err); }); */
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25100773
tagged with: javascript
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25100873
tagged with: jquery

http://stackoverflow.com/a/25204618
answers question: http://stackoverflow.com/q/25190040
type: Answer
upvote count: 1
has body: So I figured out what I needed to do. I had to add the first line to the else statement, this closes everything that has a class of .nav-collapse, and then opens the appropriate one. attach: function(context) { $('.tb-megamenu-button').click(function() { if(parseInt($(this).parent().children('.nav-collapse').height())) { $(this).parent().children('.nav-collapse').css({height: 0, overflow: 'hidden'}); } else { /*line that I put in to allow for other menus to close when one is clicked.*/ $('.nav-collapse').css({height: 0, overflow: 'hidden'}); $(this).parent().children('.nav-collapse').css({height: 'auto', overflow: 'visible'}); } });
score: 1
downvote count: 0

http://stackoverflow.com/comment/40024295
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25216948
type: QuestionComment
has text: maybe this answer can inspire you , http://stackoverflow.com/questions/3887976/jquery-event-listener-for-when-text-has-changed-in-a-td-cell

http://stackoverflow.com/comment/39192223
type: Comment
has text: You're right! Can I get an upvote on the answer? :-)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25171408

http://stackoverflow.com/q/25161751
has title: Done function is never executed
has comment: http://stackoverflow.com/comment/39173472
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/39173534
type: Question
type: AnsweredQuestion
has body: I'm having problems with one of my javascript functions. throughout my webpage i have multiple $.ajax calls followed by .done() and they all seem to work, except one. Can someone spot error? me.AcquireProject = function (lnkClicked) { myheader = lnkClicked.closest('th'); // Get text from cell var headerTxt= myheader.clone().children().remove().end().text() $.ajax({ type: "POST", url: "UpdateProperties.aspx", data: { action: "UpdateProject", projectId: headerTxt } }) .done(function (data) { myheader.append('&lt;span class="label label-info pull-right"&gt; TEST: Ajax call is completed &lt;/span&gt;') }) } debugging using VS2010 &amp; Firefox-firebug showed that the ajax-call is executed without fault. But my debugpoint @myheader.append... is never reached. Question: What could be the reason for it to skip the done() part? Note: As i'm still a 'beginner', don't be afraid to criticise my Jquery usage. I'm open (even requesting) for improvements.
has comment: http://stackoverflow.com/comment/39173221
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/39173070
score: 0
accepted answer: http://stackoverflow.com/a/25162432
has comment: http://stackoverflow.com/comment/39173378
has comment: http://stackoverflow.com/comment/39173614
has answer: http://stackoverflow.com/a/25162432
has comment: http://stackoverflow.com/comment/39173182
has comment: http://stackoverflow.com/comment/39173222

http://stackoverflow.com/q/25219926
score: 1
favorite count: 0
tagged with: return
has comment: http://stackoverflow.com/comment/39281776
has body: Bit complicated to phrase but I have one function that needs to call another one to get a value returned to use in the first function - an example: The first function needs to get the variable gameTitle from the function getGameInfo() function getGameInfo(){ var gameTitle = "test game"; if(gameTitle){ return gameTitle; }else{ return undefined; }; }; function getImages(){ var gameTitle = getGameInfo(); console.log(getGameInfo()); }; but for some reason this never works - it always returns "undefined" - I am extremely confused why this is happening EDIT: I was given an answer in the comments by Pointy - this was not my whole code as this was an example but I was using an asynchronous API and was trying to get the function to return a value from an callback hence the issue of undefined!!!
has comment: http://stackoverflow.com/comment/39281799
has comment: http://stackoverflow.com/comment/39281765
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39282012
upvote count: 1
type: Question
has title: Javascript: call a function to return a value from within a function?
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/25219963
has comment: http://stackoverflow.com/comment/39281911
downvote count: 0

http://stackoverflow.com/a/25158253
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25157351
downvote count: 0
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25157351
has body: The simplest way is to use the aws-sdk Node package. It's pretty well documented here. For uploading images you use the putObject method. Example: S3.putObject({ Bucket: bucketName, ACL: 'private', Key: fileName, ContentType: fileMimeType, Body: new Buffer(fileContents, 'binary'), }, function(err, data) { ... });

http://stackoverflow.com/comment/39158981
comment on: http://stackoverflow.com/q/25154055
type: Comment
type: QuestionComment
score: 0
has text: not able to understand question..plz put some more explanation what do want actually???

http://stackoverflow.com/comment/39202518
comment on: http://stackoverflow.com/q/25177620
score: 0
type: QuestionComment
type: Comment
has text: Thanks Arun now it's working, i'm new in js ^^ PHP is much easier for me

http://stackoverflow.com/comment/39009692
score: 0
has text: @Mike'Pomax'Kamermans wow that's just what i was looking for. Thank you very much!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25073959

http://stackoverflow.com/comment/39279282
comment on: http://stackoverflow.com/q/25218565
type: Comment
type: QuestionComment
has text: Yes you can use ajax. Please show the code so that we can direct you to the correct answer.
score: 0

http://stackoverflow.com/comment/39044247
type: AnswerComment
has text: @ShameelAbdullah You question asks how do render the image in the template. My response says don't try an render in the template just return the image data from a standard URL. Your template content and the image should be served in separate requests.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25092001

http://stackoverflow.com/a/25095549
has comment: http://stackoverflow.com/comment/101834784
upvote count: 96
type: Answer
accepted answer of: http://stackoverflow.com/q/25095548
answers question: http://stackoverflow.com/q/25095548
score: 96
has comment: http://stackoverflow.com/comment/134142946
type: AcceptedAnswer
downvote count: 0
has body: Here is how to draw a circle using JavaScript in HTML5: const canvas = document.getElementById('myCanvas'); const context = canvas.getContext('2d'); const centerX = canvas.width / 2; const centerY = canvas.height / 2; const radius = 70; context.beginPath(); context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false); context.fillStyle = 'green'; context.fill(); context.lineWidth = 5; context.strokeStyle = '#003300'; context.stroke(); body { margin: 0; padding: 0; } &lt;canvas id="myCanvas" width="578" height="200"&gt;&lt;/canvas&gt;
has comment: http://stackoverflow.com/comment/134126775

http://stackoverflow.com/a/49803091
has body: The easiest solution is to use path.resolve. If you only give relative paths to path.resolve then it assumes they are relative to the current working directory, i.e. the project root. So all you need is: const path = require('path'); path.resolve('config/config.js');
downvote count: 0
answers question: http://stackoverflow.com/q/25108184
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/39077027
type: Comment
type: QuestionComment
has text: @Morrisda - if you solved your problem yourself, then you should either post an answer to your own question (and then you can accept it) or delete your question just so this topic gets wrapped up.
score: 0
comment on: http://stackoverflow.com/q/25109493

http://stackoverflow.com/comment/39194044
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25172784
has text: can you share plunker..!! downvoter please comment
type: Comment

http://stackoverflow.com/q/25194243
has title: Raphael issue with drag and drop and translation
has comment: http://stackoverflow.com/comment/39260366
answer count: 1
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has body: I am trying to get one of my components to sort of dock to the other one but something seems to get lost after the drag behaviour ends. Go to the JSFiddle below, place the svg cursor somewhere closer to the top and click the component on the left. Now place the svg cursor a little further down and create another component. Now drag the bottom one onto the top one (from below, the code doesn't cater for from above yet) and drop it. It seems in the "up" drag handler my code as it currently stands applies the translation relative to where the component was created instead of relative to where it was dropped. I don't understand why :( Please help. Open the console to see what I mean, I print some usefull info and object co-ordinates there. Here is the JSFiddle: http://jsfiddle.net/n4rzul/trqrknqj/ And here is the entire drag function that is passed to the raphael svg object: this.drag = function() { return { start:function () { this.position = 0; this.toFront(); this.lastdx ? this.odx += this.lastdx : this.odx = 0; this.lastdy ? this.ody += this.lastdy : this.ody = 0; this.animate({"fill-opacity": 0.5}, 500); this.previousStroke = this.attr('stroke'); }, move:function (dx, dy) { var draggedShape = this; this.transform("t"+(dx+this.odx)+","+(dy+this.ody)); this.lastdx = dx; this.lastdy = dy; }, up: function(){ this.animate({"fill-opacity": 1}, 500); var target; for(i = 0; i &lt; shapes.length; i++) { if(shapes[i] != this) { target = shapes[i]; console.log("found"); break; } } console.log("targetXY: " + target.getBBox().x + ", " + target.getBBox().y); console.log("draggedXY: " + this.getBBox().x + ", " + this.getBBox().y); var tX = target.getBBox().x - this.getBBox().x; var tY = target.getBBox().y - this.getBBox().y; console.log("translate XY to get from dragged to target: " + tX + ", " + tY); this.transform("t"+(tX)+","+(tY)); console.log("but it moves relative to its original XY. Why??: " + this.getBBox().x + ", " +this.getBBox().y); } }; }
accepted answer: http://stackoverflow.com/a/25217521
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39259019
has comment: http://stackoverflow.com/comment/39258683
has comment: http://stackoverflow.com/comment/39260752
tagged with: javascript
tagged with: raphael
has answer: http://stackoverflow.com/a/25217521

http://stackoverflow.com/comment/39203496
type: QuestionComment
type: Comment
has text: getElementByClassName or getElementsByClassName
comment on: http://stackoverflow.com/q/25178227
score: 0

http://stackoverflow.com/q/25148422
has answer: http://stackoverflow.com/a/25163962
tagged with: jsp
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/39175953
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39174679
has comment: http://stackoverflow.com/comment/39149805
linked to: http://stackoverflow.com/q/386281
has comment: http://stackoverflow.com/comment/39148984
has comment: http://stackoverflow.com/comment/39148998
has comment: http://stackoverflow.com/comment/39149930
has body: Hello everyone I am trying to implement a select all check box. So when it is checked all other checkboxes will be checked. I have used this url for help How to implement "select all" check box in HTML? I have a java class that will build a datagrid based on some factors when the jsp is called. I have written this code so far javascript code function toggle(source) { checkboxes = document.getElementsByName('chk'); for(var i=0, n=checkboxes.length;i<n;i++) { checkboxes[i].checked = source.checked; } } my check box for select all <dmf:checkbox name="ABoxes" onclick = 'toggle(this)' id="allABoxes" runatclient="true"/> the checkbox that will be created when the data grid is created. <dmf:checkbox name='chk' datafield='parent_id'/> Currently when I select the check all check box nothing happens. I have gotten the java script to work if I change the dmf:button to input type="checkbox" but then it crashes some of my other code so I must leave them at dmf:button. Thank you everyone for any help it is greatly appreciated. If some of what I have written doesn't make sense just let me know and I will try to clearify any questions.
type: Question
has title: Implement a select all checkbox in JSP with javascript
has comment: http://stackoverflow.com/comment/39164312

http://stackoverflow.com/comment/39106589
comment on: http://stackoverflow.com/a/25125712
type: AnswerComment
type: Comment
has text: Remember that `this.src` is not (necessarily) the same as `this.getAttribute('src')` or `$(this).attr('src')` (the latter two implied by the question)
score: 1

http://stackoverflow.com/q/25168341
answer count: 0
type: UnansweredQuestion
tagged with: css
has comment: http://stackoverflow.com/comment/39200748
downvote count: 0
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/39188561
score: 1
has body: This is a simple javascript-based slider. So far I got it working in updated versions of Safari (Mac), Chrome (Win), Firefox (Win) and IE11. It does NOT work in IE8 and I believe 9 as well. Is that a way to fix it, so it works in IE8 and IE9? Code: here HTML: prev next CSS: #slider-wrapper {width:960px; height:480px;} #slider {width:100%; height:100%; position:relative; overflow:hidden;} .sp {width:100%; height:100%; position:absolute;left: 100%;} .sp.first-in {left:0;} .sp img {width: 100%;} #nav {margin-top:20px; width:100%;} #button-previous {float:left;} #button-next {float:right;} JS: $(document).ready(function(){ $('.sp').first().addClass('current').css({left: 0}); $('#button-next').click(function(){ var old = $('.current').removeClass('current'); if ( old.is(':last-child')) { old.animate({left: "-100%"}); $('.sp').first().css({left: "100%"}).addClass('current').animate({left: 0}); }else{ old.animate({left: "-100%"}); old.next().css({left: "100%"}).addClass('current').animate({left: 0}); } }); $('#button-previous').click(function(){ var old = $('.current').removeClass('current'); if ( old.is(':first-child')) { old.animate({left: "100%"}); $('.sp').last().css({left: "-100%"}).addClass('current').animate({left: 0}); }else{ old.animate({left: "100%"}); old.prev().css({left: "-100%"}).addClass('current').animate({left: 0}); } }); }); Thanks.
type: Question
tagged with: javascript
tagged with: jquery
has title: Can I make this javascript-based slider work in IE8/9?
tagged with: slider
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/39201573

http://stackoverflow.com/q/25102114
score: 0
has comment: http://stackoverflow.com/comment/39095165
has body: I am dynamically trying to add Columns to my UI and then anchor them with the parent and nearby element, however parent is always null. columns[i] = Qt.createComponent("Column.qml"); columns[i].createObject(rectangle1,{id : "column".concat(i), "anchors.left" : name, "width" :getcolwidth(rectangle1) }); Here anchors.left is column0 and in the Column.qml file, I have anchors.leftMargin: 15 anchors.bottom:parent.bottom anchors.bottomMargin: 5 anchors.top: parent.top anchors.topMargin: 5 The parent should point to rectangle1 but instead it points to null.
has comment: http://stackoverflow.com/comment/39130513
type: UnansweredQuestion
tagged with: qt-quick
answer count: 0
has comment: http://stackoverflow.com/comment/39098810
has title: Dynamically created Qt component cannot access parent
type: Question
tagged with: qt
tagged with: qml
tagged with: javascript
has comment: http://stackoverflow.com/comment/39102004

http://stackoverflow.com/comment/39289118
score: 0
comment on: http://stackoverflow.com/a/25223909
type: Comment
has text: please also chck this Question http://stackoverflow.com/questions/25217933/how-to-make-view-formfrom-json-using-angular.cani change my json before making form
type: AnswerComment

http://stackoverflow.com/comment/39129456
type: Comment
has text: Possible duplicate of http://stackoverflow.com/questions/10123953/sort-javascript-object-array-by-date
type: QuestionComment
comment on: http://stackoverflow.com/q/25138306
score: 0

http://stackoverflow.com/q/25105212
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25105454
type: Question
tagged with: reduce
has answer: http://stackoverflow.com/a/25105385
tagged with: javascript
has answer: http://stackoverflow.com/a/25105281
tagged with: show-hide
score: 0
answer count: 3
has title: reducing the javascript with multiple hide/show divs
tagged with: jquery
has body: I'm hoping that someone would be kind enough to help me. I have patched together a script to create a set of thumbnails that when hovered over display a link that will show further information in a slide up div. I need multiple instances of this which I have managed to create but whenever I would like to add a new project (which is what these thumbnails will be) I have to add to the javascript every time I add an instance. I need this to work with a CMS so adding to the javascript is out of the question. My understanding of javascript is not good enough to work out how to reduce the JS and not have to add $("#projectX").slideDown(500); even time I add a new project. The code I have so far is below. I basically don't want to have to write a piece of javascript every time I input another thumbnail and slide up div pairing. HTML: X Slide 1 Lorem ipsum X Slide 2 Lorem ipsum X Slide 3 Lorem ipsum Thumb 1 Lorem ipsum. VIEW MORE Thumb 2 Lorem ipsum. VIEW MORE Thumb 3 Lorem ipsum. VIEW MORE JS: $(function () { $("#slider1").responsiveSlides({ auto: false, pager: false, nav: true, speed: 500, namespace: "callbacks", before: function () { $('.events').append(" before event fired. "); }, after: function () { $('.events').append(" after event fired. "); } }); }); $(function () { $("#slider2").responsiveSlides({ auto: false, pager: false, nav: true, speed: 500, namespace: "callbacks", before: function () { $('.events').append(" before event fired. "); }, after: function () { $('.events').append(" after event fired. "); } }); }); $(function () { $("#slider3").responsiveSlides({ auto: false, pager: false, nav: true, speed: 500, namespace: "callbacks", before: function () { $('.events').append(" before event fired. "); }, after: function () { $('.events').append(" after event fired. "); } }); }); $(document).ready(function(){ $(".project2").click(function(){ $("#project2").slideDown(500); $("#project1").slideUp(500); $("#project3").slideUp(500); }); $(".project1").click(function(){…
type: UnansweredQuestion

http://stackoverflow.com/q/25134901
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22707699
has comment: http://stackoverflow.com/comment/39123495
has answer: http://stackoverflow.com/a/25135003
upvote count: 2
downvote count: 1
type: Question
score: 1
answer count: 2
has answer: http://stackoverflow.com/a/25134933
tagged with: javascript
has body: In angular Js i am trying to store user data such as profile name that should exist in most of routes is it a good practice to store them in the $rootScope. IF not where should i store them.
favorite count: 0
has title: where to store global data in angular JS?
tagged with: angularjs

sequelize.js
type: Tag
tag name: sequelize.js
tags question: http://stackoverflow.com/q/25217064

http://stackoverflow.com/comment/39247724
has text: Your question is missing a lot of important context. There are undeclared variables used and the types of your objects are not known. Can you provide some more detail and produce a self-contained example? Perhaps a JSFiddle would help to demonstrate your problem.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25200960
score: 0

http://stackoverflow.com/a/25113122
type: Answer
score: 1
has body: For decimals you can use toFixed - http://www.w3schools.com/jsref/jsref_tofixed.asp As per for the other problem, don't know. Is it working for the other buttons when you only click once?
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25112949

http://stackoverflow.com/comment/49652973
type: AnswerComment
score: 0
type: Comment
has text: Does this work in windows? I can't find anything on this on the github page.
comment on: http://stackoverflow.com/a/25162110

http://stackoverflow.com/q/25101057
tagged with: javascript
type: UnansweredQuestion
has title: Parse.Query get() fails to retrieve object
has body: I am unable to retrieve a PFUser object using its objectId. I always get an "Object not found" error. I do not understand why this is happening. When I log userObjectUniqueID to the console I can see that it's the exact objectId for the PFUser I'm trying to retrieve. From what I understand from the documentation, this should give me object that belongs to the objectId. Parse.Cloud.define("myFunction", function(request, response){ var userObjectUniqueID = request.params.userUniqueID; //Unique object ID for the user object. var UserClass = Parse.Object.extend("User"); //Referencing the user class. var userQuery = new Parse.Query(UserClass); userQuery.get(userObjectUniqueID, { success: function(user){ alert("Query was successful.") }, error: function(object, error) { alert("query failed: " + error.message); } }) }); I've also tried to use the find() function in Parse.Query to retrieve the PFUser object. Even though I've used the appropriate constraints, it still won't return the object. Any ideas?
type: Question
has answer: http://stackoverflow.com/a/25103644
tagged with: parse-platform
score: 0
answer count: 1

http://stackoverflow.com/comment/86630487
type: Comment
score: 1
type: AnswerComment
has text: Thx. Additionally, if modal popup needs to scroll and the parent needs to remain still .modal-body { max-height: calc(100vh - 210px); overflow-y: auto; } .modal-open { overflow: hidden; overflow-y: scroll; padding-right: 0 !important; }
comment on: http://stackoverflow.com/a/47807685

http://stackoverflow.com/comment/39025022
score: 0
type: Comment
type: QuestionComment
has text: I wouldn't do the GET thing... what happens if you GET before the server has had a chance to process the POST?
comment on: http://stackoverflow.com/q/25082070

http://stackoverflow.com/comment/39168006
comment on: http://stackoverflow.com/q/25157510
has text: Do you want to sort on `Rate` as a priority, and then on `Name`? Like `ORDER BY Rate, Name` in SQL?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25173984
tagged with: node.js
tagged with: spawn
type: Question
has body: while i trying to spawn a batch file am not getting the correct PID of that child process. when i tried to kill the PID of the child process ,the running process is not stoping and it stops another cmd i dont know how it is happening. in my batch file am doing to open another cmd and change the directry to C:\AppiumForWindows-1.0.0\Appium\node_modules\appium\bin and run a node process node appium .i want to execute that node process in seperate cmd (While spawning that batch file it will execute with the same script .i don't need that.)that's what i use separate cmd. Am confusing due this reason am not getting the correct PID of that process?i don't know... var startappium = function (dev, callback) { var ports = {}; var execCmd = __dirname+"//Start.bat"; var args = ['1000']; var start = spawn(execCmd, args); console.log("pid id----------------------",start.pid) var pid =start.pid start.stdout.on('data', function (d) { setTimeout(function() { start .kill() // it does not kill the process },5000); console.log(d.toString()) return callback(null, ports); }); start.stderr.on('data', function (ta) { return callback(null, ta); }); start.on('close', function (code) { console.log("close: ",code) }); } startappium() Start.bat file @echo off start cmd /k " call "C:\Program Files\nodejs\nodevars.bat" &amp; pushd C:\AppiumForWindows-1.0.0\Appium\node_modules\appium\bin &amp;&amp; node appium -p %1 --chromedriver-port %2" pause while running tasklist it shows cms with several PID's and i tried to kill one by one and killed that running batch file process in one PID . PID getting from the child process id not killing the batch process running. Please suggest a solution for this.
tagged with: javascript
score: 0
answer count: 1
has title: child process in node is not getting the correct PID id
has answer: http://stackoverflow.com/a/25179785
type: UnansweredQuestion

http://stackoverflow.com/comment/39024563
has text: @user3647936 please provide any relevant information.
type: Comment
comment on: http://stackoverflow.com/a/25081965
score: 1
type: AnswerComment

http://stackoverflow.com/q/25089603
has comment: http://stackoverflow.com/comment/39040132
has answer: http://stackoverflow.com/a/25089648
tagged with: css
has body: I'm trying to design a website for my company, but I can't figure one thing. I want navbar fixed while people scroll down the page like this one http://www.quintessentially.com (as you can see, the navigation bar gets fixed when you scroll down the page ) I'm using jQuery 1.8.3.min.js and this code $(window).bind('scroll', function() { if ($(window).scrollTop() &gt; 50) { $('.nav').addClass('absolute'); } else { $('.nav').removeClass('fixed'); } }); and the css is like this header .nav{ top: 55px; padding: 0; min-height: 0; font-family: 'Lato', sans-serif; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; line-height: 3px; width: 100%; position: absolute; z-index: 999; } .fixed{ position: fixed; top: 0; } But I don't why it isn't working. Does someone know how to fix it? Thanks !! :D ps: sorry about my bad english.
has title: Keeping my nav when you scroll down the page
type: UnansweredQuestion
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/39039421
score: 1
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39076446
comment on: http://stackoverflow.com/q/25106677
type: Comment
type: QuestionComment
score: 0
has text: Hi Dan, I even tried to switch the position of the console.log of stdout and stderr and still get the same results.

http://stackoverflow.com/q/25162058
has comment: http://stackoverflow.com/comment/39173509
has body: How can I get results returned to placesSearch function, rather than returning results to service.nearbySearch function? Thanks function placesSearch(map,myLatlng,myBusinessName) { var searchArea = myLatlng; var request = { location: searchArea, radius: 500 }; var service = new google.maps.places.PlacesService(map); var googleBusNames = service.nearbySearch(request, callback); validateFeature(googleBusNames,myBusinessName); } function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { return results; } else { console.log("Error"); } }
type: Question
has title: Javascript callback returning results
tagged with: javascript
score: 0
tagged with: callback
linked to: http://stackoverflow.com/q/14220321
tagged with: return
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14220321
has comment: http://stackoverflow.com/comment/39173730
answer count: 0

http://stackoverflow.com/q/25228907
has comment: http://stackoverflow.com/comment/39299587
has body: I am working with Jquery mobile + phonegap to build a mobile app. One of the pages in my app contains data that i need to arrange , so i chose to put it in a table. The data is divided in a way the each server name is in the rowHeader and each two test results are in a row (each one is represented by a button inside a column. The server number is unlimited and also the tests. So , i chose to build this table dynamically using javascript. Monitoring tests MyTools Here is a jsfiddle example: js fiddle The page looks perfect in chrome browser , but when installing the app in a mobile device the table width is higher that the screen width. Is someone familiar with this issue or have a solution for this?
has comment: http://stackoverflow.com/comment/39299356
has comment: http://stackoverflow.com/comment/39299969
type: Question
has answer: http://stackoverflow.com/a/25229307
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/39299559
has comment: http://stackoverflow.com/comment/39298428
tagged with: jquery
has comment: http://stackoverflow.com/comment/39300469
has comment: http://stackoverflow.com/comment/39299239
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/39298373
has comment: http://stackoverflow.com/comment/39299033
type: UnansweredQuestion
has title: Add table dynamically to html page - table is wider than the screen

http://stackoverflow.com/comment/39275929
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25215609
score: 0
has text: Could you possibly add some indentation to your source code example? It's hardly readable without it. Also, why are you defining the `post` method inside `onCreateUser` callback? I believe it should be done in the global context.

http://stackoverflow.com/comment/39228051
comment on: http://stackoverflow.com/q/25191178
score: 0
type: Comment
type: QuestionComment
has text: @ClaudioRedi I think thats jQuery he renamed it

http://stackoverflow.com/a/25113576
answers question: http://stackoverflow.com/q/25113544
type: Answer
downvote count: 0
score: 1
has body: $(".ddl [value=1]").prop("selected", true);
upvote count: 1
has comment: http://stackoverflow.com/comment/39083521
has comment: http://stackoverflow.com/comment/39083480

http://stackoverflow.com/a/25154609
answers question: http://stackoverflow.com/q/25154538
has body: Try this and let me know the result: $content.css("font-size":"14px");
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/a/25200423
accepted answer of: http://stackoverflow.com/q/25200359
score: 1
answers question: http://stackoverflow.com/q/25200359
has comment: http://stackoverflow.com/comment/39245051
type: AcceptedAnswer
upvote count: 2
type: Answer
downvote count: 1
has body: You need to specify text-decoration: none on your ins element, like so: ins{ background:#E6FFE6; text-decoration:none; } JSFiddle demo.

http://stackoverflow.com/comment/39166253
comment on: http://stackoverflow.com/q/25137198
score: 0
type: Comment
has text: Hi, I tried that but that didn't work either. Today I THINK I have found the problem. I removed all the "common.js" includes from airhotels.xml (I commented them out http://puu.sh/aGVwS.png). Now the script seems to be working fine on every page. Now my problem would be how can I use "common.js" and selectric at the same time. I looked at the "common.js" file and this is how it begins http://puu.sh/aGVAF.png and this is how it ends http://puu.sh/aGVBi.png . Could there be something here? If you need more information to help me please inform!
type: QuestionComment

http://stackoverflow.com/comment/39068470
score: 0
has text: Why are you using **both** socket.io and ajax? why are you using **both** Node.js and PHP? I think you're over-complicating this...
comment on: http://stackoverflow.com/q/25104902
type: Comment
type: QuestionComment

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/25103063
tags question: http://stackoverflow.com/q/25124443

http://stackoverflow.com/a/25130373
has comment: http://stackoverflow.com/comment/39115414
has comment: http://stackoverflow.com/comment/39115220
score: 0
has comment: http://stackoverflow.com/comment/39115183
answers question: http://stackoverflow.com/q/25130329
has body: Don't name your functions with the same name! You can call them validateName, validateEmail and validateMessage. When you declare functions with the same name, the previous functions will be overriden by the last one. If you want to call one function in onsubmit, you can set onsubmit=validteForm() and declare validateForm as: function validateForm() { validateName(); validateEmail(); validateMessage(); }
type: Answer

http://stackoverflow.com/comment/39202304
type: Comment
type: QuestionComment
has text: Have you cleared your cache and deleted all cookies and all that? Have you done a ctrl-f5? Can other's see this work? If so it could be the browser you are using.
score: 0
comment on: http://stackoverflow.com/q/25177620

http://stackoverflow.com/q/25096971
score: 0
has title: is this c# array of array the same as this jquery array or array
has answer: http://stackoverflow.com/a/25097126
type: UnansweredQuestion
has body: This is my c# code, where InBoundtable is a datatable DateTime epoch = new DateTime(1970, 1, 1); var result = (from row in InBoundtable.AsEnumerable() group row by row.Field &lt;string&gt; ("Date") into grp select new { AbandonCalls = grp.Sum((r) =&gt; Double.Parse(r["AvgAbandonedCalls"].ToString())), Date = ((DateTime.Parse(grp.Key)) - epoch).TotalMilliseconds }).ToList(); double[][] finalArray = new double[result.Count][]; for (int i = 0; i &lt; result.Count; i++) { double[] tempArrayDoubel = new double[2]; tempArrayDoubel[0] = result[i].Date; tempArrayDoubel[1] = result[i].AbandonCalls; finalArray[i] = tempArrayDoubel; } I return the final array using this code: string jsonformatstring = JsonConvert.SerializeObject(finalArray, Formatting.Indented); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/json; charset=utf-8"; HttpContext.Current.Response.Write(jsonformatstring); HttpContext.Current.Response.End(); I call that web service like this: $.getJSON(webServiceUrl, { fromDate: valFrom, toDate: valTo, sliceNumber:sliceNumber }) .done(function (result) { console.log(result); The result on the console is this: My question : is that format in the image the same as this format: d3 = [ [1325376000000, 650], [1328054400000, 450], [1330560000000, 150], [1333238400000, 200], [1335830400000, 150] ]; ? Update 1 This is the result of expanding the array in jquery
has comment: http://stackoverflow.com/comment/39052922
upvote count: 1
downvote count: 1
tagged with: c#
type: Question
has comment: http://stackoverflow.com/comment/39053030
tagged with: arrays
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/39120201
type: QuestionComment
comment on: http://stackoverflow.com/q/25083564
has text: Yes, sorry, In my code the real name of the socket is `socket2. But as I said in your answer, this code is executed BEFORE I want ... it's executed when I start the server. And at this time, the client file who content the socket code is not yes included...
score: 0
type: Comment

http://stackoverflow.com/q/25183175
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/25345258
tagged with: firefox-addon
tagged with: firefox
has body: I'm writing a firefox plugin and keeping track of each page's workers in an array. Apart from a bit of fancy footwork required to manage this array (as described here https://bugzilla.mozilla.org/show_bug.cgi?id=686035 and here Addon SDK - context-menu and page-mod workers) everything is working properly. One issue I'm having is that when listening to the tabs pageshow event (or the worker's own pageshow event for that matter), the callback seems to fire before the worker is actually ready. When retrieving the page's corresponding worker in the callback and using it to try to send a message to the content script, I'm receiving the error The page is currently hidden and can no longer be used until it is visible again. Normally, I'd just use a setTimeout and grit my teeth, but this isn't available for add-ons. What's a suitable workaround? The code for the main part of the add-on is below: var { ToggleButton } = require('sdk/ui/button/toggle'); var panels = require('sdk/panel'); var tabs = require('sdk/tabs'); var self = require('sdk/self'); var pageMods = require('sdk/page-mod'); var ss = require('sdk/simple-storage'); var workers = []; ss.storage.isPluginActive = ss.storage.isPluginActive || false; var button = ToggleButton({ id: 'tomorrowww', label: 'Tomorowww', icon: { '16': './icon-16.png', '32': './icon-32.png', '64': './icon-64.png' }, onChange: handleButtonChange }); var panel = panels.Panel({ contentURL: self.data.url('panel.html'), contentScriptFile: self.data.url('panel-script.js'), onHide: handlePanelHide, width: 342, height: 270 }); panel.port.on('panel-ready', handlePanelReady); panel.port.on('plugin-toggled', handlePluginToggled); panel.port.on('link-clicked', handleLinkClicked); pageMods.PageMod({ include: ['*'], contentScriptFile: [self.data.url('CancerDOMManager.js'), self.data.url('content-script.js')], contentStyleFile: self.data.url('content-style.css'), onAttach: function (worker) { addWorker(worker); sendActiveState(ss.storage.isPluginActive); }…
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25215871
has comment: http://stackoverflow.com/comment/39219808
type: UnansweredQuestion
tagged with: firefox-addon-sdk
linked to: http://stackoverflow.com/q/15502043
score: 1
upvote count: 1
has title: Firefox add-on pageshow event fires before worker able to receive messages
type: Question

http://stackoverflow.com/q/25198573
tagged with: responsive-design
tagged with: media-queries
has comment: http://stackoverflow.com/comment/39250085
has title: Media queries and browser zoom
downvote count: 1
type: Question
has body: Long version I've built a responsive webdesign for just two devices. Simplied example: &lt;link rel="stylesheet" media="screen and (min-width: 769px) and (max-width: 1199px)" href="tablet.css" /&gt; &lt;link rel="stylesheet" media="screen and (min-width: 1200px)" href="wide.css" /&gt; This works as intended, on all major browsers, tablets (built with Bootstrap 3). The only issue that I have is that there are still people in this world that zoom their browser to 150+% in order to increase readability. This is not an issue, the page still works properly. There is just one issue - the browser loads the "tablet" view on a 150+% zoomed in webbrowser. AFAIK this is normal behaviour, since there are less pixels available in the viewport, the appropriate media query loads the tablet.css file, just like when you resize the browser screen manually. I'd like to counter this behaviour by forcing the desktop view, even when zoomed in. Can anyone point me in the right direction? TLDR: I've got a RWD scaling for tablet and desktop. Desktop browser zoom 150% = tablet view. How to prevent tablet view for desktop when zoomed in? Note: I'm using the viewport meta tag No, this is not the issue explained here (http://blog.55minutes.com/2012/04/media-queries-and-browser-zoom/) I've tried using media="screen and (min-device-width: 1200px) but that option renders me unable to 'test' the tablet-view on desktop since 'resizing' a screen simply doesn't work (device width = 1920px)
accepted answer: http://stackoverflow.com/a/25205127
linked to: http://stackoverflow.com/q/1713771
tagged with: javascript
has answer: http://stackoverflow.com/a/25205127
has comment: http://stackoverflow.com/comment/39251511
answer count: 1
favorite count: 0
upvote count: 4
tagged with: css
has comment: http://stackoverflow.com/comment/39249959
type: AnsweredQuestion
score: 3

http://stackoverflow.com/comment/39016538
comment on: http://stackoverflow.com/a/25077441
type: AnswerComment
has text: Thats wat i am getting and byda way check if ur jquery is loading or not properly and dont forget to remove form tags k
score: 0
type: Comment

http://stackoverflow.com/comment/39199001
comment on: http://stackoverflow.com/a/25162835
has text: also I changed the plugin there is no problem on the plugin. there is no exception in the console but the error message can't appear
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/85252849
type: Comment
score: 1
has text: This does not answer to the question. Please refer the question again
type: AnswerComment
comment on: http://stackoverflow.com/a/49123744

http://stackoverflow.com/a/25177929
downvote count: 1
has body: This is how you get your value: obj.camp[0].data[0]
type: Answer
upvote count: 0
score: -1
answers question: http://stackoverflow.com/q/25177848
has comment: http://stackoverflow.com/comment/39207312

http://stackoverflow.com/comment/39036842
has text: It should fail silently by default but still log it to console. You could try handling it with `.onerror`
type: Comment
comment on: http://stackoverflow.com/a/25087913
score: 1
type: AnswerComment

http://stackoverflow.com/comment/39299201
type: Comment
comment on: http://stackoverflow.com/q/25228991
has text: @Nico, the problem is that I actually need the isolated scope. It's a gallery feature which will be reused several different times on a page so I need to create unique values that are independent of each other. Otherwise that probably would work just fine.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39104179
type: Comment
has text: Btw, the Weather library has been deprecated and will stop working in June 2015. https://developers.google.com/maps/documentation/javascript/weatherlayer
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25123278

http://stackoverflow.com/comment/39136174
type: Comment
has text: What's not working? Did you add the classes as in my example? Did you modify your code accordingly?
comment on: http://stackoverflow.com/a/25122827
type: AnswerComment
score: 0

http://stackoverflow.com/comment/39010575
comment on: http://stackoverflow.com/q/25074450
has text: make it clear, what is expected. so that we can help you.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25172107
type: Answer
has body: You can try also remembering the book index inside your LibraryBookView. _.each(this.model.get("library").books, function(book, bookIndex){ var libraryBookView = new LibraryBookView({ el: $('.content'), book: book, bookIndex: bookIndex, model: this.model }); libraryBookView.render(); }); Then in your library book class, where you want to set the model: this.model.set('library.books[' + this.bookIndex + ']', this.book); This is assuming your book index's won't change... if they do, then you will have to either update the index on each library book view, or do something else.
answers question: http://stackoverflow.com/q/25100913
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/q/25131728
has title: AJAX - Modal Popup Not In Generated Source - How'd They Do That?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/39117623
has comment: http://stackoverflow.com/comment/39117728
has answer: http://stackoverflow.com/a/25132075
type: Question
answer count: 1
tagged with: javascript
tagged with: ajax
has body: On the Bloomberg.com site, in the top right of the homepage there is a 'Sign In' link (next to their search textbox). Upon clicking the link a simple-looking modal popup appears into which one can enter one's sign-in credentials. Clean, elegant. With the popup still visible I did a generated source check and there's no evidence of the modal popup html anywhere in it. I'm wondering why the modal popup source is missing and, assuming it's coming from somewhere else, where it's coming from. Can someone please explain it? More generally I assume that Bloomberg's login dialog is ultimately transmitting its user data on an encrypted basis. The home page itself is rendering as a standard http. Is there some hidden - and secure, presumably https - means by which this site, and others I'm sure, is accomplishing its modal information gathering and posting, securely and distinct from the base homepage? Any clarifications on how this is happening and the best practices for coding it would be appreciated. Thanks! -- Rick
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/39138149
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25142508

http://stackoverflow.com/comment/39235917
score: 0
type: Comment
type: QuestionComment
has text: which is the browser used
comment on: http://stackoverflow.com/q/25195439

http://stackoverflow.com/q/25078596
accepted answer: http://stackoverflow.com/a/25078654
tagged with: angularjs-ng-repeat
score: 2
has body: I have an array in Angular like this: $scope.test = [ {'item1' : 'answer1' }, {'item2' : 'answer2' }, {'item3' : 'answer3' } ]; And so on... Now there's 2 things I want to do. Firstly I want to use an ng-repeat to iterate through the array and display the keys and values separately. I tried this: &lt;div ng-repeat="(key,value) in test"&gt; {{key}} = {{value}} &lt;/div&gt; But that produces results like this: 0 = {"item1" : "answer1"} 1 = {"item2" : "answer2"} 2 = {"item3" : "answer3"} Whereas I want it to display like this: item1 = answer1 item2 = answer2 item3 = answer3 The second thing I'd like to do is use the keys to display results from a different array. For example I have this array: $scope.item1.question = 'some question'; So as I'm going through the ng-repeat I'd like to do something like this: {{key}}.question to display the string 'some question'. But this doesn't do anything...
upvote count: 2
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25078654
tagged with: arrays
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: Display keys and values with Angular array
tagged with: angularjs

http://stackoverflow.com/comment/39089367
comment on: http://stackoverflow.com/a/25116364
type: AnswerComment
score: 0
type: Comment
has text: Also, updated the fiddle to a half/working solution based on what you said [new JsFiddle](http://jsfiddle.net/4qW9A/3/). Additionally I updated my question above. Do play with entering stuff into the text boxes and hitting generate. Right now I still require a page refresh when inputting new data which is less than ideal.

http://stackoverflow.com/a/25180216
has comment: http://stackoverflow.com/comment/39214929
answers question: http://stackoverflow.com/q/25173661
score: 0
has body: Editing line 14 of your jsFiddle to add a delay created a smoother effect so you don't see two at once. Which I surmise is the answer to the question. Line 14 edits: to.delay(100).fadeIn(500, function () {
type: Answer

http://stackoverflow.com/comment/39209218
has text: So why not use `var flash=document.getElementById("object");` instead of `var flash=document.getElementById("flash");`?
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25181523
type: QuestionComment

http://stackoverflow.com/comment/39238860
type: QuestionComment
comment on: http://stackoverflow.com/q/25197065
score: 0
has text: you can use to disable them instead of hide
type: Comment

http://stackoverflow.com/q/25213732
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
has body: I am working with some HTML that was provided by a design company. Unfortunately, they have a habit of changing their code without notice, requiring that I update my code in the actual web app. There is a link that changes the class value on one div and toggles the display value between block and none on another. I'll be darned if I can figure out what JavaScript is getting called to make these changes. Is there a way (Firebug, Chrome Developer Tools, etc.) to tell what is getting called that is changing these values, short of pulling down the complete source and going through it line-by-line?
answer count: 0
score: 1
linked to: http://stackoverflow.com/q/7703765
tagged with: google-chrome-devtools
type: Question
duplicate of: http://stackoverflow.com/q/7703765
tagged with: javascript
has title: Track what JavaScript is called when a link is clicked
tagged with: firebug
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/39270287
downvote count: 0

http://stackoverflow.com/a/25216529
has comment: http://stackoverflow.com/comment/39307412
score: 1
has comment: http://stackoverflow.com/comment/39307263
has comment: http://stackoverflow.com/comment/39306780
downvote count: 0
has comment: http://stackoverflow.com/comment/39307047
has body: Two more Ideas could increase your performance: Check if your whole world is rendered, or just the visible images (on the stage). For example double the world size and see, if it impacts the performance. It shouldn't, if you only render the relevant images. Use CocoonJS to compile your application. It promises to speed up your application speed by 10 times for mobile devices. But be aware that it implies some serious restrictions on your html around your canvas. obsolete answer, which assumed that the problem is caused by zooming out too far: In 3D graphics Mipmaps can be used to avoid this problem. Essentially smaller images (i.e. less pixel) are used, when the object is more distant to the camera. Maybe you can find something appropriate if you google something like html5 canvas 2D Mipmaps. Or you could build a simple mipmapping algorithm yourself. But before investing the work, try how performant this approach is, by simple changing all block images, with 1x1-pixel images. Maybe your performance problem is not caused by slow rendering, as you assume. Learn to use a profiler, if it doesn't solve the problem.
type: Answer
has comment: http://stackoverflow.com/comment/39293683
answers question: http://stackoverflow.com/q/25215141
has comment: http://stackoverflow.com/comment/39307509
has comment: http://stackoverflow.com/comment/39292498
has comment: http://stackoverflow.com/comment/39293411
has comment: http://stackoverflow.com/comment/39307242
has comment: http://stackoverflow.com/comment/39306847
upvote count: 1
has comment: http://stackoverflow.com/comment/39307355
has comment: http://stackoverflow.com/comment/39307152

http://stackoverflow.com/comment/39240774
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25184950
type: AnswerComment
has text: @Palec, I will remember that in future. I just thought everybody could see that I was the one that posted the questions and that post. I am not taking any credit for the code I just wanted to show what code I ended up using as I feel it is a good feature to have (that should really be built in) on a shopify store. Thanks everyone.

http://stackoverflow.com/comment/39095924
has text: Double clicking on a design element creates the click event, not the ontextchanged event. Could the wiring be screwed up in the .designer file?
comment on: http://stackoverflow.com/q/25120131
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25130424
score: 1
accepted answer of: http://stackoverflow.com/q/25130157
answers question: http://stackoverflow.com/q/25130157
upvote count: 1
type: AcceptedAnswer
has body: The plugin requires that the children should be within a single wrapping element. Your HTML shows that the .content are one wrapper for each .stuff. Your HTML setup should be like this one: You may also use jQuery in order to make each child a 100% height as the window. Also, in order to work properly, call the plugin after it was constructed. So after the plugin constructor you should place this: $(function() { $(".stuff").height($(window).height()); $(".content").snapscroll(); }); CHECK THIS UPDATED FIDDLE
type: Answer
downvote count: 0

http://stackoverflow.com/a/25129835
score: -3
answers question: http://stackoverflow.com/q/25126106
has comment: http://stackoverflow.com/comment/117179777
has body: $(document).keyup(function(e) { if (e.keyCode == 27) { &lt;DO YOUR WORK HERE&gt; } // esc }); U may find this useful: How to detect escape key press with JavaScript?
type: Answer
downvote count: 6
upvote count: 3
has comment: http://stackoverflow.com/comment/91116626

http://stackoverflow.com/comment/39165203
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25157433
has text: In this case you need promises. Something like this https://www.promisejs.org/, but you can choose other implementation as well.
score: 0

buildpack
tag name: buildpack
type: Tag
tags question: http://stackoverflow.com/q/25078414

http://stackoverflow.com/comment/39228779
type: Comment
comment on: http://stackoverflow.com/a/25191550
type: AnswerComment
has text: @JohnSterling Angular itself is JavaScript. Its fine to do this.
score: 0

http://stackoverflow.com/comment/39117982
type: QuestionComment
comment on: http://stackoverflow.com/q/25131946
score: 1
has text: It seems that you lack even very basic knowledge of JavaScript. Stack Overflow is **not** a site where we teach you language basics. You have to learn something yourself first and come back only when you have **specific** problems, not overly general questions.
type: Comment

http://stackoverflow.com/q/25178778
has title: Code formatting standard across various IDEs for JavaScript
has answer: http://stackoverflow.com/a/25178993
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
tagged with: code-formatting
has body: I am working on an Angular project. Developers in my team are using various IDEs like WebStrorm, SublimeText or even Eclipse. I wish to have some kind of code formatting rules defined for JavaScript defined which can be imported in WebStorm as well as other IDEs, but as I searched I could not found anything standard for this. How can I do this?
score: 2
upvote count: 2
type: UnansweredQuestion
type: Question

http://stackoverflow.com/a/25176801
has comment: http://stackoverflow.com/comment/39201013
has comment: http://stackoverflow.com/comment/39201163
has body: this was already answered here: How to display an unordered list in two columns? by Gabriel. Following css should resolve your issue: ul { columns: 2; -webkit-columns: 2; -moz-columns: 2; } I have created jsfiddle to test it and it works nicely. Have a look http://jsfiddle.net/tralala/jg0zycfw/1/.
has comment: http://stackoverflow.com/comment/39330501
score: 0
answers question: http://stackoverflow.com/q/25176302
type: Answer

http://stackoverflow.com/comment/39045049
score: 1
comment on: http://stackoverflow.com/q/25092391
type: QuestionComment
has text: I think this is very likely possible with a `canvas` element, but since I don't know much about it, I'd rather not try to come up with an answer for this. Look around the web with terms like `drawing an image on html canvas with opacity`.
type: Comment

http://stackoverflow.com/comment/55049043
score: 0
type: Comment
type: QuestionComment
has text: Possible duplicate of [How to resize a kendo ui combobox?](http://stackoverflow.com/questions/14778976/how-to-resize-a-kendo-ui-combobox)
comment on: http://stackoverflow.com/q/25106453

http://stackoverflow.com/comment/39246597
type: AnswerComment
comment on: http://stackoverflow.com/a/25201224
score: 0
type: Comment
has text: Thanks thats a useful tip. However strangely even when I copy and paste the entire source code from jsfiddle mine renders differently in the same browser as to what it does on jsfiddle.

http://stackoverflow.com/comment/39240870
type: Comment
has text: Its not working, I want whenever a user click on add button a textbox should be visible and whatever value he puts it should gets copied in the dropdown list.
type: AnswerComment
comment on: http://stackoverflow.com/a/25198177
score: 0

http://stackoverflow.com/comment/39245627
has text: This still does not work. It loads the first form, but in the second page nothing is fired..
type: Comment
comment on: http://stackoverflow.com/a/25200786
score: 0
type: AnswerComment

http://stackoverflow.com/q/25172549
has comment: http://stackoverflow.com/comment/39193729
has title: W3C - document type does not allow element "a" here
has comment: http://stackoverflow.com/comment/39193651
type: Question
tagged with: w3c
accepted answer: http://stackoverflow.com/a/25172571
score: 1
tagged with: http://stackoverflow.com/tag/xhtml
upvote count: 2
has answer: http://stackoverflow.com/a/25172571
downvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has body: i have been trying to validate my website codes by W3C in XHTML 1.0 Strict. My last error i cant fix for now: "document type does not allow element "a" here" it is because i have been "hiding" email address from robots by this code: Does anyone know how i could keep email address kinda "hidden" as it is, and still validate that last error in W3C please? thanks in advance!
type: AnsweredQuestion

http://stackoverflow.com/comment/39261392
has text: @Boltosaurus I decided to add a little more functionality to the code above. Hope you like it!
type: Comment
comment on: http://stackoverflow.com/a/25166077
score: 0
type: AnswerComment

http://stackoverflow.com/q/25111436
score: 1
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/39096224
tagged with: javascript
has comment: http://stackoverflow.com/comment/39098263
upvote count: 1
has body: I'm creating a directive that will allow you to style a "dropdown" anyway you like. Basically what I'm doing is hiding the actual select element and providing a div with a ul that will have all the options as list items. Eventually it will dynamically control the select element so you can use the fake dropdown and retain the functionality of the select element. The problem I'm running into is that I'm using $scope.$watch to watch the children of the select element. The options elements. So anytime they are updated the ul will also be updated automatically. I'm running into what I think is a weird $digest issue. I've created a JSBIN here. If you click add once nothing happens. If you click it again two li's are added to the ul. If you continue this patter you'll notice that every second click the li's are updated. I created a second JSBIN here and used $timeout. In the $timeout I call $digest and the ul is updated correctly. I'm very confused as to why this is happening. I thought ng-click would trigger a $digest, which is seems to do, but only every second click. That is what is truly confusing to me. Any help would be greatly appreciated. The goal is for this directive to be a module indepent of other code (as modules should be). So I can't depend on someone running a $digest in their controller. I'm also at a lose as to why it's happening every second click and really really need to know why. UPDATE: I've found a work around for what I want to do. My issue now is that for some reason when I trigger the change event on the select element using triggerHandler it get a $apply already in progress error. I can't, for the life of me, figure out why. Here is the new JSBIN.
has comment: http://stackoverflow.com/comment/39079932
has comment: http://stackoverflow.com/comment/39097640
favorite count: 0
has comment: http://stackoverflow.com/comment/39079970
tagged with: angularjs
type: UnansweredQuestion
has title: Confusion about angular $digest cycle
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/39095346

http://stackoverflow.com/comment/39066425
score: 0
type: Comment
has text: Well, there's [CORS](http://en.m.wikipedia.org/wiki/Cross-origin_resource_sharing), which can allow this (but requires the external server to allow it, not the originating service/web-page).
comment on: http://stackoverflow.com/a/25104363
type: AnswerComment

http://stackoverflow.com/comment/39267884
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25212172
has text: I do assign the spinner to a var, forgot to mention it in my post, will update it

icallbackeventhandler
tag name: icallbackeventhandler
tags question: http://stackoverflow.com/q/25147931
type: Tag

http://stackoverflow.com/comment/39112443
has text: Because `http://ip.address/screensaver/now.jpeg` is JPEG image but live updates so i need to render it every 15 mili sec to get latest image in seamless mode.
score: 0
comment on: http://stackoverflow.com/q/25128762
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25225651
score: 2
has comment: http://stackoverflow.com/comment/39292423
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/39292406
upvote count: 2
answers question: http://stackoverflow.com/q/25225575
has body: I believe this will do what you want: &lt;script&gt; $(function(){ var effect_selector = "#float img"; var effect_selector2 = "#floatbubble"; $(effect_selector).css({'height':'0px','width':'0px'}); $(effect_selector2).css({'height':'0px','width':'0px'}); $(window).load(function(){ $(effect_selector).delay(2000).animate({ width: '125px', height : '125px' },"slow",function(){ $(effect_selector).removeAttr("style"); //Another effect $(effect_selector2).delay(2000).animate({ width: '125px', height : '125px' },"slow",function(){ $(effect_selector2).removeAttr("style"); }); }); }); }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25225575

excel
tags question: http://stackoverflow.com/q/25176957
tag name: excel
tags question: http://stackoverflow.com/q/25071805
tags question: http://stackoverflow.com/q/25127064
tags question: http://stackoverflow.com/q/25185206
tags question: http://stackoverflow.com/q/25191001
tags question: http://stackoverflow.com/q/25182031
type: Tag
tags question: http://stackoverflow.com/q/25182006
tags question: http://stackoverflow.com/q/25177990
tags question: http://stackoverflow.com/q/25125265

http://stackoverflow.com/a/25100874
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25100832
answers question: http://stackoverflow.com/q/25100832
type: Answer
upvote count: 1
score: 1
has body: give the desired &lt;div/&gt; the ID sort The table will not be rendered where you place the script, it will be rendered in the element that will be supplied as argument to render .render("#sort"); ...so there must be an element that matches the selector(currently there isn't such an element in the page, so it will be rendered to the body) of course you may also change the argument of render to #leftwrapper and use the current ID http://jsfiddle.net/9J8yy/2/
type: AcceptedAnswer

http://stackoverflow.com/a/25129722
has body: You don't need to do doc.open() and doc.close(). You can do the following: var myWindow = window.open('','','width=1250,height=1000,resizable=yes,fullscreen=yes'); var doc = myWindow.document; doc.body.innerHTML = divText; // Then, when you want, change it: doc.body.innerHTML = "Something else";
downvote count: 1
type: Answer
score: 2
upvote count: 3
answers question: http://stackoverflow.com/q/25129670

http://stackoverflow.com/q/25077238
accepted answer: http://stackoverflow.com/a/25080386
has body: I am creating HTML Video Player. so that i have used "http://www.videojs.com/" plugin. In the below code the player is created is succesfully. My problem is that how would i know that video is finished ? for that i have wrote the code but it is not working . Can you help me ? Thankx in advance
tagged with: html5-video
has comment: http://stackoverflow.com/comment/39016108
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/39016462
possible better answer: http://stackoverflow.com/a/25077299
tagged with: javascript
linked to: http://stackoverflow.com/q/10773322
has answer: http://stackoverflow.com/a/25077299
score: 0
has comment: http://stackoverflow.com/comment/39015948
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25080386
tagged with: plugins
has title: Callback function is not working for HTML5 Video player
type: AnsweredQuestion

http://stackoverflow.com/q/25174006
favorite count: 0
upvote count: 0
score: -4
tagged with: css
downvote count: 4
type: AnsweredQuestion
type: Question
has title: floating background with css and JS
answer count: 1
accepted answer: http://stackoverflow.com/a/25174238
has body: hello all i was wondering how to achive a floating background image like we see on pintrest or may be this link https://sumally.com/ actually i have to design a page where i need to place two full hd background image vertically and need to scroll them vertically in background. users are access to form which is into another div placed on that image and fixed. any help is appreciated i think it can be done by -webkit for mozilla and for chrome etc
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25174238

http://stackoverflow.com/comment/39078442
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25110073
score: 1
has text: The correct syntax is: `var textareaRegex = /^((?!www|http[s]{0,1}:\/\/www).)*$/;` without the quotes (`"`). You are getting everything error because your syntax is wrong.

http://stackoverflow.com/q/25107820
tagged with: google-chrome
has body: I'm trying to reload javascript resources programmatically in Chrome and if I run that from console, then it works fine, but if I put that into the code to reload after an event was fired, then the resource doesn't change. What is the problem? I use this reloader: var docHeadObj = document.getElementsByTagName("head")[0]; var dynamicScript = document.createElement("script"); dynamicScript.type = "text/javascript"; dynamicScript.src = 'js/resource.js'; docHeadObj.appendChild(dynamicScript); And here is the event handler: obj.onclick(function(){ var docHeadObj = document.getElementsByTagName("head")[0]; var dynamicScript = document.createElement("script"); dynamicScript.type = "text/javascript"; dynamicScript.src = 'js/resource.js'; docHeadObj.appendChild(dynamicScript); }); After both cases the new and proper &lt;script&gt; element is appended to the &lt;head&gt; and on network tab the resource is downloaded, but in case of the second one the resource is never change. EDIT: I'm closer to the problem. If I have this code in the resource which will be reloaded alert("aaa"); And I open the application then after performing a click event I get an alert with 3 'a' letter. Then I decrease the number of the letters to 2, reload the resource, perform a click event, then I again see 3 'a' letter. Then I decrease the number of letters to 1, save and click, then I see 2 'a' letter. So it seems to be the Chrome (and also FF) stores the last modified resource except if I reload that from console.
score: 2
downvote count: 0
has title: Reload javascript resource programmatically in Chrome
has comment: http://stackoverflow.com/comment/39074418
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/39072931
answer count: 2
has answer: http://stackoverflow.com/a/25109058
tagged with: javascript
has comment: http://stackoverflow.com/comment/39073413
has answer: http://stackoverflow.com/a/49075978
favorite count: 0
has comment: http://stackoverflow.com/comment/39072968
has comment: http://stackoverflow.com/comment/39073297
type: UnansweredQuestion

http://stackoverflow.com/comment/39234539
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25166525
type: AnswerComment
has text: I need to do some backend validation first and only when it passes, I submit the form and disable the button. If validation does not pass, I can't disable the button.

http://stackoverflow.com/comment/39048662
comment on: http://stackoverflow.com/q/25092255
has text: Uhm, jQuery UI is for javascript.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/39050973
comment on: http://stackoverflow.com/a/25089383
type: Comment
score: 0
has text: @Vartan, Your solution is `awesome` if we assume that the dropdown menu doesn't change. The carousel controls are just an example. I am dynamically generating the content (It can be anything and not only a carousel, ...) so adding a `keepopen` class is not really possible.
type: AnswerComment

http://stackoverflow.com/q/25215243
has answer: http://stackoverflow.com/a/25604971
tagged with: javascript
tagged with: forms
type: Question
score: 0
answer count: 1
has body: When I open the below "html", in the programmatic dynamic tab container, I am unable to get the dojox.form.Manager object in the javascript. the form object below is undefined. Please suggest me if I am missing anything. Name:
has title: dojox.form.manager not working in programmatic tab container
tagged with: http://stackoverflow.com/tag/html
tagged with: dojo
type: UnansweredQuestion

http://stackoverflow.com/comment/39125063
has text: @user3412782: Does any javascript work for you in firefox? Just test a simple alert. Also, [maybe this is the issue](http://stackoverflow.com/questions/275092/windows-location-href-not-working-on-firefox3)?
score: 0
comment on: http://stackoverflow.com/q/25135626
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25165158
answers question: http://stackoverflow.com/q/25164001
type: AcceptedAnswer
has body: You need parameter of ng-repeat to be actuall array in order for built in orderBy to work. See this question: sorting values of a hash object in ngRepeat - angularJS I would plugin underscore.js ( or lodash) and convert your data upfront. See your updated fiddle http://plnkr.co/edit/odMCOp65zbyfbEfmU3FX?p=preview add mapping to your controller (note, this is top level for simplicity, reference to updated fiddle for two level mapping) $scope._Json = _.map($scope._Json, function( v, k) { return { key: k, value: v} }) and change markup to (again, only top level here for simplicity, reference to updated plnkr for two level update): &lt;label ng-repeat="cat in _Json"&gt; &lt;li ng-repeat="(name, itemslist) in cat.value | orderBy:'itemslist.ItemIndex'"&gt; &lt;strong&gt;{{itemslist.Item }}&lt;/strong&gt; - &lt;strong&gt;{{itemslist.ItemIndex }}&lt;/strong&gt; &lt;/li&gt; &lt;/label&gt;
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25164001

http://stackoverflow.com/comment/39264053
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25210360
type: Comment
has text: Sure, when you create a RegExp like that, you are giving it the pattern you are looking for. When you call `test()` you are giving it the string to search in. In your case you want to search in `myURL` for the pattern "late-model". Hope that helps ;)

http://stackoverflow.com/q/25085460
has answer: http://stackoverflow.com/a/25086323
has title: Angular inside of Angular - solving: WARNING: Tried to load angular more than once
type: Question
answer count: 2
tagged with: javascript
linked to: http://stackoverflow.com/q/16725811
score: 0
has answer: http://stackoverflow.com/a/25085582
tagged with: angularjs
type: UnansweredQuestion
has body: I have a small angular app that just has one directive. It will be used on many other websites, simply by them including one JS file and then using the directive anywhere on their page. The problem is that if I try to do this on a site that happens to also use angular, I get the classic WARNING: Tried to load angular more than once. This is because angular loads itself on the global namespace. I have tried messing with the angular.js code, doing find-and-replace on instances of things like: angular = window.angular || (window.angular = {}) to angular = window.angularXYZ || (window.angular = {}) But it didn't work and it seems very hacky. Any ideas for namespacing an entire angular app so that it can play nicely when initialized from within other angular apps?

http://stackoverflow.com/comment/96769418
has text: Please augment this code-only answer with some explanation.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/55007117
type: AnswerComment

http://stackoverflow.com/a/49320236
has body: Here is the original addon including a small update to let it work with CodeMirror V3 : CodeMirror.extendMode("css", { commentStart: "/*", commentEnd: "*/", newlineAfterToken: function(type, content) { return /^[;{}]$/.test(content); } }); CodeMirror.extendMode("javascript", { commentStart: "/*", commentEnd: "*/", newlineAfterToken: function(type, content, textAfter, state) { if (this.jsonMode) { return /^[\[,{]$/.test(content) || /^}/.test(textAfter); } else { if (content == ";" &amp;&amp; state.lexical &amp;&amp; state.lexical.type == ")") return false; return /^[;{}]$/.test(content) &amp;&amp; !/^;/.test(textAfter); } } }); CodeMirror.extendMode("xml", { commentStart: "&lt;!--", commentEnd: "--&gt;", newlineAfterToken: function(type, content, textAfter) { return ( type == "tag" &amp;&amp; /&gt;$/.test(content) || /^&lt;/.test(textAfter) ) || ( type == "tag bracket" &amp;&amp; /&gt;$/.test(content) ); } }); CodeMirror.defineExtension("commentRange", function (isComment, from, to) { var cm = this, curMode = CodeMirror.innerMode(cm.getMode(), cm.getTokenAt(from).state).mode; cm.operation(function() { if (isComment) { // Comment range cm.replaceRange(curMode.commentEnd, to); cm.replaceRange(curMode.commentStart, from); if (from.line == to.line &amp;&amp; from.ch == to.ch) // An empty comment inserted - put cursor inside cm.setCursor(from.line, from.ch + curMode.commentStart.length); } else { // Uncomment range var selText = cm.getRange(from, to); var startIndex = selText.indexOf(curMode.commentStart); var endIndex = selText.lastIndexOf(curMode.commentEnd); if (startIndex &gt; -1 &amp;&amp; endIndex &gt; -1 &amp;&amp; endIndex &gt; startIndex) { // Take string till comment start selText = selText.substr(0, startIndex) // From comment start till comment end + selText.substring(startIndex + curMode.commentStart.length, endIndex) // From comment end till string end + selText.substr(endIndex + curMode.commentEnd.length); } cm.replaceRange(selText, from, to); } }); }); Cod…
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25109809
upvote count: 3
has comment: http://stackoverflow.com/comment/135408243
type: Answer

http://stackoverflow.com/q/25126722
favorite count: 0
upvote count: 2
type: UnansweredQuestion
has title: Using DHIS 2 API With Jquery Cross domain issue
score: 2
has answer: http://stackoverflow.com/a/43663951
type: Question
has answer: http://stackoverflow.com/a/28784316
has answer: http://stackoverflow.com/a/31428915
has body: I'm trying to implement a javascript application which uses the DHIS 2 API. I've spent the whole day trying to authenticate using Jquery. The API says (https://www.dhis2.org/doc/snapshot/en/user/html/ch32s02.html) you need to use base 64 authentification. I tried to implement that in Jquery but i run into cross domain issues. I have tried authenticating using the DHIS 2 demo (https://apps.dhis2.org/dev/) but unsuccessfully. I then set up a local copy on my local computer but i still run in the same issue as DHIS 2 is running on different port. I've tried jsonp and CROS but in vain. Here is the code i'm trying so far $(function(){ var base_url = "http://apps.dhis2.org/demo/"; var login = 'dhis-web-commons-security/login.action?authOnly=true'; var current_user_url = 'api/users.json'; var params = { 'j_username':'admin', 'j_password':'district' }; function base_64_auth(user,password) { var tok = user + ':' + password; var hash = Base64.encode(tok); return "Basic " + hash; } var auth = base_64_auth('admin','district'); $.ajax({ url : base_url+login, data : params, type : 'POST', dataType : 'text', crossDomain : true, xhrFields : { 'withCredentials':true }, beforeSend : function(req) { req.setRequestHeader('Authorization',auth); }, success : function(data){ console.log('authentification succeded'); alert('success'); //userInfo(); },error : function(xhr,type,msg) { console.log(xhr.responseText); console.log(type); console.log(msg); } }); )}; I'm using a simple library for base64 encoding www.webtoolkit.info/javascript-base64.html#.U9_O2XVdWkA Checking in the console i see this error : XMLHttpRequest cannot load http://apps.dhis2.org/demo/dhis-web-commons-security/login.action?authOnly=true. The request was redirected to 'http://apps.dhis2.org/demo/dhis-web-commons/security/login.action?failed=true', which is disallowed for cross-origin requests that require preflight. If anyone has ever used the API, i would appreciate his help or if you know any other way (including othe…
has answer: http://stackoverflow.com/a/26945202
tagged with: javascript
tagged with: jquery
answer count: 6
tagged with: ajax
tagged with: cross-domain
tagged with: api
has answer: http://stackoverflow.com/a/31889608
downvote count: 0
has answer: http://stackoverflow.com/a/26031919

http://stackoverflow.com/q/25227087
score: 2
type: AnsweredQuestion
upvote count: 2
has title: why custom aside or slide panel not slide using angular strap?
has body: I am making a slide panel .So I googled it and found angrular stap library .I study that library try to make slide panel . http://mgcrea.github.io/angular-strap/##asides .I import all js required for that but my side panel not slide as given on site.I don't know where I am wrong . Here is my code with plunker. http://plnkr.co/edit/GIFyFSdyJI8tHq5nlBBn?p=preview Custom aside (using data-template)
linked to: http://stackoverflow.com/q/25227719
has comment: http://stackoverflow.com/comment/39295568
type: Question
tagged with: angularjs-directive
tagged with: angular-strap
has answer: http://stackoverflow.com/a/25227799
tagged with: javascript
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25227799
tagged with: angularjs

http://stackoverflow.com/comment/39164755
type: AnswerComment
type: Comment
has text: I suspect if you are using the right id in the javascript for the select list component. If you are using Firefox, you can right click on the the select list and select "Inspect Element". I put your javascript in JSFiddle and did some modification to let you see how it works: http://jsfiddle.net/TL8r2/
comment on: http://stackoverflow.com/a/25152582
score: 0

http://stackoverflow.com/comment/39060764
has text: Well yeah, that meets the requirements of the question. The asker makes no mention of requirement for copying (non-array) objects.
comment on: http://stackoverflow.com/a/25100784
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25253920
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25148584
answers question: http://stackoverflow.com/q/25148584
has body: It turns out that i had to DELETE my temporary internet files from IE. After the delete, everything worked fine. Thank you again for all your help!

http://stackoverflow.com/comment/39227131
comment on: http://stackoverflow.com/q/25190500
score: 0
type: QuestionComment
has text: @Stuart, I'm using `Three.js` so it will. Forgot to add that to the question.
type: Comment

http://stackoverflow.com/a/25173155
score: 0
has comment: http://stackoverflow.com/comment/39195106
has body: Assuming your PHP script is returning what you want, using .load() is probably easier: function getAOTD() { $("#answer").load('/answer.php'); } This assumes that answer.php is a sibling of the current page and only returns a partial HTML snippet.
has comment: http://stackoverflow.com/comment/39196260
type: Answer
has comment: http://stackoverflow.com/comment/39196123
has comment: http://stackoverflow.com/comment/39195890
has comment: http://stackoverflow.com/comment/39195692
answers question: http://stackoverflow.com/q/25172995

http://stackoverflow.com/a/25149956
has comment: http://stackoverflow.com/comment/39151862
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25149932
upvote count: 3
has comment: http://stackoverflow.com/comment/39151717
has body: As far as I know, the uncaught referencerror exception occurs when you try to call a function that doesn't exist. Incorrect. If you are trying read the value of any variable (or more general, binding) that doesn't exist (e.g. no var getCurrentCtx anywhere), then JS throws a reference error. Relevant part in the specification. Exception: typeof getCurrentCtx would return "undefined", because it tests whether the variable (reference) is resolvable (exists) before it reads it.
score: 3

http://stackoverflow.com/a/31137535
type: Answer
has body: You can change the rendering speed setting a lower Timeout: var requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || function(c) {window.setTimeout(c, X)}; Just decreased the value of X, so you'll get a higher rendering speed. To move the ball, make sure you have variables for the coordinate positions, so you just have to translate the ball in the main animation loop: var fnAnimate = function() { if (!pause) { ball.translateX (deltaX); ball.translateY (deltaY); ball.translateZ (deltaZ); cube.rotateY(0.5*Phoria.RADIANS); scene.modelView(); renderer.render(scene); } requestAnimFrame(fnAnimate); input(); }; And make shure your input functions alterate this variable, somehow.
score: 0
answers question: http://stackoverflow.com/q/25113698

http://stackoverflow.com/q/25104540
type: Question
possible better answer: http://stackoverflow.com/a/25104851
answer count: 2
has title: ng-view fades in on purpose, but then fades out
has comment: http://stackoverflow.com/comment/39067461
tagged with: javascript
has comment: http://stackoverflow.com/comment/39066976
score: 0
tagged with: css
has answer: http://stackoverflow.com/a/25105015
tagged with: ng-animate
tagged with: angularjs
type: AnsweredQuestion
has body: I have this ngView-directive: &lt;div ng-view="" class="fade"&gt;&lt;/div&gt; where i have the following styles applied: .fade.ng-enter { -webkit-transition:0.3s linear all; transition:0.3s linear all; opacity:0.5; } .fade.ng-enter.ng-enter-active { opacity: 1; } But the problem is that the view fades in, and then fades out automatically, by setting it's opacity to 0. Am i missing something important? I have made this screencast illustrating the issue: https://www.youtube.com/watch?v=_5IUO-ntlOA
has answer: http://stackoverflow.com/a/25104851
accepted answer: http://stackoverflow.com/a/25105015

http://stackoverflow.com/comment/39041888
type: Comment
type: QuestionComment
score: 0
has text: It may be easier if you generate a _GUID_ for each "change" of the field and when someone makes a change, have them post the previous _GUID_, then if it's a historical one and not the latest one, deny the change with a warning like "blah has been modified since you last saw it"
comment on: http://stackoverflow.com/q/25091047

http://stackoverflow.com/q/25165613
has answer: http://stackoverflow.com/a/43449027
downvote count: 0
accepted answer: http://stackoverflow.com/a/25168967
favorite count: 0
possible better answer: http://stackoverflow.com/a/43449027
upvote count: 2
score: 2
type: AnsweredQuestion
has body: I was wondering if there is a way to change the default text message "Please, select row" of the jqGrid delete dialog to something else. I was able to change the text for when a row selected using the msg option and the caption using caption, however, I can't seem to change the alert text. I looked at the grid.locale-en.js file and was able to find. It was under: nav : { edittext: "", edittitle: "Edit selected row", addtext:"", addtitle: "Add new row", deltext: "", deltitle: "Delete selected row", searchtext: "", searchtitle: "Find records", refreshtext: "Refresh", refreshtitle: "Reload Grid", alertcap: "Warning", alerttext: "Please, select row", &lt;----- viewtext: "", viewtitle: "View selected row" }, I don't want to change it in the js file since other pages use a different instance of the control and so the message needs to be different. I tried overriding it in my navGrid options but that didn't work. Any ideas?
type: Question
has answer: http://stackoverflow.com/a/25168967
answer count: 2
tagged with: jqgrid
tagged with: javascript
tagged with: jquery
has title: jqGrid change default alert text

http://stackoverflow.com/q/25133538
tagged with: undefined
favorite count: 0
accepted answer: http://stackoverflow.com/a/25134026
has title: undefined object in map collection javascript
has comment: http://stackoverflow.com/comment/39121406
has comment: http://stackoverflow.com/comment/39120737
tagged with: dictionary
has comment: http://stackoverflow.com/comment/39120832
type: AnsweredQuestion
score: 1
has body: I have my custom class and I want to store it into map collection, but while I want to get one of the value from the map (one instance of my object) I got error that object is undefined. Is there any possibility to cast object or something? If I push simple string instead of object of my custom class everything is ok. Someone can tell me how to solve this problem? Of course if this problem could be solved. js: function CustomClass(first, second, third){ this.one = first; this.two = second; this.three = third; } CustomClass.prototype.constains(obj1, obj2){} ... var dictionary = new Object(); dictionary[key] = CustomClass(1, "lel", 2); for(var el in dictionary) //here IE debugger shows that I have a right key, but the value is undefined. { if(dictionary[el].contains(something)) {...} } If it depends I use IE10. Thanks for help and also for tips! edit: If I use dictionary[key] = new CustomClass(1, "lel", 2); instead of: dictionary[key] = CustomClass(1, "lel", 2); it works, but someone could tell me why, something like this: dictionary[key] = "lel"; works without new operator? From what I know everything in js is an object so what's the difference beetwen inserting a string and a custom class? (I'm new in js, so sorry for my bad knowledge)
upvote count: 1
tagged with: collections
type: Question
has answer: http://stackoverflow.com/a/25134026
has comment: http://stackoverflow.com/comment/39121347
tagged with: javascript
has comment: http://stackoverflow.com/comment/39120834
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25151432
score: 1
upvote count: 1
downvote count: 0
has body: I don't thing the || parts work the way you think they do. This will run the Alert() since '2' is not false: if ('A' === '1' || '2') alert('match') I would use a switch or you will have to spell it out like: var nd = nthDigit(stringifiedVin, 0); if (nd === 'J' || nd === 'K' || nd === 'L' || ...
type: Answer
answers question: http://stackoverflow.com/q/25151358

http://stackoverflow.com/a/71463615
has body: [jsfiddle_link][1] php asp java $("#lang").select2().select2('val',['asp','php']); [1]: https://jsfiddle.net/xrug7f6k/
answers question: http://stackoverflow.com/q/25187926
score: 0
type: Answer

http://stackoverflow.com/comment/39209612
type: Comment
type: QuestionComment
has text: I use the 2.0.1 version
comment on: http://stackoverflow.com/q/25168402
score: 0

http://stackoverflow.com/a/26638931
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25131212
answers question: http://stackoverflow.com/q/25131212
has body: This is an issue with Chromium: https://code.google.com/p/chromium/issues/detail?id=389163. Unfortunately, there is no easy fix.
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/39052379
type: AnswerComment
has text: Sorry with the above answer, it prints a delete button per row. I only 1 a check box per row, and then a delete button at the end.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25096288

http://stackoverflow.com/q/25087538
has title: Search before multiple elements before
type: Question
tagged with: javascript
upvote count: 2
linked to: http://stackoverflow.com/q/19723221
answer count: 1
tagged with: jquery
favorite count: 0
has body: How do I search the select element before multiple elements before ? I know $('select[name=foo]').val()) 1 3 3 Lorem Ipsum Search This is my attempt: $('a').click(function(e){ e.preventDefault(); console.log($(this).prevUntil('select')); });
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25087593
accepted answer: http://stackoverflow.com/a/25087593
has comment: http://stackoverflow.com/comment/39035536
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/39035703

http://stackoverflow.com/comment/39196547
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25173928
has text: Yes I tried tables[0], it returns [object Object]. so its first row try to JSON.stringify(Tables[0]) it will give you result :)
score: 0

http://stackoverflow.com/a/25218768
answers question: http://stackoverflow.com/q/25218170
type: Answer
score: 0
has body: If you want to do this, it is better to do it in css: For example, if you wanted to have the cursor change to your custom cursor only when hovering over an anchor tag then you can do this: a { cursor: url(cursor/bluecursor.cur), auto; } If you wanted to have the cursor ALWAYS use custom cursors, then you have to decide when to use a special cursor. You can do this with classes: .help { cursor: url(cursor/help.cur), auto; } Then apply that class to the particular element that you want to display the custom cursor: Help Me There is no way (to my knowledge) to simply tell the browser just replace all cursors with a custom set.

http://stackoverflow.com/comment/39078118
has text: After I wrote the comment, Sun popped into my head.
comment on: http://stackoverflow.com/q/25110395
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/121535445
type: AnswerComment
score: 0
type: Comment
has text: This is a great answer. Not sure why it doesn't come with it as parameter options, but this saved my day..Thanks!
comment on: http://stackoverflow.com/a/34914863

http://stackoverflow.com/q/25144945
has comment: http://stackoverflow.com/comment/39240019
upvote count: 1
linked to: http://stackoverflow.com/q/22950663
has title: Tell child directive to act after a parent directive has done DOM actions?
has body: Let's say we have some nested directives: &lt;big-poppa&gt; &lt;baby-bird&gt;&lt;/baby-bird&gt; &lt;/big-poppa&gt; And let's say that big-poppa wants to create a component that all of his children directives can share. It would be nice to put it in the controller, but this component needs the DOM, so it needs to be build in the link function. Then let's say the baby-bird component wants to read from component. Maybe it wants to listen to events from it, maybe send it a command or two. The challenge is that controllers fire down the dom (first parent, then child), and post-link methods fire the other direction, so the execution order looks like this: bigPoppa controller babyBird controller babyBird link bigPoppa link The fact that the parent's link method fires after the child's is the cause of an intra-directive communication challenge for me. I want the parent to build the shared DOM component, but DOM construction should happen in a link function. The parent therefore builds the component after any children I can solve this with a timeout (gross), or a promise (complex/non-idiomatic?). Here is the fiddle: http://jsfiddle.net/8xF3Z/4/ var app = angular.module('app',[]); app.directive('bigPoppa', function($q){ return { restrict: 'E', controller: function($scope){ console.log('bigPoppa controller'); var d = $q.defer() $scope.bigPoppaLinkDeferred = d $scope.bigPoppaLink = d.promise }, link: function(scope, el, attrs){ console.log('bigPoppa link'); scope.componentThatNeedsDom = { el: el, title: 'Something' }; scope.bigPoppaLinkDeferred.resolve() } } }); app.directive('babyBird', function(){ return { restrict: 'E', controller: function(){ console.log('babyBird controller'); }, link: function(scope, el, attrs, bigPoppaController){ console.log('babyBird link'); // console.log('poppa DOM component', scope.componentThatNeedsDom); // Not yet defined, because the parent's link function runs after the child's // setTimeout(function(){ console.log('poppa DOM component', scope.c…
tagged with: angularjs-compile
has comment: http://stackoverflow.com/comment/39142271
has comment: http://stackoverflow.com/comment/39142821
type: Question
has comment: http://stackoverflow.com/comment/39262602
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25154541
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/39142443
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/25176586
has answer: http://stackoverflow.com/a/25145361
score: 1
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/39266600
has text: just a guess, try adding replace: true in the return object
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25211408

http://stackoverflow.com/q/25192559
has comment: http://stackoverflow.com/comment/39230572
has answer: http://stackoverflow.com/a/25192733
score: 0
has comment: http://stackoverflow.com/comment/39230758
has comment: http://stackoverflow.com/comment/39230613
accepted answer: http://stackoverflow.com/a/25192733
tagged with: javascript
has title: populating dropdownlist based on another in javascript
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25192705
type: Question
has answer: http://stackoverflow.com/a/25192705
answer count: 2
has comment: http://stackoverflow.com/comment/39230705
has body: I have this in my html function populate(myop) { var selection = myop.options[myop.selectedIndex].text; PopulateTaskddl(selection); } it gives me error says " Populate is undefined .. Any help ?

http://stackoverflow.com/q/25198467
answer count: 2
downvote count: 0
has body: Lot of research and tries but didn't work.My Problem is I want to enable my button on check of at least one checkbox from the available list. Following is the screen: Initially this button is enabled but my requirement is it should be disabled initially and if at least one of the checkbox is checked then it should be enabled. Here,I have one view as Create inside which one more partial view is there which displays all the list view with the help of one controller method i.e within my Create view one more view is being rendered which displays all the available list. If it would have been in one view then I would have easily done this as lot of fiddles are there with jquery by getting the id of the checkbox and passing to one jquery function. I know that I need to check the count for the checkbox in order to make my button enable/disable but again we dont have any change event as that in ASP. Also on click of add , method for controller is begin triggered as: [HttpPost] public ActionResult Create(int id, List&lt;MyModel&gt; myModelList) { // code... } Here once I click on Add button this controller method is triggered where in my parameters(myModelList) I am able to check which checkbox is checked.So, this thing I need to implement on checking any of the checkbox such that the add button will be enabled on click of which I will be able to add my teams. So how to implement this or what I need to do for this? Thanks in advance.
has answer: http://stackoverflow.com/a/25198568
accepted answer: http://stackoverflow.com/a/25198568
favorite count: 0
possible better answer: http://stackoverflow.com/a/25199820
upvote count: 2
has title: Enable button on checkbox selection in MVC 4
tagged with: razor
tagged with: checkbox
tagged with: asp.net-mvc-4
score: 2
type: AnsweredQuestion
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25199820

import
type: Tag
tag name: import
tags question: http://stackoverflow.com/q/25150500

http://stackoverflow.com/comment/39116785
type: QuestionComment
comment on: http://stackoverflow.com/q/25131200
score: 0
has text: @kohli it has to fixed only in server-side, here check this [**question**](http://stackoverflow.com/q/3136140/1671639)
type: Comment

prototype
tags question: http://stackoverflow.com/q/25148399
tags question: http://stackoverflow.com/q/25189394
tags question: http://stackoverflow.com/q/25084889
tags question: http://stackoverflow.com/q/25122303
tag name: prototype
tags question: http://stackoverflow.com/q/25111108
tags question: http://stackoverflow.com/q/25146417
tags question: http://stackoverflow.com/q/25193009
tags question: http://stackoverflow.com/q/25127161
type: Tag
tags question: http://stackoverflow.com/q/25188811
tags question: http://stackoverflow.com/q/25082062
tags question: http://stackoverflow.com/q/25174897
tags question: http://stackoverflow.com/q/25208386
tags question: http://stackoverflow.com/q/25100512
tags question: http://stackoverflow.com/q/25164948
tags question: http://stackoverflow.com/q/25202669

http://stackoverflow.com/comment/39003730
comment on: http://stackoverflow.com/q/25070573
type: Comment
type: QuestionComment
has text: synchronous. It's basically a $.each() loop.
score: 0

http://stackoverflow.com/q/25091287
has answer: http://stackoverflow.com/a/25091611
accepted answer: http://stackoverflow.com/a/25091611
answer count: 2
has comment: http://stackoverflow.com/comment/39042844
downvote count: 0
tagged with: jquery
has body: I have a jQuery UI Dialog. I tried implementing the "$('.ui-widget-overlay').bind('click'...." method which has been suggested to close the dialog when a user clicks outside. However, it doesn't work in my code. What am I doing wrong? $('input[name="delete-image"]').click(function(e){ e.preventDefault(); $("div.deleteImageDialog").dialog({ resizable: false, modal: true, buttons: { "OK": function(e) { e.preventDefault(); $.ajax({ url: $('form.addEdit').attr('action'), type: $('form.addEdit').attr('method'), data: $('form.addEdit').serialize(), open: function(){ $('.ui-widget-overlay').bind('click', function(){ $('div.deleteImageDialog').dialog('close'); }) }, success: function(html) { } }); $(this).dialog('close'); }, "Cancel": function() { $(this).dialog('close'); } } }); });
linked to: http://stackoverflow.com/q/1403615
has title: jQuery UI Dialog: Close when Click Outside
favorite count: 0
possible better answer: http://stackoverflow.com/a/27668485
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/39042765
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/27668485
tagged with: dialog
has comment: http://stackoverflow.com/comment/67549656
tagged with: javascript

http://stackoverflow.com/q/25129333
has comment: http://stackoverflow.com/comment/39113393
has body: This piece of javacsript code (using jquery.treeview and jquery.cookie plugins) produces cookies named "tree_state_undefined". I'm really not much into javascript, so anyone can tell me, how to get IDs of individual ul.tree elements in initialization? thanks very much $("ul.tree").treeview({ collapsed: true, animated: "medium", control:"#controller_" + $(this).attr('id'), persist: "cookie", cookieId: "tree_state_" + $(this).attr('id') }); for the record, it's this plugin: https://github.com/jzaefferer/jquery-treeview/blob/master/jquery.treeview.js
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/39113359
has answer: http://stackoverflow.com/a/25129668
upvote count: 1
has answer: http://stackoverflow.com/a/25129669
type: Question
type: AnsweredQuestion
has title: Get element attribute inside declaration - jQuery
score: 1
accepted answer: http://stackoverflow.com/a/25129668
possible better answer: http://stackoverflow.com/a/25129669

http://stackoverflow.com/a/25076757
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/39014718
has body: You can split() your string on *** and then use .pop() to get the last element of the resulting array: var str = 'Ice Creams***Cone***Frosty'; var last = str.split("***").pop(); JSFiddle
upvote count: 2
answers question: http://stackoverflow.com/q/25076714
type: Answer

http://stackoverflow.com/a/25209521
answers question: http://stackoverflow.com/q/25209139
has body: Here is a similiar questions and answer. You'd need to rework the JS but you'd be able to easily target when the country node equals Europe, loop through with nextSibling(), build out your content and inject into a div.
score: 0
type: Answer

http://stackoverflow.com/a/25089230
answers question: http://stackoverflow.com/q/25089172
score: 0
has body: In your document.ready your id should be &lt;%=btndiv.ClientId%>. Sorry for the bad formatting, doing this from stackexchange app
type: Answer

http://stackoverflow.com/a/25246853
has comment: http://stackoverflow.com/comment/39333476
has body: First. You need to define the state. .state('step1', { url: '/step-1' }) Add onEnter controller (so you can $inject things). .state('step1', { url: '/step-1', onEnter: function () {} }) Animate (or simply scroll) to element $('html, body').animate({ scrollTop: $("#step1").offset().top }, 2000); Here the example
score: 13
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25120829
answers question: http://stackoverflow.com/q/25120829
type: Answer
upvote count: 13
has comment: http://stackoverflow.com/comment/39348225

http://stackoverflow.com/comment/39044508
score: 2
has text: it actually return the array into your format...but if js doesn't recognise it then you can use a eval(yourphpencodedarray) or JSON.parse(yourphpencodedarray)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25092465

http://stackoverflow.com/comment/39195716
comment on: http://stackoverflow.com/a/25172676
type: AnswerComment
score: 0
type: Comment
has text: and but I hope build not image

http://stackoverflow.com/comment/39222043
comment on: http://stackoverflow.com/q/25188139
score: 0
type: Comment
type: QuestionComment
has text: @meagar `even the alert box is not working`

http://stackoverflow.com/comment/39185423
type: QuestionComment
comment on: http://stackoverflow.com/q/25168204
has text: These are 2 different things. The first is a function that when called returns you a function (a closure). The 2nd is creating a new object That object can have properties/methods. These 2 things serve different purposes.
score: 0
type: Comment

http://stackoverflow.com/a/25219191
score: 0
answers question: http://stackoverflow.com/q/25219129
type: Answer
has body: eval will set this in the current scope, which is the function publiListScriptLoad, and you expect it to be declared in the global scope. To come around this you may do it by putting adding your function to window object Working version: http://jsfiddle.net/y50xtf31/ function publiListElementLoad(result) { testEval(); } function publiListScriptLoad() { eval("window.testEval = function() { alert('Hello World');}"); } publiListScriptLoad(); publiListElementLoad(""); But be careful with eval-function - it is a over-powerful function and should be used with great care.

cryptography
tag name: cryptography
tags question: http://stackoverflow.com/q/25122123
type: Tag

http://stackoverflow.com/comment/39266844
comment on: http://stackoverflow.com/q/25211896
has text: Any reason not to use json data?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/39280238
type: Comment
has text: @Fedaykin can you share plunker
comment on: http://stackoverflow.com/q/25218896
score: 0
type: QuestionComment

http://stackoverflow.com/comment/39249433
score: 0
comment on: http://stackoverflow.com/a/25193786
type: Comment
has text: The function is `hasClass` with a capital "C"... and I'm not sure why it wouldn't work. If you need to use an ID, try `this.id === "abc"`. For two ID comparisons, use `this.id === "abc" || this.id === "xyz"`.
type: AnswerComment

http://stackoverflow.com/comment/39247636
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25201706
has text: yes i want to avoid validation on server side

http://stackoverflow.com/a/25218775
has body: To split by spaces you can use \s in regular expressions For line breaks you can use \n (and \r) I created an example that breaks down and removes the array items that are empty. Note: In the following example I added and spaces breaks the null character. function splitText(data) { return String(data).split(/[\0\s]+/g).filter(Boolean); } console.log(splitText(" dat a a ")); IE8: function splitText(data) { var arr = String(data).split(/[\0\s]+/g), i, j, v = []; j = arr.length; for (i = 0; i &lt; j; i += 1) { if (arr[i] !== "") { v.push(arr[i]); } } arr = null; return v; } alert(splitText(" dat a a "));
answers question: http://stackoverflow.com/q/25218677
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/39095716
score: 0
type: Comment
has text: What is `sentences`? Also, you never use `data`, `index`, or `value` anywhere in your code. How is this ever going to do anything with the data if you never even access it?
type: QuestionComment
comment on: http://stackoverflow.com/q/25119793

asp.net-mvc-5
tags question: http://stackoverflow.com/q/25090865
type: Tag
tags question: http://stackoverflow.com/q/25081329
tags question: http://stackoverflow.com/q/25078070
tags question: http://stackoverflow.com/q/25079366
tag name: asp.net-mvc-5

http://stackoverflow.com/a/25090771
has comment: http://stackoverflow.com/comment/39041463
type: Answer
score: 1
upvote count: 1
has body: This is async call. The inner will be executed after the POST success. Meanwhile the outer execute after you start to send POST. The window.titles is defined when the POST success So the at the time outer call is executed, the window.titles is undefined. You should have look at this http://api.jquery.com/jquery.ajax/
has comment: http://stackoverflow.com/comment/39041415
downvote count: 0
answers question: http://stackoverflow.com/q/25090733

http://stackoverflow.com/comment/39228427
type: QuestionComment
has text: To be honest I'm getting a little confused about what it is you're trying to do. Are you trying to reveal the puzzle pieces as you click the covering piece? If so then yes, modifying my code to your code will work. Don't even bother with the toggling classes, just modify the CSS of the covering piece.
comment on: http://stackoverflow.com/q/25190501
score: 0
type: Comment

http://stackoverflow.com/q/25109275
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25109377
has comment: http://stackoverflow.com/comment/39075588
score: 24
has answer: http://stackoverflow.com/a/25109380
upvote count: 24
type: Question
has body: I'm working on a project where I need to replace all occurrences of a string with another string. However, I only want to replace the string if it is text. For example, I want to turn this... Hi Test Hi into... Hello Test Hello In that example all of the "Hi"s were turned into "Hello"s except for the "Hi" as the h2 class. I have tried... $("#container").html( $("#container").html().replace( /Hi/g, "Hello" ) ) ... but that replaces all occurrences of "Hi" in the html as well
linked to: http://stackoverflow.com/q/9178174
accepted answer: http://stackoverflow.com/a/25109429
tagged with: javascript
has answer: http://stackoverflow.com/a/33840163
tagged with: replace
linked to: http://stackoverflow.com/q/298750
downvote count: 0
has title: jQuery replace all occurrences of a string in an html page
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/30096733
answer count: 5
has answer: http://stackoverflow.com/a/30096733
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25109429

http://stackoverflow.com/q/25217336
has answer: http://stackoverflow.com/a/25217418
has body: How can i pass arguments to Sequence promises using q.promises var argumentsArray = ["PARAM1", "PARAM2", "PARAM3"] var arr = []; function aJaxCall(argumentsArray) { var deferred = Q.defer(); $.ajax({ type: 'POST', /* Here i want to get the passed parameter and use it in my post request */ url: 'someurl.com' + PARAMS, // data: data, dataType: 'text', success: function (data) { arr.push(data); deferred.resolve(data); } }); return deferred.promise; } var result = Q(); for (var i = 0, len = argumentsArray.length; i &lt; len; i++) { /* Pass the argumentsArray[i] for each then call, i want to be able to pass the current argumentsArray value */ result = result.then(aJaxCall); } So far i tried with properties to the aJaxCall function itself and then handle it with arguments.calee.prop for (var i = 0, len = argumentsArray.length; i &lt; len; i++) { aJaxCall.prop = argumentsArray[i]; result = result.then(aJaxCall); } and then within the aJaxCall function i tried to get the parameters like this: arguments.callee.prop but it is always binding the last element in the argumentsArray, cause the for loop finish and the .then is fired later in the cycle. Any suggestions are highly appreciated.
type: Question
duplicate of: http://stackoverflow.com/q/20013869
has comment: http://stackoverflow.com/comment/39277582
has comment: http://stackoverflow.com/comment/39277660
tagged with: javascript
tagged with: http://stackoverflow.com/tag/q
score: 0
accepted answer: http://stackoverflow.com/a/25217418
answer count: 1
has comment: http://stackoverflow.com/comment/39277600
has comment: http://stackoverflow.com/comment/39277624
tagged with: promise
has title: How to pass arguments to the chained promises callbacks
has comment: http://stackoverflow.com/comment/39277650
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/20013869

http://stackoverflow.com/q/25102135
score: 1
has title: Can not apply js effect on rails
type: Question
tagged with: turbolinks
tagged with: javascript
tagged with: ruby-on-rails-4
has comment: http://stackoverflow.com/comment/39062729
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25102488
tagged with: ruby-on-rails
has body: I want to apply the simple javascript rainydrop effect, http://maroslaw.github.io/rainyday.js/demo2.html But it doesn't work. I got very unexpected result as the following picture. I think the problem is the asset pipeline ? But I have no ideas Here's the layout joseph_memo.html.haml !!! %html{lang: "en"} %head %meta{charset: "utf-8"}/ %title rainyday.js demo #4 = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' =&gt; true = javascript_include_tag 'application', 'data-turbolinks-track' =&gt; true %style{media: "screen"} :cdata img { display: none; } body { overflow: hidden; } \#canvas { position: absolute; top: 0; left: 0; } %script{src: asset_path("rainyday/dist/rainyday.0.1.1.min.js"), type: "text/javascript"} :javascript function run() { var engine = new RainyDay('canvas', 'background', window.innerWidth, window.innerHeight); engine.gravity = engine.GRAVITY_NON_LINEAR; engine.trail = engine.TRAIL_DROPS; engine.VARIABLE_GRAVITY_ANGLE = Math.PI / 8; engine.rain([ engine.preset(0, 2, 0.5), engine.preset(4, 4, 1) ], 50); } %body{onload: "run();"} %img#background{alt: "background", src: asset_path("rainyday/img/city.jpg")}/ #cholder %canvas#canvas
tagged with: asset-pipeline
downvote count: 0

http://stackoverflow.com/comment/39179306
type: QuestionComment
has text: @Jason I gotcha, i've spent the last couple weeks using javascript with ember.js development so i am very rusty in creating generic web pages. I also dont really use Jquery too much. So you're probably right
score: 0
comment on: http://stackoverflow.com/q/25164693
type: Comment

http://stackoverflow.com/a/25211667
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25211184
upvote count: 2
type: AcceptedAnswer
has body: The problem is because you try to access a property of a viewModel that your template doesn't know. Here is an example that is working. I'm pretty sure it will give you enough to help you. Html: Selected: your fiddle: http://dojo.telerik.com/EMIp/5
type: Answer
answers question: http://stackoverflow.com/q/25211184
score: 2

http://stackoverflow.com/comment/39054845
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25098064
score: 0
has text: The solution you proposed in your last paragraph is the good one.

http://stackoverflow.com/comment/39045103
type: QuestionComment
type: Comment
has text: Perhaps you could share the image first so we can see what we'reworking with but the `filter` property might offer some options?
comment on: http://stackoverflow.com/q/25092391
score: 0

http://stackoverflow.com/q/25144607
accepted answer: http://stackoverflow.com/a/25144859
has comment: http://stackoverflow.com/comment/39141454
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
has answer: http://stackoverflow.com/a/25144859
score: 0
has body: in my HTML, I have a fileUpload button where you can choose a file to upload a file and then once you click pbcUploadBtn, it goes through validation in Validation.CheckWellFormed(...). The validation method returns an empty string if the file is fine or a string with the first error in the file otherwise. How can I have this display on my page using jQuery or js, etc.? &lt;div class="upload"&gt; &lt;asp:FileUpload ID="fileUpload" class="btn" runat="server" /&gt; &lt;asp:Button ID="pbcUploadBtn" class="btn btn-primary" runat="server" Text="Upload" onclick="uploadBtnClick" /&gt; &lt;/div&gt; protected void uploadBtnClick(object sender, EventArgs e) { if (this.fileUpload.HasFile) { // file gets uploaded to szSaveToPath Validation.CheckWellFormed(szSaveToPath); //do things } }
type: AnsweredQuestion
has title: How do I return string from codebehind and display on web page?
type: Question
tagged with: c#

http://stackoverflow.com/a/25283281
answers question: http://stackoverflow.com/q/25153620
type: Answer
has body: OK. So the demo creates such a graph. realAudioInput -&gt; inputPoint -&gt; audioRecorder -&gt; recorderJSNode -&gt; destination || -&gt; zeroGain -&gt; destination || -&gt; analyserNode So if you want to add your effect to just the recording, you have to insert it between the inputPoint and the 'recorderJSNode'. The best way of doing that would be something along these lines. var delayNode = createDelay(); inputPoint.connect( delayNode ); audioRecorder = new Recorder( delayNode ); instead of just audioRecorder = new Recorder( inputPoint ); So your graph would look like this. realAudioInput -&gt; inputPoint -&gt; audioRecorder -&gt; delayNode -&gt; recorderJSNode -&gt; destination || -&gt; zeroGain -&gt; destination || -&gt; analyserNode
score: 0
has comment: http://stackoverflow.com/comment/39400000

http://stackoverflow.com/q/25214535
score: 0
upvote count: 1
tagged with: this
downvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/39271768
tagged with: javascript
has title: Why does constructor function (with "return this") return window object?
has comment: http://stackoverflow.com/comment/39271824
favorite count: 0
has body: I have a function function Person(name){ this.name = name; return this; } alert(Person("somename")); This is returning [Object Window], how we can change this to [object object]? Is there any way we can change this function to get [object object] without changing signature.
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25214628

http://stackoverflow.com/q/25229129
answer count: 3
has answer: http://stackoverflow.com/a/25229147
tagged with: node.js
has title: What app.set function does in express.js?
type: AnsweredQuestion
upvote count: 14
has answer: http://stackoverflow.com/a/44007538
type: Question
score: 14
possible better answer: http://stackoverflow.com/a/44007538
accepted answer: http://stackoverflow.com/a/25229147
downvote count: 0
tagged with: javascript
has body: I am new to node.js and was going through an example and could not understand what app.set('title', 'My Site'); does. can anybody explain?
favorite count: 0
tagged with: express
has answer: http://stackoverflow.com/a/54879063

http://stackoverflow.com/comment/39161684
has text: @MikeC tried without using javascript label ..but havent worked ,Thanx for your reply
comment on: http://stackoverflow.com/q/25124985
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/71773898
has body: Many of these answers give potentially misleading output if one is looking for the day in the current timezone. This function will output the day corresponding with the date's timezone offset: const adjustDateToLocalTimeZoneDayString = (date?: Date) =&gt; { if (!date) { return undefined; } const dateCopy = new Date(date); dateCopy.setTime(dateCopy.getTime() - dateCopy.getTimezoneOffset()*60*1000); return dateCopy.toISOString().split('T')[0]; }; Tests: it('return correct day even if timezone is included', () =&gt; { // assuming the test is running in EDT timezone // 11:34pm eastern time would be the next day in GMT let result = adjustDateToLocalTimeZoneDayString(new Date('Wed Apr 06 2022 23:34:17 GMT-0400')); // Note: This is probably what a person wants, the date in the current timezone expect(result).toEqual('2022-04-06'); // 11:34pm zulu time should be the same result = adjustDateToLocalTimeZoneDayString(new Date('Wed Apr 06 2022 23:34:17 GMT-0000')); expect(result).toEqual('2022-04-06'); result = adjustDateToLocalTimeZoneDayString(undefined); expect(result).toBeUndefined(); }); Misleading approach: To demonstrate the issue with the other answers' direct ISOString().split() approach, note how the output below differs from what one might expect: it('demonstrates how the simple ISOString().split() may be misleading', () =&gt; { // Note this is the 7th expect(new Date('Wed Apr 06 2022 23:34:17 GMT-0400').toISOString().split('T')[0]).toEqual('2022-04-07'); });
answers question: http://stackoverflow.com/q/25159330
score: 0
type: Answer

http://stackoverflow.com/comment/39269933
has text: @FelixKling why doing it that way though?
score: 0
comment on: http://stackoverflow.com/q/25213517
type: Comment
type: QuestionComment